PydanticAI talks to Agent Update over MCP. The server is https://api.tryagentupdate.com/v1/mcp, the transport is Streamable HTTP, and the credential is one header.
Setup
# pip install pydantic-ai (v2.x)
import os
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset
toolset = MCPToolset(
"https://api.tryagentupdate.com/v1/mcp",
headers={"Authorization": f"Bearer {os.environ['AGENT_UPDATE_TOKEN']}"},
id="agent_update",
)
agent = Agent("anthropic:claude-opus-4-5", toolsets=[toolset])
async with agent:
print((await agent.run("Text my human that the migration finished.")).output)Before you file a bug
MCPServerStreamableHTTP was **renamed** and does not exist in v2.x. Ship the v1 form only for a pinned <2. headers and http_client are **mutually exclusive**; passing both raises ValueError. auth= accepts a plain bearer-token string, bare, with no prefix. There is no transport= argument — Streamable HTTP is selected because /v1/mcp isn't SSE-shaped. load_mcp_toolsets("mcp.json") reads a Claude-Code-shaped mcpServers file with ${VAR} expansion, and prefixes tools as agent-update_send_message.
Check it worked
Ask the agent to text you. A 401 means the token is wrong, or the word Bearer is in there twice. No tool at all means the transport string is wrong. Both are covered in troubleshooting.
Next
The five tools and their arguments are on the MCP page. The same tools over plain HTTP are on the REST page. Every other tool is on the docs index.