简介
MCP BridgeKit 解决 stdio 与 HTTP 的协议错配:在后端运行 MCP server 子进程并提供 HTTP 接口给 Web 使用,同时用 Dashboard 监控会话与任务。
最适合: 需要 MCP 工具的 Web Chatbot、多租户工具接入、以及长耗时工具调用
适配: Python 3.11+;作业/会话依赖 Redis(README 提到 Redis);可部署到 Vercel
配置时间: 20–40 分钟
关键事实(已验证)
- README 表格提到 Vercel/Cloudflare 30s 超时,并用后台任务处理慢调用。
- README 表格提到会话池与“最多 100 并发”会话的场景说明。
- GitHub:60 stars · 14 forks;最近更新 2026-02-23(GitHub API 验证)。
正文
当你把 MCP 工具做成“产品能力”时,BridgeKit 主要解决三件难事:
- 隔离:按用户会话运行,避免不同客户的工具状态互相污染。
- 超时:把慢调用变成队列任务,先返回 job id,再由客户端轮询/流式获取状态。
- 运维:通过 Dashboard 观察活跃会话、任务积压与工具清单,方便故障期间快速定位问题。
README 原文节选(verbatim)
MCP BridgeKit
Embeddable MCP stdio → HTTP bridge for web chatbots.
Turn any MCP stdio server into HTTP endpoints your web app can call. Per-user session pooling, real timeout handling with background job fallback, live dashboard.
Table of Contents
- What Is MCP BridgeKit?
- The Problem It Solves
- Use Cases & Scenarios
- Architecture
- Request Flow
- Key Features
- Quickstart
- Docker (Recommended)
- One-Click Deploy (Vercel)
- API Reference
- Concurrency Model
- Configuration
- Security (Auth & Rate Limiting)
- Push Notifications (Webhook & SSE)
- Connecting to Any MCP Server
- Embedding in Your App
- Project Structure
- TypeScript Version
- End-to-End Testing Guide
- Horizontal Scaling
- Full Architecture Docs
- License
What Is MCP BridgeKit?
MCP (Model Context Protocol) is an open standard that lets AI applications connect to external tools and data sources. MCP servers communicate over stdio (stdin/stdout) — which means they run as local subprocesses and speak JSON-RPC over pipes.
The problem: Web applications (React, Next.js, Vue, mobile apps) can't spawn local subprocesses. They only speak HTTP. There's a protocol mismatch.
MCP BridgeKit is the bridge. It sits between your web app and MCP stdio servers, translating HTTP requests into stdio subprocess calls and streaming results back:
Your Web App ──HTTP──▶ MCP BridgeKit ──stdio──▶ MCP Server (tool)
(this project)FAQ
为什么浏览器不能直接调 MCP? 答:浏览器无法运行 stdio 子进程;BridgeKit 用 HTTP ↔ stdio 做桥接。
慢工具怎么办? 答:README 描述了后台任务回退机制,规避 30s 网关超时。
怎么发现可用工具?
答:README 提到 GET /tools/{user_id} 的实时发现接口。