Purpose: MCP-Connect is a lightweight HTTP gateway/bridge that allows cloud AI services to access local Stdio-based MCP servers via HTTP requests, exposing local MCP capabilities as an HTTP API.
Key capabilities:
- Provides two modes: Streamable HTTP bridging, and classic request/response bridging.
- Streamable HTTP mode assigns a separate route to each MCP server and is compatible with any MCP client that supports Streamable HTTP, such as Claude Code, Cursor, Codex, GitHub Copilot.
- Classic mode uses a non-standard invocation approach, where the client implements methods such as tools/list and tools/call.
- Token authentication: ACCESS_TOKEN is required; if empty at startup, it will fail and exit; requests must include Authorization: Bearer <token>.
- Cross-origin restrictions: in production, ALLOWED_ORIGINS can be set; non-matching origins will be rejected.
- Health check endpoint http://localhost:3000/health,无需认证。
- Supports exposing a public address via Ngrok, supports quick deployment in the E2B sandbox, and provides logging and monitoring configuration.
Usage: Environment and startup:
- Requires Node.js >= 22.0.0 (recommended).
- Set ACCESS_TOKEN in .env; if empty, the server will exit with a configuration error.
- Configure MCP servers before startup. In Streamable HTTP mode, each MCP server must be configured separately; you can add them in mcp-servers.json by referring to the existing example servers; if not configured before startup, the corresponding server will be unavailable.
- After startup, visit http://localhost:3000/health to check server status.
Mode 1: Streamable HTTP bridging:
- General mode, compatible with any MCP client that supports Streamable HTTP.
- Each MCP server has a unique route. Example: after adding the fetch MCP server in mcp-servers.json, it can be accessed with an MCP client.
- Endpoint: POST /mcp/:serverId; serverId is the server ID defined in MCP_SERVERS.
- Request headers: Authorization: Bearer <token> (required); Accept: application/json, text/event-stream (required); mcp-session-id: <session-id> (optional, used to reuse an existing session).
Mode 2: Classic request/response bridging:
- Non-standard invocation approach; the client needs to implement methods such as tools/list and tools/call.
- Each request header must include Authorization: Bearer <token>; Content-Type: application/json.
- Supported methods: tools/list, tools/call; prompts/list, prompts/get; resources/list, resources/read; resources/subscribe, resources/unsubscribe; completion/complete; logging/setLevel.
Public exposure:
- Expose via Ngrok: at https://dashboard.ngrok.com/get-started/your-authtoken get a token, add NGROK_AUTH_TOKEN = your-token-here to .env, and run npm run start:tunnel. The console will display the Tunnel URL and MCP Bridge URL, for example https://abc123.ngrok.io and https://abc123.ngrok.io/bridge。
E2B Sandbox Deployment:
- Quick deployment scripts and configuration are provided under deploy/e2b for launching in an E2B sandbox. E2B provides isolated cloud sandboxes, suitable for securely running untrusted MCP servers.
- Steps: prepare the E2B environment, optionally set a bearer token for the bridge (E2B deployments preferably set it via environment variables); build the sandbox template; launch from the template. See the E2B deployment guide in the repository for details.
Logging and Monitoring:
- combined.log records all levels; error.log records only the error level; control log verbosity via LOG_LEVEL.
Use Cases:
- Cloud AI services need to access local Stdio MCP servers.
- Expose local MCP servers as HTTP APIs to remote MCP clients.
- Run untrusted MCP servers in isolated E2B sandboxes.
- Development or deployment environments that require token authentication, cross-origin restrictions, and public network access.
Limitations and Missing Information:
- ACCESS_TOKEN must be set, otherwise the service cannot start.
- In Streamable HTTP mode, mcp-servers.json must be configured before startup, otherwise the corresponding servers are unavailable; each MCP server must be configured separately.
- The classic bridge uses non-standard calls, and clients must implement the methods as agreed.
- In production environments, ALLOWED_ORIGINS should be set to restrict cross-origin requests.
- The materials do not provide information such as pricing/fees, license, performance metrics, the full list of supported operating systems, or SLA.