Supergateway logo

Supergateway

by supercorp-ai

Supergateway runs MCP stdio-based servers over SSE or WebSockets with one command. This is useful for remote access, debugging, or connecting to clients when your MCP server only supports stdio.

View on GitHub

Last updated: N/A

What is Supergateway?

Supergateway is a tool that exposes MCP (Model Context Protocol) stdio servers over SSE (Server-Sent Events) or WebSockets (WS). It allows you to access and interact with MCP servers remotely or connect them to clients that support SSE or WS.

How to use Supergateway?

Supergateway is used via the command line using npx. You specify the MCP server command to run over stdio, and then configure the desired output transport (SSE or WS) and related options like port, base URL, and paths. Example usage: npx supergateway --stdio "uvx mcp-server-git" --port 8000.

Key features of Supergateway

  • Exposes MCP stdio servers over SSE or WebSockets

  • Supports stdio→SSE, SSE→stdio, and stdio→WS modes

  • Configurable port, base URL, and paths

  • Supports headers and OAuth2 Bearer authentication

  • CORS support

  • Health endpoint registration

  • Docker support

Use cases of Supergateway

  • Remote access to MCP servers

  • Debugging MCP servers

  • Connecting MCP servers to web-based clients

  • Integrating remote SSE MCP servers into local command-line environments

  • Sharing local MCP servers publicly using ngrok

  • Integrating with Claude Desktop and Cursor

FAQ from Supergateway

What is MCP?

MCP stands for Model Context Protocol, a standard that standardizes AI tool interactions.

What is stdio?

stdio refers to standard input/output, a common way for programs to communicate with each other.

What is SSE?

SSE stands for Server-Sent Events, a server push technology enabling real-time data updates from a server to a client.

What is WS?

WS stands for WebSockets, a communication protocol providing full-duplex communication channels over a single TCP connection.

How do I enable CORS?

Use the --cors flag. Use --cors with no values to allow all origins, or supply one or more allowed origins (e.g. --cors "http://example.com" or --cors "/example\\.com$/" for regex matching).