supergateway  by supercorp-ai

AI gateway for MCP stdio servers over SSE/WS

created 7 months ago
1,875 stars

Top 23.6% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Supergateway bridges Model Context Protocol (MCP) stdio servers with web-based clients by acting as a transport layer. It allows users to expose local MCP stdio servers as Server-Sent Events (SSE) or WebSockets (WS) endpoints, or conversely, to connect to remote SSE/WS MCP servers and expose them locally via stdio. This is particularly useful for remote access, debugging, and integrating MCP services into web applications or other environments that don't directly support stdio.

How It Works

Supergateway leverages Node.js to manage the communication protocols. It can either spawn an MCP server process locally and pipe its stdio to an SSE or WS stream, or it can connect to a remote SSE/WS endpoint and pipe the data to a local stdio process. This dual functionality is achieved through command-line flags that specify the input (stdio or SSE URL) and output (stdio, SSE, or WS) transports, along with configuration for ports, paths, and authentication headers.

Quick Start & Requirements

  • Primary install/run command: npx -y supergateway
  • Prerequisites: Node.js (for npx), Docker (optional, for containerized execution).
  • Links:
    • Usage examples: README
    • Docker image: supercorp/supergateway on Docker Hub and GHCR.

Highlighted Details

  • Supports both stdio-to-SSE/WS and SSE/WS-to-stdio conversion.
  • Enables remote access via tools like ngrok.
  • Integrates with AI development tools like Claude Desktop and Cursor.
  • Handles JSON-RPC versioning and package metadata retransmission.

Maintenance & Community

  • Active contributors listed in the README.
  • Contributions (Issues and PRs) are welcomed.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive MIT license allows for commercial use and integration into closed-source projects.

Limitations & Caveats

The README notes a potential Cursor bug with spaces in command-line arguments when passing Authorization headers, recommending the --oauth2Bearer flag as a workaround.

Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
4
Star History
805 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.