MCP Connect
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
███╗ ███╗ ██████╗██████╗ ██████╗ ██████╗ ███╗ ██╗███╗ ██╗███████╗ ██████╗████████╗
████╗ ████║██╔════╝██╔══██╗ ██╔════╝██╔═══██╗████╗ ██║████╗ ██║██╔════╝██╔════╝╚══██╔══╝
██╔████╔██║██║ ██████╔╝ ██║ ██║ ██║██╔██╗ ██║██╔██╗ ██║█████╗ ██║ ██║
██║╚██╔╝██║██║ ██╔═══╝ ██║ ██║ ██║██║╚██╗██║██║╚██╗██║██╔══╝ ██║ ██║
██║ ╚═╝ ██║╚██████╗██║ ╚██████╗╚██████╔╝██║ ╚████║██║ ╚████║███████╗╚██████╗ ██║
╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═╝
**Lightweight bridge that exposes local MCP servers as HTTP APIs**
---
What Is MCP Connect?
MCP Connect is an HTTP gateway that lets you call local MCP servers (that speak stdio) through Streamable HTTP or a classic request/response bridge.
What's New
- Added Streamable HTTP mode on top of the classic request/response bridge
- New quick-deploy scripts and configs under deploy/e2b for launching in an E2B sandbox
How It Works
**Key Features**
| Feature | Description |
|--------|-------------|
| 🚀 Dual modes | Call local stdio MCP servers via Streamable HTTP or the classic HTTP bridge |
| 🔄 Session management | Maintain conversational continuity with sessions |
| 🔐 Security | Bearer token auth + CORS allowlist |
| 🌐 Public access | Built-in Ngrok tunnel to expose endpoints externally |
| ☁️ Cloud deploy | One-click deploy to E2B cloud sandbox |
---
Quick Start
Prerequisites
- Node.js >= 22.0.0 (recommended)
- npm or yarn
1) Install
2) Preparations
**A. Set up initial environment variables**
Set ACCESS_TOKEN in .env before starting the server. Startup fails if it is empty.
**B. Configure MCP servers**
For Streamable HTTP method, each MCP server needs to be configurated separately, edit file to add more configurations other than the existing sample servers.
3) Run
After you see the startup banner, visit http://localhost:3000/health to check server status.
---
Usage
Mode 1: Streamable HTTP bridge
General-purpose and compatible with any MCP client that supports Streamable HTTP.
In Streamable HTTP mode, each MCP server is assigned a unique route. Example: add the fetch MCP server in mcp-servers.json.
Once started, access the fetch MCP server with your favorite MCP client (e.g. Claude Code, Cursor, Codex, GitHub Copilot...)
Note: You must configure mcp-servers.json before starting the service, otherwise the server won't be available.
---
Mode 2: Classic request/response bridge
Non-standard invocation where you implement methods like tools/list, tools/call, etc.
Include Authorization: Bearer in every request header. ACCESS_TOKEN is required at startup.
Example 1: List available tools
Example 2: Call a tool
Security
Authentication
MCP Connect requires a token-based authentication system. Set ACCESS_TOKEN in .env before startup. If it is empty, the server exits with a configuration error.
Allowed Origins
In production, set ALLOWED_ORIGINS to restrict cross-origin requests:
If ALLOWED_ORIGINS is set, non-matching origins are rejected.
---
API Reference