Agent harnesses

Connect Pydantic AI

Pydantic · MIT

SupportedOAuth 2.1API key

Type-safe Python agent framework with the cleanest OAuth story in the SDK ecosystem — auth='oauth' runs the whole interactive flow.

1 · Choose the MCPs to connect

2 · How should it authenticate?

3 · Python

from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset

deepinsights_mospi = MCPToolset("https://marketplace-gateway-pef65a33ta-el.a.run.app/mospi/mcp", auth="oauth")
agent = Agent("anthropic:claude-sonnet-5", toolsets=[deepinsights_mospi])
  1. 1.OAuth: auth='oauth' opens the sign-in on first run and caches the token.
  2. 2.API key: pass your mk_… key as the auth value.

4 · Create it as an app

Save this harness + MCP setup to your account. You get a workbench with a live test chat over the combined tool surface — the exact gateway endpoints, auth and tools Pydantic AI will use, metered to your own quota.

5 · Or test each MCP on its own

Each playground's Chat and Tools pages exercise exactly the tools your harness will see — same servers, same gateway. Verify a query there first, then run it from Pydantic AI.

Agent harnesses