Skip to content

Challenge 4: APIM Policy prevents MCP tool discovery #21

@neaorin

Description

@neaorin

The MCP server created in challenge 4 is unusable as-is, because it cannot successfully list its tools to clients.

We've tested this behavior with MCP.Playground and ChatGPT (in Developer mode, add a custom app).
In both clients, the call to tools/list times out.

The issue seems to be the APIM inbound processing policy defined in challenge 4.
According to this thread:

Avoid accessing the context.Response.Body in your policies, as this can trigger response buffering that interferes with the streaming behavior required by MCP servers.

If we remove the Process Claim Upload tool from the MCP server, it works fine in both MCP.Playground and ChatGPT. Both can see the remaining Process Claim Base64 tool.

Is there a way to fix the FastAPI implementation so there's no more need for the inbound policy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions