Invite-only.
Connect

Pydantic AI

Pydantic AI's MCPServerStreamableHTTP class wraps any remote MCP server with typed tool calls. Drop Dock into an Agent and you get fully-typed Dock tool invocations.

Client
Pydantic AI
Typed agent framework. First-class MCP client.
HTTP JSON-RPC (streamable-http)
Dock MCP
trydock.ai/api/mcp
37 tools · OAuth 2.1 + DCR · Bearer
Auth path
1
Mint a dk_ key in Dock Settings → API keys.
2
Paste it as Authorization: Bearer dk_… in the client config.
3
Client calls Dock MCP directly on every request.

Prerequisites

  • Python 3.10+.
  • pydantic-ai-slim[mcp] installed.
  • A Dock dk_ key.
agent.pypython
import os
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStreamableHTTP

dock = MCPServerStreamableHTTP(
    url="https://trydock.ai/api/mcp",
    headers={"Authorization": f"Bearer {os.environ['DOCK_API_KEY']}"},
)

agent = Agent(
    "anthropic:claude-opus-4-7",
    mcp_servers=[dock],
)

async with agent.run_mcp_servers():
    result = await agent.run("List my Dock workspaces.")
    print(result.data)

Troubleshooting

Symptom
Fix
Agent raises on tool schema validation
Pydantic AI validates tool schemas strictly. If Dock returns an extra field Pydantic doesn't expect, upgradepydantic-ai to the latest (schema handling relaxed mid-2025).

Related