Featured answer
Give me an overview of supergateway
supergateway is a command-line tool that runs MCP stdio-based servers over SSE, WebSockets or Streamable HTTP with one command. It is aimed at remote access, debugging, or connecting clients when an MCP server only supports stdio, and it can also serve a remote SSE or Streamable HTTP server over stdio. The package has entry points at src/cli.ts and src/index.ts, and command-line flags choose which mode runs. The src/gateways directory holds one module per conversion, such as stdioToStatefulStreamableHttp.ts, stdioToStatelessStreamableHttp.ts and streamableHttpToStdio.ts, and src/lib/modernHttp.ts is listed among the central hotspot files. Client requests arrive over the chosen transport, pass through the matching gateway module, and responses return to the client, with the tests and scripts directories holding supporting code. For reading, start with src/cli.ts, src/index.ts and then src/gateways, noting the layers by file count: Service with 71 files, Application with 41, Config with 20, and Docs & Tooling with 19.
| Layer | Files |
|---|---|
| Application | 41 |
| Config | 20 |
| Service | 71 |
| Docs & Tooling | 19 |
Basis: Inferred · knowledge graph· as of 5ad19d3