[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73829":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},73829,"supergateway","supercorp-ai\u002Fsupergateway","supercorp-ai","Run MCP stdio servers over SSE and SSE over stdio. AI gateway.","",null,"TypeScript",2675,225,18,40,0,9,20,58,27,29.06,"MIT License",false,"main",true,[],"2026-06-12 02:03:18","![Supergateway: Run stdio MCP servers over SSE and WS](https:\u002F\u002Fraw.githubusercontent.com\u002Fsupercorp-ai\u002Fsupergateway\u002Fmain\u002Fsupergateway.png)\n\n**Supergateway** runs **MCP stdio-based servers** over **SSE (Server-Sent Events)** or **WebSockets (WS)** with one command. This is useful for remote access, debugging, or connecting to clients when your MCP server only supports stdio.\n\nSupported by [Supermachine](https:\u002F\u002Fsupermachine.ai) (hosted MCPs), [Superinterface](https:\u002F\u002Fsuperinterface.ai), and [Supercorp](https:\u002F\u002Fsupercorp.ai).\n\n## Installation & Usage\n\nRun Supergateway via `npx`:\n\n```bash\nnpx -y supergateway --stdio \"uvx mcp-server-git\"\n```\n\n- **`--stdio \"command\"`**: Command that runs an MCP server over stdio\n- **`--sse \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\"`**: SSE URL to connect to (SSE→stdio mode)\n- **`--streamableHttp \"https:\u002F\u002Fmcp-server.example.com\u002Fmcp\"`**: Streamable HTTP URL to connect to (StreamableHttp→stdio mode)\n- **`--outputTransport stdio | sse | ws | streamableHttp`**: Output MCP transport (default: `sse` with `--stdio`, `stdio` with `--sse` or `--streamableHttp`)\n- **`--port 8000`**: Port to listen on (stdio→SSE or stdio→WS mode, default: `8000`)\n- **`--baseUrl \"http:\u002F\u002Flocalhost:8000\"`**: Base URL for SSE or WS clients (stdio→SSE mode; optional)\n- **`--ssePath \"\u002Fsse\"`**: Path for SSE subscriptions (stdio→SSE mode, default: `\u002Fsse`)\n- **`--messagePath \"\u002Fmessage\"`**: Path for messages (stdio→SSE or stdio→WS mode, default: `\u002Fmessage`)\n- **`--streamableHttpPath \"\u002Fmcp\"`**: Path for Streamable HTTP (stdio→Streamable HTTP mode, default: `\u002Fmcp`)\n- **`--stateful`**: Run stdio→Streamable HTTP in stateful mode\n- **`--sessionTimeout 60000`**: Session timeout in milliseconds (stateful stdio→Streamable HTTP mode only)\n- **`--header \"x-user-id: 123\"`**: Add one or more headers (stdio→SSE, SSE→stdio, or Streamable HTTP→stdio mode; can be used multiple times)\n- **`--oauth2Bearer \"some-access-token\"`**: Adds an `Authorization` header with the provided Bearer token\n- **`--logLevel debug | info | none`**: Controls logging level (default: `info`). Use `debug` for more verbose logs, `none` to suppress all logs.\n- **`--cors`**: Enable CORS (stdio→SSE or stdio→WS mode). Use `--cors` with no values to allow all origins, or supply one or more allowed origins (e.g. `--cors \"http:\u002F\u002Fexample.com\"` or `--cors \"\u002Fexample\\\\.com$\u002F\"` for regex matching).\n- **`--healthEndpoint \u002Fhealthz`**: Register one or more endpoints (stdio→SSE or stdio→WS mode; can be used multiple times) that respond with `\"ok\"`\n\n## stdio → SSE\n\nExpose an MCP stdio server as an SSE server:\n\n```bash\nnpx -y supergateway \\\n    --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem .\u002Fmy-folder\" \\\n    --port 8000 --baseUrl http:\u002F\u002Flocalhost:8000 \\\n    --ssePath \u002Fsse --messagePath \u002Fmessage\n```\n\n- **Subscribe to events**: `GET http:\u002F\u002Flocalhost:8000\u002Fsse`\n- **Send messages**: `POST http:\u002F\u002Flocalhost:8000\u002Fmessage`\n\n## SSE → stdio\n\nConnect to a remote SSE server and expose locally via stdio:\n\n```bash\nnpx -y supergateway --sse \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\"\n```\n\nUseful for integrating remote SSE MCP servers into local command-line environments.\n\nYou can also pass headers when sending requests. This is useful for authentication:\n\n```bash\nnpx -y supergateway \\\n    --sse \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\" \\\n    --oauth2Bearer \"some-access-token\" \\\n    --header \"X-My-Header: another-header-value\"\n```\n\n## Streamable HTTP → stdio\n\nConnect to a remote Streamable HTTP server and expose locally via stdio:\n\n```bash\nnpx -y supergateway --streamableHttp \"https:\u002F\u002Fmcp-server.example.com\u002Fmcp\"\n```\n\nThis mode is useful for connecting to MCP servers that use the newer Streamable HTTP transport protocol. Like SSE mode, you can also pass headers for authentication:\n\n```bash\nnpx -y supergateway \\\n    --streamableHttp \"https:\u002F\u002Fmcp-server.example.com\u002Fmcp\" \\\n    --oauth2Bearer \"some-access-token\" \\\n    --header \"X-My-Header: another-header-value\"\n```\n\n## stdio → Streamable HTTP\n\nExpose an MCP stdio server as a Streamable HTTP server.\n\n### Stateless mode\n\n```bash\nnpx -y supergateway \\\n    --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem .\u002Fmy-folder\" \\\n    --outputTransport streamableHttp \\\n    --port 8000\n```\n\n### Stateful mode\n\n```bash\nnpx -y supergateway \\\n    --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem .\u002Fmy-folder\" \\\n    --outputTransport streamableHttp --stateful \\\n    --sessionTimeout 60000 --port 8000\n```\n\nThe Streamable HTTP endpoint defaults to `http:\u002F\u002Flocalhost:8000\u002Fmcp` (configurable via `--streamableHttpPath`).\n\n## stdio → WS\n\nExpose an MCP stdio server as a WebSocket server:\n\n```bash\nnpx -y supergateway \\\n    --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem .\u002Fmy-folder\" \\\n    --port 8000 --outputTransport ws --messagePath \u002Fmessage\n```\n\n- **WebSocket endpoint**: `ws:\u002F\u002Flocalhost:8000\u002Fmessage`\n\n## Example with MCP Inspector (stdio → SSE mode)\n\n1. **Run Supergateway**:\n\n```bash\nnpx -y supergateway --port 8000 \\\n    --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem \u002FUsers\u002FMyName\u002FDesktop\"\n```\n\n2. **Use MCP Inspector**:\n\n```bash\nnpx @modelcontextprotocol\u002Finspector\n```\n\nYou can now list tools, resources, or perform MCP actions via Supergateway.\n\n## Using with ngrok\n\nUse [ngrok](https:\u002F\u002Fngrok.com\u002F) to share your local MCP server publicly:\n\n```bash\nnpx -y supergateway --port 8000 --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem .\"\n\n# In another terminal:\nngrok http 8000\n```\n\nngrok provides a public URL for remote access.\n\nMCP server will be available at URL similar to: https:\u002F\u002F1234-567-890-12-456.ngrok-free.app\u002Fsse\n\n## Running with Docker\n\nA Docker-based workflow avoids local Node.js setup. A ready-to-run Docker image is available here:\n[supercorp\u002Fsupergateway](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fsupercorp\u002Fsupergateway). Also on GHCR: [ghcr.io\u002Fsupercorp-ai\u002Fsupergateway](https:\u002F\u002Fgithub.com\u002Fsupercorp-ai\u002Fsupergateway\u002Fpkgs\u002Fcontainer\u002Fsupergateway)\n\n### Using the Official Image\n\n```bash\ndocker run -it --rm -p 8000:8000 supercorp\u002Fsupergateway \\\n    --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem \u002F\" \\\n    --port 8000\n```\n\nDocker pulls the image automatically. The MCP server runs in the container’s root directory (`\u002F`). You can mount host directories if needed.\n\n#### Images with dependencies\n\nPull any of these pre-built Supergateway images for various dependencies you might need.\n\n- **uvx**\n  Supergateway + uv\u002Fuvx, so you can call `uvx` directly:\n\n  ```bash\n  docker run -it --rm -p 8000:8000 supercorp\u002Fsupergateway:uvx \\\n    --stdio \"uvx mcp-server-fetch\"\n  ```\n\n- **deno**\n  Supergateway + Deno, ready to run Deno-based MCP servers:\n  ```bash\n  docker run -it --rm -p 8000:8000 supercorp\u002Fsupergateway:deno \\\n    --stdio \"deno run -A jsr:@omedia\u002Fmcp-server-drupal --drupal-url https:\u002F\u002Fyour-drupal-server.com\"\n  ```\n\n### Building the Image Yourself\n\nUse provided Dockerfile:\n\n```bash\ndocker build -f docker\u002Fbase.Dockerfile -t supergateway .\n\ndocker run -it --rm -p 8000:8000 supergateway --stdio \"npx -y @modelcontextprotocol\u002Fserver-filesystem .\"\n```\n\n## Using with Claude Desktop (SSE → stdio mode)\n\nClaude Desktop can use Supergateway’s SSE→stdio mode.\n\n### NPX-based MCP Server Example\n\n```json\n{\n  \"mcpServers\": {\n    \"supermachineExampleNpx\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"supergateway\",\n        \"--sse\",\n        \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\"\n      ]\n    }\n  }\n}\n```\n\n### Docker-based MCP Server Example\n\n```json\n{\n  \"mcpServers\": {\n    \"supermachineExampleDocker\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"supercorp\u002Fsupergateway\",\n        \"--sse\",\n        \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\"\n      ]\n    }\n  }\n}\n```\n\n## Using with Cursor (SSE → stdio mode)\n\nCursor can also integrate with Supergateway in SSE→stdio mode. The configuration is similar to Claude Desktop.\n\n### NPX-based MCP Server Example for Cursor\n\n```json\n{\n  \"mcpServers\": {\n    \"cursorExampleNpx\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"supergateway\",\n        \"--sse\",\n        \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\"\n      ]\n    }\n  }\n}\n```\n\n### Docker-based MCP Server Example for Cursor\n\n```json\n{\n  \"mcpServers\": {\n    \"cursorExampleDocker\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"supercorp\u002Fsupergateway\",\n        \"--sse\",\n        \"https:\u002F\u002Fmcp-server-ab71a6b2-cd55-49d0-adba-562bc85956e3.supermachine.app\"\n      ]\n    }\n  }\n}\n```\n\n**Note:** Although the setup supports sending headers via the `--header` flag, if you need to pass an Authorization header (which typically includes a space, e.g. `\"Bearer 123\"`), you must use the `--oauth2Bearer` flag due to a known Cursor bug with spaces in command-line arguments.\n\n## Why MCP?\n\n[Model Context Protocol](https:\u002F\u002Fspec.modelcontextprotocol.io\u002F) standardizes AI tool interactions. Supergateway converts MCP stdio servers into SSE or WS services, simplifying integration and debugging with web-based or remote clients.\n\n## Advanced Configuration\n\nSupergateway emphasizes modularity:\n\n- Automatically manages JSON-RPC versioning.\n- Retransmits package metadata where possible.\n- stdio→SSE or stdio→WS mode logs via standard output; SSE→stdio mode logs via stderr.\n\n## Additional resources\n\n- [Superargs](https:\u002F\u002Fgithub.com\u002Fsupercorp-ai\u002Fsuperargs) - provide arguments to MCP servers during runtime.\n\n## Contributors\n\n- [@longfin](https:\u002F\u002Fgithub.com\u002Flongfin)\n- [@griffinqiu](https:\u002F\u002Fgithub.com\u002Fgriffinqiu)\n- [@folkvir](https:\u002F\u002Fgithub.com\u002Ffolkvir)\n- [@wizizm](https:\u002F\u002Fgithub.com\u002Fwizizm)\n- [@dtinth](https:\u002F\u002Fgithub.com\u002Fdtinth)\n- [@rajivml](https:\u002F\u002Fgithub.com\u002Frajivml)\n- [@NicoBonaminio](https:\u002F\u002Fgithub.com\u002FNicoBonaminio)\n- [@sibbl](https:\u002F\u002Fgithub.com\u002Fsibbl)\n- [@podarok](https:\u002F\u002Fgithub.com\u002Fpodarok)\n- [@jmn8718](https:\u002F\u002Fgithub.com\u002Fjmn8718)\n- [@TraceIvan](https:\u002F\u002Fgithub.com\u002FTraceIvan)\n- [@zhoufei0622](https:\u002F\u002Fgithub.com\u002Fzhoufei0622)\n- [@ezyang](https:\u002F\u002Fgithub.com\u002Fezyang)\n- [@aleksadvaisly](https:\u002F\u002Fgithub.com\u002Faleksadvaisly)\n- [@wuzhuoquan](https:\u002F\u002Fgithub.com\u002Fwuzhuoquan)\n- [@mantrakp04](https:\u002F\u002Fgithub.com\u002Fmantrakp04)\n- [@mheubi](https:\u002F\u002Fgithub.com\u002Fmheubi)\n- [@mjmendo](https:\u002F\u002Fgithub.com\u002Fmjmendo)\n- [@CyanMystery](https:\u002F\u002Fgithub.com\u002FCyanMystery)\n- [@earonesty](https:\u002F\u002Fgithub.com\u002Fearonesty)\n- [@StefanBurscher](https:\u002F\u002Fgithub.com\u002FStefanBurscher)\n- [@tarasyarema](https:\u002F\u002Fgithub.com\u002Ftarasyarema)\n- [@pcnfernando](https:\u002F\u002Fgithub.com\u002Fpcnfernando)\n- [@Areo-Joe](https:\u002F\u002Fgithub.com\u002FAreo-Joe)\n- [@Joffref](https:\u002F\u002Fgithub.com\u002FJoffref)\n- [@michaeljguarino](https:\u002F\u002Fgithub.com\u002Fmichaeljguarino)\n\n## Contributing\n\nIssues and PRs welcome. Please open one if you encounter problems or have feature suggestions.\n\n## Tests\n\nSupergateway is tested with the Node Test Runner.\n\nTo run the suite locally you need Node **24+**. Using [nvm](https:\u002F\u002Fgithub.com\u002Fnvm-sh\u002Fnvm) you can install and activate it with:\n\n```bash\nnvm install 24\nnvm use 24\nnpm install\nnpm run build\nnpm test\n```\n\nThe `tests\u002Fhelpers\u002Fmock-mcp-server.js` script provides a local MCP server so all\ntests run without network access.\n\n## License\n\n[MIT License](.\u002FLICENSE)\n","Supergateway 是一个用于通过SSE（Server-Sent Events）或WebSocket运行基于stdio的MCP服务器的AI网关。其核心功能包括将仅支持stdio通信的MCP服务器转换为可通过SSE或WebSocket访问的服务，极大地简化了远程访问和调试过程。项目使用TypeScript编写，支持多种配置选项，如自定义端口、设置CORS策略以及控制日志级别等。适用于需要为现有的MCP服务器提供网络接口但不希望更改原有代码库的情况下，特别适合于开发环境中的快速测试与部署场景。",2,"2026-06-11 03:47:33","high_star"]