Documentation
¶
Overview ¶
Package bridge connects an MCP client that only speaks stdio to a Streamable HTTP MCP endpoint, the shared LeanProxy gateway in practice.
Some clients (Claude Desktop's config file, older IDE plugins) can only start a local command. Pointing them at `server run --stdio` gives each of them its own proxy and its own copy of every upstream server. The bridge is that local command instead: a thin process that owns no upstream server and relays JSON-RPC between the client's stdin/stdout and the gateway.
It relays messages verbatim. It never interprets tool calls or results: every check (redaction, policy, pinning, ...) happens in the gateway.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge relays one stdio client to the gateway.
type Options ¶
type Options struct {
// URL is the gateway's MCP endpoint, e.g. http://127.0.0.1:8765/mcp.
URL string
// Token is the gateway's bearer token; empty for a --no-auth gateway.
Token string
// Client is the HTTP client to use; nil means a client with no overall
// timeout (responses may be long-lived streams).
Client *http.Client
Logger *slog.Logger
}
Options configure a bridge.