MCPSERV.CLUB
naotama2002

Mcp Remote Go

MCP Server

Proxy local MCP clients to remote servers with OAuth

Stale(55)
3stars
1views
Updated Aug 14, 2025

About

A lightweight Go tool that bridges local MCP clients using stdio transport to remote MCP servers via Server‑Sent Events, supporting OAuth authentication and customizable headers.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

MCP Remote for Go bridges the gap between local Model Context Protocol (MCP) clients and remote MCP servers that expose their capabilities over Server‑Sent Events (SSE). By running a lightweight proxy written in Go, developers can keep the familiar stdio‑based workflow of tools like Claude Desktop or Cursor while still accessing powerful remote resources, APIs, or custom prompts hosted elsewhere. This solves the practical problem of deploying a single instance of an MCP server in a secure, centralized environment and letting multiple local assistants tap into it without each needing to implement network communication or authentication logic.

The proxy forwards every request from the local client over a standard input/output stream to an SSE endpoint on the remote server. It then streams responses back to the client in real time, preserving the low‑latency interaction that MCP clients expect. Authentication is handled transparently via OAuth; the proxy manages token acquisition, renewal, and storage in a local directory, so users only need to provide the server URL (and optionally custom headers). For trusted internal networks, the proxy can also accept plain HTTP connections. This design keeps security tight while remaining flexible enough for diverse deployment scenarios.

Key capabilities include:

  • Transparent OAuth integration – the proxy automatically performs the OAuth dance, stores tokens locally, and refreshes them when needed.
  • Custom header support – users can inject arbitrary headers such as bearer tokens or API keys, making it compatible with a wide range of authentication schemes.
  • Docker‑friendly deployment – the binary can be run inside a container with minimal configuration, and volumes can persist OAuth credentials across restarts.
  • Port customization for callback handling – developers can specify a local port that the remote server uses to redirect back after authentication, simplifying network setups.

Typical use cases span from enterprise environments where a central MCP server hosts proprietary models and data to personal workflows that require accessing a remote API through an MCP client. For example, a developer can run the proxy on a workstation and configure Claude Desktop to use it as an MCP server, thereby enabling the assistant to query a remote database or invoke a specialized inference service without exposing those resources directly over the internet. Similarly, Cursor users can point their local editor to a remote MCP instance that aggregates multiple tools, providing a unified interface for code generation and execution.

By offloading network communication, authentication, and SSE handling to a dedicated proxy, developers can focus on designing rich MCP tools while ensuring that all assistants—whether desktop or web‑based—interact with remote services in a secure, consistent, and low‑latency manner.