Skip to main content
Pydantic AI connects to SAN with MCPToolset from pydantic_ai.mcp. Attach it to any Agent through the toolsets argument.

Prerequisites

  • Python 3.10+
  • A SAN API key
    Create one in the API Quickstart if you don’t have one yet.

Quick Start

1

Install Pydantic AI with the MCP extra

2

Point a toolset at SAN

A URL without an /sse suffix uses streamable HTTP. Pass your key in headers.
On Pydantic AI 1.x this was a separate class, MCPServerStreamableHTTP. Version 2.0 replaced the per-transport server classes with the unified MCPToolset — the url and headers arguments work the same, though some defaults changed.
3

Run an agent with SAN's tools

Pass the toolset via toolsets and open the agent to manage the connection.