Skip to content
Discussion options

You must be logged in to vote

Yes — the client passed to FastMCP.from_openapi(..., client=client) is shared.

The provider stores that exact client, and every generated OpenAPI tool gets the same object. In the current implementation each tool calls self._client.build_request(...) and then sends through self._client: OpenAPITool source.

That means these are shared across concurrent MCP callers:

  • the connection pool (desirable);
  • client-level headers, auth, hooks and limits;
  • the client's mutable cookie jar (usually undesirable for per-user sessions).

If an upstream response sets a cookie matching the later request's domain/path, HTTPX stores it in the client's jar and can send it on a later request made for another MCP …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MicaelJarniac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants