mcp -proxy
Converts MCP protocol's SSE transport layer to a standard HTTP request/response.
claude mcp add --transport stdio leizongmin-mcp-server-proxy go install github.com/leizongmin/mcp-server-proxy@latest
How to use
mcp-server-proxy is a proxy that translates the MCP SSE transport into standard HTTP requests/responses. It lets MCP clients connect via SSE to a configured target HTTP endpoint, making it easier to experiment with and observe MCP interactions without needing specialized SSE tooling in the client. The proxy provides two useful commands: inspect, which lets you observe the raw requests and responses between a client and a target, and serve, which starts a proxy that forwards MCP calls to a target HTTP server while exposing them as normal HTTP requests/responses. The example in the repository demonstrates an echo service that handles initialize, tools/list, and tools/call endpoints by translating them into conventional HTTP interactions. To use it, install the binary, run the proxy with a local URL and a target URL, and then configure your MCP client to point at the local proxy URL using the SSE transport type.
How to install
Prerequisites:
- Go toolchain installed (https://golang.org/dl/)
- GOPATH/bin is in your system PATH so the mcp-server-proxy binary can be found after installation
Install the MCP Server Proxy:
# Install the latest release of mcp-server-proxy
go install github.com/leizongmin/mcp-server-proxy@latest
Verify installation:
mcp-server-proxy --version
Usage (examples):
- Inspect mode (observe requests/responses without forwarding):
mcp-server-proxy inspect http://localhost:8080 http://example.com
- Serve mode (start the proxy and forward to the target):
mcp-server-proxy serve http://localhost:8080 http://example.com
Notes:
- Ensure the local URL you pass is reachable by the client, and the target URL is the MCP-enabled HTTP endpoint you want to proxy to.
- The proxy translates MCP SSE calls to standard HTTP requests, so any HTTP client library can be used on the target side.
Additional notes
Tips and common issues:
- If you change the target MCP server, update the proxy's target URL accordingly to maintain connectivity.
- Use the inspect command to debug mismatches between the MCP client's expected protocol and the actual HTTP requests the target receives.
- The proxy currently supports initialize, tools/list, and tools/call as shown in the example; if you extend or customize the target, ensure the HTTP endpoints conform to the expected MCP request/response shapes.
- When running in containerized environments, ensure proper network access between the local proxy URL and the target URL.
- If you encounter permission errors on binary execution, confirm that GOPATH/bin or the Go install path is included in your PATH.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go