← Back to Blog

pyRPC v0.14.0: The MCP Release

·5 min read

v0.14.0 is the release that turns pyRPC from a code-generation framework into an AI-native surface. Two MCP servers, a distribution CLI, 17 bug fixes, and a test suite that now covers 197 cases at 91%.

Local project MCP

Running pyrpc mcp inside your project spawns a local MCP server over stdio. It imports your configured backend module, walks the live registry, and exposes three tools:

  • introspect_project returns every registered procedure with kind, parameter names, types, requiredness, defaults, docstrings, and full input/output JSON Schemas.
  • check_call validates hypothetical arguments against real Python types without executing anything, returning structured per-parameter errors an agent can act on immediately.
  • run_codegen regenerates client TypeScript through the same pipeline as pyrpc codegen. dry_run=true by default, safe to invoke speculatively.

The server is local-only stdio with no telemetry and no network egress. Agents see your actual routers, schemas, and types, not a generated snapshot.

Remote documentation MCP

A second server lives at mcp.pyrpc.com/mcp and serves pyRPC documentation. Launch it with npx @pyrpc/mcp mcp. It is read-only, requires no authentication, and carries zero access to your project. The agent gets up-to-date docs without leaving the IDE.

Architecture

The two servers serve different purposes and operate under different trust models:

  AI Coding Client (Claude Code / Cursor / VS Code / OpenCode)
  |
  |-- stdio subprocess (local)          HTTP SSE (remote)
  |                                     |
  v                                     v
+----------------------------+    +------------------------+
| Local MCP Server           |    | Remote MCP Server      |
| (pyrpc mcp)                |    | (mcp.pyrpc.com/mcp)   |
|                            |    |                        |
| YOUR machine               |    | pyRPC infrastructure   |
| YOUR Python environment    |    | Read-only docs         |
| YOUR backend module        |    | No auth required       |
| YOUR registry              |    | No access to code      |
|                            |    |                        |
| Tools:                     |    | Tools:                 |
|  introspect_project        |    |  search_docs            |
|  check_call                |    |  get_procedure_ref      |
|  run_codegen               |    |  get_adapter_guide      |
+----------------------------+    +------------------------+

Distribution CLI

The npm package pyrpc wraps the MCP setup process. A single npx pyrpc add-mcp writes the correct configuration to your MCP client config file, whether that is Claude Desktop, Cursor, VS Code, or OpenCode. No manual JSON editing.

Bug fixes and polish

17 bug fixes shipped in this cycle. Highlights include corrected codegen output for optional parameters with complex union types, a fix for the watch command not detecting changes to imported modules, and improved error messages when the backend module cannot be imported. Full details in the changelog.

Test suite

197 tests, 91% line coverage. The MCP server has its own test suite that exercises all three tools against a real FastAPI project with 12 registered procedures. Integration tests verify that the stdio transport handles malformed JSON gracefully and that the server exits cleanly when the parent process disconnects.

Upgrade path

No breaking changes. Bump to v0.14.0, add the MCP extra where you want agent integration, and point your client at uv run pyrpc mcp. The docs gained a dedicated MCP page with copy-paste configuration for every major client.