# supergateway

> MCP Server

Supergateway enables running MCP stdio-based servers over SSE or WebSockets, facilitating remote access and debugging with a single command. It supports various configuration options for seamless integration and control.

## Overview

- **Category:** Communication
- **Language:** TypeScript
- **Stars:** 2808
- **Forks:** 47
- **Owner:** supercorp-ai
- **GitHub:** https://github.com/supercorp-ai/supergateway
- **Created:** 2024-12-21T12:23:48+00:00
- **Updated:** 2025-03-28T23:55:59+00:00
- **Source:** https://model-context-protocol.com/servers/run-mcp-servers-over-sse-gateway

## Setup

## Setup
Run Supergateway via `npx`: `npx -y supergateway --stdio "uvx mcp-server-git"`

**Options:**
- **`--stdio "command"`**: Command that runs an MCP server over stdio
- **`--sse "https://mcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app"`**: SSE URL to connect to (SSEâstdio mode)
- **`--outputTransport stdio | sse | ws`**: Output MCP transport (default: `sse` with `--stdio`, `stdio` with `--sse`)
- **`--port 8000`**: Port to listen on (stdioâSSE or stdioâWS mode, default: `8000`)
- **`--baseUrl "http://localhost:8000"`**: Base URL for SSE or WS clients (stdioâSSE mode; optional)
- **`--ssePath "/sse"`**: Path for SSE subscriptions (stdioâSSE mode, default: `/sse`)
- **`--messagePath "/message"`**: Path for messages (stdioâSSE or stdioâWS mode, default: `/message`)
- **`--logLevel info | none`**: Controls logging level (default: `info`). Use `none` to suppress all logs.
- **`--cors`**: Enable CORS (stdioâSSE or stdioâWS mode)
- **`--healthEndpoint /healthz`**: Register one or more endpoints (stdioâSSE or stdioâWS mode; can be used multiple times) that respond with `"ok"`

**stdio â SSE:**
`npx -y supergateway --stdio "npx -y @modelcontextprotocol/server-filesystem ./my-folder" --port 8000 --baseUrl http://localhost:8000 --ssePath /sse --messagePath /message`

**SSE â stdio:**
`npx -y supergateway --sse "https://mcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app"`

**stdio â WS:**
`npx -y supergateway --stdio "npx -y @modelcontextprotocol/server-filesystem ./my-folder" --port 8000 --outputTransport ws --messagePath /message`

**Docker:**
`docker run -it --rm -p 8000:8000 supercorp/supergateway --stdio "npx -y @modelcontextprotocol/server-filesystem /" --port 8000`

## Tools

## Available Tools

1.  **MCP stdio server to SSE server**: Exposes an MCP stdio server as an SSE server.
2.  **SSE server to stdio**: Connects to a remote SSE server and exposes it locally via stdio.
3.  **MCP stdio server to WebSocket server**: Exposes an MCP stdio server as a WebSocket server.
4.  **MCP Inspector Integration**: Allows listing tools, resources, or performing MCP actions via Supergateway.
5.  **ngrok Integration**: Shares your local MCP server publicly using ngrok.
6.  **Docker Support**: Provides a Docker-based workflow to avoid local Node.js setup.
7.  **Claude Desktop Integration**: Allows Claude Desktop to use Supergatewayâs SSEâstdio mode.
8.  **JSON-RPC versioning**: Automatically manages JSON-RPC versioning.
9.  **Package metadata retransmission**: Retransmits package metadata where possible.
10. **Logging**: Provides logging via standard output (stdioâSSE or stdioâWS mode) and stderr (SSEâstdio mode).
