A compiled local MCP proxy that bridges Claude to a remote SSE-based MCP server, bypassing remote tool limitations
Find a file
2026-03-05 22:42:31 +00:00
.forgejo/workflows Fix release step: use Forgejo API directly instead of broken gitea-release-action 2026-03-05 22:42:31 +00:00
go.mod Add go.mod 2026-03-05 22:17:41 +00:00
main.go Add MCP proxy source code 2026-03-05 22:17:36 +00:00
README.md Add full README with build instructions and usage 2026-03-05 22:26:30 +00:00

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

  1. Proxy opens a persistent GET to the SSE URL
  2. Server sends an endpoint event with the POST URL
  3. Proxy POSTs each JSON-RPC request — server returns 202 Accepted
  4. Server sends the response as a message event on the SSE stream, matched by request ID