| .forgejo/workflows | ||
| go.mod | ||
| main.go | ||
| README.md | ||
Claude MCP Local Proxy
A lightweight compiled proxy that bridges Claude to a remote SSE-based MCP server, solving the problem where remote MCP connections expose fewer tools than a locally-run server.
The Problem
When Claude connects to an MCP server remotely over SSE, it suffers from tool discovery limitations — tools available when the server runs locally simply do not appear. This proxy fixes that.
How It Works
Claude (stdio) <──> mcp-proxy.exe (local) <──> Remote MCP Server (SSE/HTTP)
The proxy runs locally so Claude sees a full stdio server. It forwards everything to your remote SSE server transparently.
Environment Variables
| Variable | Required | Description |
|---|---|---|
REMOTE_MCP_URL |
Yes | URL to the remote SSE endpoint e.g. http://myserver:9090/forgejo/sse |
REMOTE_MCP_TOKEN |
No | Bearer token if your server requires auth |
MCP_DEBUG |
No | Set true to write a debug.log next to the EXE |
Claude Config
{
"mcpServers": {
"my-server": {
"command": "C:\\path\\to\\mcp-proxy.exe",
"env": {
"REMOTE_MCP_URL": "http://your-host:port/forgejo/sse",
"REMOTE_MCP_TOKEN": "",
"MCP_DEBUG": "false"
}
}
}
}
Building from Source
Requires Go 1.22+ from https://go.dev/dl/
# Windows amd64 (from any platform)
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o mcp-proxy.exe .
# Windows ARM64 (Surface etc)
GOOS=windows GOARCH=arm64 go build -ldflags="-s -w" -o mcp-proxy-arm64.exe .
# Linux
go build -ldflags="-s -w" -o mcp-proxy .
# macOS
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o mcp-proxy-mac .
The -ldflags="-s -w" strips debug symbols, keeping the binary around 5MB with no runtime dependencies.
Releases
Pre-built Windows binaries are on the Releases page, built automatically by the Forgejo Actions workflow when a version tag is pushed.
git tag v1.0.0
git push origin v1.0.0
Debug Logging
With MCP_DEBUG=true a debug.log appears next to the EXE showing every request Claude sends, every POST to the remote, and every SSE message received. Sessions are separated by a === session started === marker.
SSE Transport Protocol
- Proxy opens a persistent GET to the SSE URL
- Server sends an
endpointevent with the POST URL - Proxy POSTs each JSON-RPC request — server returns 202 Accepted
- Server sends the response as a
messageevent on the SSE stream, matched by request ID