Learning resourcesReviewed · Pydantic

Pydantic AI: Model Context Protocol (MCP) overview

This is the Pydantic AI documentation overview of Model Context Protocol (MCP) support, written for Python developers who want agents to use external tools. Its main catch is that it is a short orientation page: it gives no installation steps and points to linked pages for full configuration options and server-side use. It explains the recommended MCP capability, the lower-level MCPToolset route and the MCPServerTool native tool, with one short code example. The MCP capability runs the MCP server locally by default and has an opt-in native=True flag for provider-side MCP.

Researched 12 Nov 2026

In short.

This is the Pydantic AI documentation overview of Model Context Protocol (MCP) support, written for Python developers building agents. Its main catch is that it is a short orientation page. It leaves out install steps, versions, licence, costs, detailed MCP-server security guidance and full configuration options, and instead links to separate capability, client and server documentation. Those linked pages were not captured, so what they contain is unknown. The page says Pydantic AI supports MCP in two directions: agents can use the tools of MCP servers, and agents can run inside MCP servers. For the client side it recommends the MCP capability from pydantic_ai.capabilities. This runs the MCP server locally by default and can switch to the model provider's native MCP support with native=True. For lifecycle control and shared servers it points to MCPToolset, and for native-only use it points to MCPServerTool. Nothing was executed or tested. This report covers only what the page says.

Researched and written by an AI model and checked by a second AI model. How it works

Covered: the complete content of the single selected page at [https://pydantic.dev/docs/ai/mcp/overview/index.md], as captured on 12 November 2026 (selected-page.txt, 4,731 bytes). Excluded: all linked pages, including the MCP capability page, the MCP client and server pages, API references, native tools documentation, the Logfire MCP and Run Python MCP repositories, and the list of MCP servers. Not assessed: the Pydantic AI library's version, licence, price, install steps and security behaviour; whether the model identifier is available; and which providers support native MCP. Nothing was executed or tested. The code example was read but not run.

The overview

What this resource is

This is a documentation page titled Model Context Protocol (MCP) in the Pydantic AI docs, at [https://pydantic.dev/docs/ai/mcp/overview/index.md]. It is the overview of MCP support in Pydantic AI, a Python agent framework. It is a guide to a feature, not a software package, so it is classed as a learning resource.

The page is about 4.7 KB of text. It has an introduction, a short explanation of what MCP is, and a section on using MCP servers with one code sample (mcp_capability.py). The captured page does not identify an individual author or authoring team. It also gives no version or date.

Overall assessment

For its size the page is clear and well organised. It recommends a default, gives one concrete example and says when to move to lower-level tools. It works as a map of the MCP options in Pydantic AI and as a guide to choosing between the capability, the toolset and the native tool.

It is not a complete tutorial. It gives no installation commands, no walkthrough of authentication or transports, no error handling and no detailed MCP-server security guidance. Treat it as the starting point, and read the linked capability, client and server pages before you build anything. Those pages were not part of this review.

Who it is for

The main audience is Python developers who use Pydantic AI, or are considering it, and want their agents to call tools exposed by MCP servers. The code sample assumes you know what an Agent is and how to pass a model identifier.

Beginners get a plain-language definition of MCP: a standard way for AI applications to connect to external tools and services. The page gives three examples: a web search service for a research agent, Cursor searching logs, traces and metrics through the Pydantic Logfire MCP server, and a sandboxed Python runner. Beginners would still need the linked Agent documentation to follow the code.

Experienced developers get the difference between running an MCP server locally and using the model provider's native MCP support. They also learn when to drop down to MCPToolset.

What the page says you can do

The page names two directions. Pydantic AI agents can connect to MCP servers and use their tools, and agents can be used inside MCP servers. The second is covered on a separate server page.

For connecting to MCP servers, the page describes three routes. The first and recommended route is the MCP capability. It runs the MCP server locally by default, which the page says keeps credentials, hooks and tracing under your control. A single native=True flag opts into the provider's native MCP support. The page says native=True falls back to local if the model does not support native MCP, so the same agent can work across providers without code changes.

The second route is to use MCPToolset directly through toolsets=[...]. The page suggests this when you want to manage the toolset lifecycle yourself, share one MCP server across several agents, or pass advanced transport or client settings that the capability does not expose.

The third route is MCPServerTool, used as a native tool. This is for when you only want the provider's native MCP support and no local fallback.

The capability's local= argument accepts any MCPToolset input: a URL, a FastMCP transport, a pre-built fastmcp.Client, an in-process FastMCP server or a local script path.

Using it

Requirements

The page does not list requirements. The code sample suggests you need a Python environment with the pydantic_ai package, an MCP server reachable by URL and a model identifier. The sample uses the placeholder addresses [https://mcp.example.com/api] and [https://mcp.example.com/other]. Its model string, openai:gpt-6.1-sol, is copied from the page, and whether that model is available was not checked.

This page does not state the Python version, the package version, any extras to install, provider API keys or any FastMCP dependency. Treat these as unknown until you have read the installation and capability pages.

How it works

According to the page, you give an Agent an MCP capability in its capabilities list, and the agent can then connect to MCP servers and use their tools. By default the MCP server runs locally, and the page says this keeps credentials, hooks and tracing under your control. The page does not explain the process architecture behind running locally.

With native=True, the page says the provider's own MCP support is used, with a fallback to local if the model does not support it. The page does not say how the fallback is detected or which providers support native MCP.

For MCPToolset, the page says it accepts a URL, a FastMCP transport, a fastmcp.Client, an in-process FastMCP server or a local script path, and is attached through toolsets=[...]. This page does not explain the underlying protocol details, such as transports, tool discovery or message formats.

Setup

The page gives no installation or configuration commands. The setup it implies is to import Agent from pydantic_ai and MCP from pydantic_ai.capabilities, then pass one or more MCP(...) entries in the capabilities argument. The page says that passing a URL as the first argument enables both the local fallback and, with native=True, provider-native MCP.

For anything beyond that, the page sends you to the capability documentation at [https://pydantic.dev/docs/ai/capabilities/mcp/] for the full set of inputs and configuration options. For lower-level use of MCPToolset, it points to the MCP client documentation at [https://pydantic.dev/docs/ai/mcp/client/]. Those pages were not captured, so their contents are not assessed here.

Worked example from the page

The page's example, mcp_capability.py, builds an Agent with a model string and a capabilities list that holds two MCP entries. The first entry points at the placeholder endpoint [https://mcp.example.com/api] and runs the server locally by default. The second points at the placeholder endpoint [https://mcp.example.com/other] and sets native=True. This opts into native MCP, with a fallback to local if the model does not support it.

Both addresses are placeholders. The example does not show a run call, a prompt or any output. Nothing here was executed, so runtime behaviour is not verified. That includes which tools appear, how errors surface and how native and local modes differ.

Assessment & evidence

Limitations and risks

The page is an overview. It has no installation steps, no version information, no troubleshooting and no list of model providers that support native MCP. It does not cover authentication, permissions or how far to trust third-party MCP servers, so you have to judge the security of any server you connect. This matters because an agent connected to an external server can use that server's tools, and the page does not discuss the risks.

The page does not explain the model identifier in the sample or say which providers support native=True. Behaviour was not tested.

Because the selected scope is one page, everything said here about the capability, MCPToolset, MCPServerTool and the server-side feature rests on this page's summaries, not on their API references.

Reasoning behind the assessment

The assessment rests on what the page states. Its recommendations are consistent and give a clear decision path: use the MCP capability first, MCPToolset for lifecycle control or shared servers, and MCPServerTool for native-only use. The code sample matches the described behaviour, with one entry using local defaults and one using native=True.

These claims were not checked against the library's source code or API reference, the sample was not run, and the model identifier was not checked. Statements about local execution, credentials and fallback are the documentation's own claims.

Alternatives

The page itself names several options. You can use MCPToolset directly through toolsets=[...] for more control than the capability gives, or MCPServerTool as a native tool when you only want provider-side MCP.

The page does not compare other ways to reach MCP servers, such as other agent frameworks' MCP clients or an assistant's built-in MCP support. It mentions Cursor and Claude Desktop as other applications that use MCP, but does not compare them with Pydantic AI. A comparison with other frameworks was not assessed.

Evidence base

The report rests on one captured file, selected-page.txt (4,731 bytes), taken from [https://pydantic.dev/docs/ai/mcp/overview/index.md]. It was captured on 12 November 2026 and covers the whole selected page.

No linked pages, API references, source code, release notes or issue trackers were read. No code or example was run.

Access & freshness

Costs

The page states no prices, licence fees or usage limits, so the cost is unknown from this evidence.

The example uses a model identifier and placeholder MCP server addresses, but the page says nothing about what either costs. Library costs, model-provider costs, MCP-server costs and operating costs are all unknown from this page.

Rights and licence

The captured page has no licence or reuse notice, so the terms for copying or redistributing the documentation or the sample code are unknown. This page also does not state the licence of the Pydantic AI library.

The page links to other material: the MCP site at [https://modelcontextprotocol.io/], a list of MCP servers at [https://github.com/modelcontextprotocol/servers], and Pydantic's Logfire MCP and Run Python MCP servers. These are outside the selected scope, and their terms were not assessed.

Freshness

The page shows no publication date, last-updated date or library version. It was captured on 12 November 2026, so it reflects the page as served at that time. The page does not show how recent the described API is or whether it changed from earlier releases, so treat its recency as unknown.

Check the version of Pydantic AI you use against the linked API reference, because class names and options such as MCP, MCPToolset and MCPServerTool could differ between releases.

Suggested next steps

If you use Pydantic AI, read this page first for orientation. Then open the MCP capability page at [https://pydantic.dev/docs/ai/capabilities/mcp/] for the full set of inputs and options before writing code.

Before connecting an agent to any MCP server, especially a remote or third-party one, review the tools it exposes and the credentials it needs. Try the placeholder pattern in a non-production environment first.

If you plan to use native=True, check which model providers support native MCP, and confirm that the model identifier you use is available to you. Use MCPToolset instead of the capability if you need shared servers or custom client settings.

Evidence for this report

selected-page.txtselected · checked 2026-11-12