Claude Desktop cannot use this shape. See the
Claude Desktop tab.
from pydantic_ai import Agentfrom pydantic_ai.capabilities import MCPagent = Agent( "anthropic:claude-sonnet-5", capabilities=[ MCP( "https://gateway.vlm.run/mcp", headers={"Authorization": "Bearer <VLMRUN_API_KEY>"}, ) ],)result = agent.run_sync( "Read https://storage.googleapis.com/vlm-data-public-prod/hub/examples/document.invoice/sample-invoice.pdf and tell me the total amount due.")print(result.output)
native=False is the default: Pydantic AI connects and calls the tools. native=True sends the URL to the model provider (OpenAI Responses, Anthropic, xAI), and the provider connects.
Add the server as a custom connector. You sign in with your VLM Run account through OAuth, so you do not need an API key.
Open Settings → Connectors and select Add custom connector.
Enter a name, such as VLM Run, and the URL https://gateway.vlm.run/mcp. Keep the default advanced settings.
Select Connect on the new connector, then sign in to VLM Run.
A connector that you add on claude.ai also shows in Claude Desktop.To use an API key instead, edit the config file. The connector screen cannot send an Authorization header, and the config file only starts local stdio servers. Bridge the server with mcp-remote in claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):
Replace /path/to/node with the directory that holds Node.js. If npx is at /usr/local/bin/npx, use /usr/local. Claude Desktop does not inherit your shell PATH, so set command, PATH, and VLM_AUTH yourself. Node.js 18 or newer is required.
initialize returns server instructions that name each tool. Most clients inject them as the system message, so keep your own steering in the user turn. A second system message breaks strict OpenAI-compatible endpoints.
One POST calls a tool. The server issues no session id, so each request carries its own headers and any replica can answer. Send Accept: application/json, text/event-stream. The reply is a Server-Sent Events stream. The endpoint accepts POST only. GET /mcp returns 405.