Connect an agent with MCP
Run claude mcp add xpd -- uvx xpd mcp to expose xpd's 4 MCP tools for API discovery gates and ManimGX animations, alongside workflow prompts and rule and skill resources. Standard lint, audit, search, and ledger commands stay in the agent's shell, and the server delegates every tool call to the matching xpd binary.
Connect a client
Section titled “Connect a client”Add the server to Claude Code with one command (requires uv).
claude mcp add xpd -- uvx xpd mcpFor any other MCP client, add the same launcher under mcpServers.
{ "mcpServers": { "xpd": { "command": "uvx", "args": ["xpd", "mcp"] } }}Use uvx xpd mcp or uv tool install xpd. A binary compiled directly with cargo ships no Python runtime and exits with 2 on xpd mcp.
Available tools
Section titled “Available tools”Browse schemas and live examples in the MCP reference.
| Tool group | Tools | Built on |
|---|---|---|
| Discovery gate | discovery_gate |
xpd api and Python AST inspection |
| Animations | animate_status, animate_render, animate_artifact |
xpd animate |
The server also serves four workflow prompts and rule and skill resources.
Project root and security
Section titled “Project root and security”Every file path passed to a tool must stay inside the resolved project root.
project root resolution├── --root or XPD_MCP_ROOT is set use that folder├── PLUGIN_ROOT is set use the client's first local root from MCP roots└── otherwise use the server's starting working directoryWhen running over HTTP, set a server-side root. Binding a non-loopback --host requires XPD_MCP_AUTH_TOKEN for bearer authentication.
| Flag | Environment variable | Default | Effect |
|---|---|---|---|
--root PATH |
XPD_MCP_ROOT |
Working directory or client root | Sets the project root boundary |
| None | XPD_MCP_AUTH_TOKEN |
Unset | Bearer token for HTTP clients, required on non-loopback hosts |
--transport stdio|http |
FASTMCP_TRANSPORT |
stdio |
Selects stdio or streamable HTTP transport |
--host HOST |
FASTMCP_HOST |
127.0.0.1 |
HTTP bind address |
--port PORT |
FASTMCP_PORT |
8000 |
HTTP bind port |
Serve over HTTP or test from a shell
Section titled “Serve over HTTP or test from a shell”uvx xpd mcp --transport http --port 8000
# Inspect tools, resources, and prompts from a terminaluvx fastmcp list --command 'uvx xpd mcp' --resources --promptsuvx fastmcp call --command 'uvx xpd mcp' --target animate_status --input-json '{}'