docs(integrations): add Pydantic AI FastMCP toolset guide#4070
Merged
jlowin merged 2 commits intoMay 4, 2026
Conversation
jlowin
approved these changes
May 4, 2026
Member
jlowin
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Solid integration guide. I'll merge as-is and follow up with a tiny PR to fix two broken doc-link anchors and hoist an import — minor enough to not block on a re-push.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Closes #2246. Pydantic AI ships a
FastMCPToolset(inpydantic_ai.toolsets.fastmcp) that lets a Pydantic AI agent call tools from any FastMCP (or other MCP) server, but the FastMCP docs do not cover the integration. New users searching the FastMCP docs for Pydantic AI find nothing and have to dig through the Pydantic AI repo to wire it up.What
docs/integrations/pydantic-ai.mdxunder the existing AI SDKs group, matching the style of the Anthropic, OpenAI, and Gemini integration pages.FastMCPToolsetat a FastMCP server with examples for in-memory, Streamable HTTP, STDIO, andmcpServersJSON config transports.Client/StreamableHttpTransportwith a bearer header, and links to the FastMCPOAuthhelper plus server-side Token Verification.FastMCPToolsetdocs so readers can find the full API.docs/docs.jsonso it shows up in the AI SDKs nav alongside Anthropic / Gemini / OpenAI.Tested
FastMCPToolsetimport path and accepted constructor arg types against the Pydantic AI source (pydantic_ai_slim/pydantic_ai/toolsets/fastmcp.py) and Pydantic AI'sdocs/mcp/fastmcp-client.md.docs/docs.jsonunder the existingAI SDKsgroup without breaking JSON structure./clients/client,/clients/transports,/clients/auth,/clients/auth/oauth,/integrations/mcp-json-configuration,/servers/auth/token-verification) resolve to existing pages in the repo.