Expand description
MCP proxy server and client handlers.
This module implements the core proxy logic: ProxyServer acts as an MCP
server for Claude (served over stdio), forwarding every request to the
upstream MCP server via ProxyClient. Tool call responses pass through the
FilterEngine before being returned to Claude, compressing JSON payloads
by 60-90%.
§Architecture
Claude <-(stdio)-> ProxyServer <-(child-process)-> upstream MCP server
| ^
FilterEngine ProxyClientThe upstream connection is established lazily: the stdio server starts immediately so Claude Code can complete its MCP handshake, while the upstream connection is initialized in the background.
Structs§
- Proxy
Client - MCP client handler for the upstream server connection.
- Proxy
Server - MCP server handler that proxies requests to an upstream MCP server.