Supergateway — Bridge MCP Servers via SSE and HTTP
Run any MCP stdio server over SSE or HTTP transport. Supergateway bridges local MCP servers for remote access, enabling cloud deployment and multi-client sharing.
What it is
Supergateway is a bridge that converts any MCP server using stdio transport into an SSE (Server-Sent Events) or HTTP server. This enables remote access to local MCP servers, cloud deployment, and sharing a single MCP server across multiple AI clients.
Supergateway targets AI developers who need to run MCP servers remotely rather than locally, or who want to share one MCP server instance across multiple AI agents or clients.
How it saves time or tokens
Without Supergateway, MCP servers using stdio transport only work locally with a single client process. Supergateway removes this limitation, letting you deploy MCP servers on a cloud VM and connect from anywhere. Token estimate for this workflow is approximately 3800 tokens.
How to use
- Run Supergateway wrapping any stdio MCP server:
npx -y supergateway --stdio 'npx -y @modelcontextprotocol/server-filesystem .'
- The MCP server is now accessible at
http://localhost:8000/sse.
- Point your AI client to the SSE endpoint instead of spawning the MCP server locally.
Example
# Wrap the filesystem MCP server
npx -y supergateway --stdio 'npx -y @modelcontextprotocol/server-filesystem /home/user/projects'
# Wrap the SQLite MCP server on a custom port
npx -y supergateway --port 9000 --stdio 'npx -y @modelcontextprotocol/server-sqlite /path/to/db.sqlite'
# Connect from a remote client
# In your MCP client config, use:
# transport: sse
# url: http://your-server:8000/sse
Related on TokRepo
- MCP Integrations -- MCP server configurations for databases
- AI Tools for Agents -- Agent frameworks and MCP tooling
Common pitfalls
- Supergateway exposes MCP servers over HTTP without authentication by default. Add a reverse proxy with auth for any non-local deployment.
- SSE connections can be dropped by load balancers with short timeout settings. Configure your proxy to allow long-lived connections.
- Some MCP servers rely on filesystem paths relative to the client. When running remotely via Supergateway, ensure paths reference the server filesystem, not the client.
Frequently Asked Questions
Supergateway supports SSE (Server-Sent Events) and HTTP transport. SSE is the default and provides real-time streaming. HTTP mode uses request-response pairs for simpler integrations.
Each Supergateway instance wraps one MCP server. To expose multiple servers, run multiple Supergateway instances on different ports.
No. Supergateway does not include built-in authentication. For production deployments, place it behind a reverse proxy like Nginx or Caddy with authentication configured.
Supergateway adds minimal overhead as it simply proxies stdio to HTTP/SSE. The bottleneck is the underlying MCP server performance, not the transport layer.
Any MCP server that uses stdio transport works with Supergateway. This includes the official Anthropic MCP servers for filesystem, SQLite, GitHub, and all community-built stdio MCP servers.
Citations (3)
- Supergateway GitHub— Supergateway bridges MCP stdio servers to SSE and HTTP
- MCP Specification— Model Context Protocol specification for tool integration
- MDN Web Docs— Server-Sent Events specification for real-time streaming
Related on TokRepo
Source & Thanks
Created by Supercorp. Licensed under MIT.
supercorp-ai/supergateway — 1k+ stars