Skip to main content

Module proxy

Module proxy 

Source
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                   ProxyClient

The 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§

ProxyClient
MCP client handler for the upstream server connection.
ProxyServer
MCP server handler that proxies requests to an upstream MCP server.