# mcp-bridgekit — MCP stdio-to-HTTP Bridge + Dashboard > Expose any MCP stdio server as HTTP endpoints for web apps, with per-user session pooling and background jobs to survive 30s timeouts (Vercel/Cloudflare). ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash # Example API calls from README (local dev) curl -X POST localhost:8000/chat \ -d '{"user_id":"dev-1","tool_name":"query_db","tool_args":{"sql":"SELECT 1"}}' + +curl localhost:8000/tools/dev-1 +``` ## Intro MCP BridgeKit solves the stdio/HTTP mismatch: it runs MCP servers as subprocesses and makes them callable from browsers and web backends, while providing a live dashboard for sessions and jobs. **Best for:** Web chatbots that need MCP tools, multi-tenant tool access, and long-running tool calls **Works with:** Python 3.11+; Redis for jobs/sessions (README mentions Redis); deployable to Vercel **Setup time:** 20–40 minutes ### Key facts (verified) - README table cites 30s gateway timeouts (Vercel/Cloudflare) and uses background jobs to handle slow tool calls. - Supports session pooling and notes “up to 100 concurrent” sessions in README problem table. - GitHub: 60 stars · 14 forks; pushed 2026-02-23 (GitHub API verified). ## Main If you’re turning MCP tools into a product surface, BridgeKit helps with three hard parts: - **Isolation:** run per-user sessions so one customer’s tool state can’t bleed into another’s. - **Timeouts:** turn slow calls into queued jobs; return a job id and let the client poll/stream status. - **Ops:** use the dashboard to observe active sessions, job backlog, and tool inventory during incidents. ### README excerpt (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. ![Version](https://img.shields.io/badge/version-0.9.0-blue) [![MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE) ![Python](https://img.shields.io/badge/python-3.11+-blue) [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmkbhardwas12%2Fmcp-bridgekit&env=MCP_BRIDGEKIT_REDIS_URL&envDescription=Redis%20connection%20URL%20for%20session%20and%20job%20storage&envLink=https%3A%2F%2Fgithub.com%2Fmkbhardwas12%2Fmcp-bridgekit%23configuration&project-name=mcp-bridgekit&repository-name=mcp-bridgekit) --- ## Table of Contents - [What Is MCP BridgeKit?](#what-is-mcp-bridgekit) - [The Problem It Solves](#the-problem-it-solves) - [Use Cases & Scenarios](#use-cases--scenarios) - [Architecture](#architecture) - [Request Flow](#request-flow) - [Key Features](#key-features) - [Quickstart](#quickstart) - [Docker (Recommended)](#docker-recommended) - [One-Click Deploy (Vercel)](#one-click-deploy-vercel) - [API Reference](#api-reference) - [Concurrency Model](#concurrency-model) - [Configuration](#configuration) - [Security (Auth & Rate Limiting)](#security-auth--rate-limiting) - [Push Notifications (Webhook & SSE)](#push-notifications-webhook--sse) - [Connecting to Any MCP Server](#connecting-to-any-mcp-server) - [Embedding in Your App](#embedding-in-your-app) - [Project Structure](#project-structure) - [TypeScript Version](#typescript-version) - [End-to-End Testing Guide](#end-to-end-testing-guide) - [Horizontal Scaling](#horizontal-scaling) - [Full Architecture Docs](#-full-architecture-docs) - [License](#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 **Q: Why not call MCP tools directly from the browser?** A: Browsers can’t spawn stdio subprocesses; BridgeKit bridges HTTP ↔ stdio. **Q: What about slow tools?** A: README describes background-job fallback to avoid 30s gateway timeouts. **Q: How do I discover tools?** A: README mentions a live `GET /tools/{user_id}` endpoint for discovery. ## Source & Thanks > Source: https://github.com/mkbhardwas12/mcp-bridgekit > License: MIT > GitHub stars: 60 · forks: 14 --- ## 快速使用 ```bash # README 的本地调用示例 curl -X POST localhost:8000/chat \ -d '{"user_id":"dev-1","tool_name":"query_db","tool_args":{"sql":"SELECT 1"}}' + +curl localhost:8000/tools/dev-1 +``` ## 简介 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. ![Version](https://img.shields.io/badge/version-0.9.0-blue) [![MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE) ![Python](https://img.shields.io/badge/python-3.11+-blue) [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmkbhardwas12%2Fmcp-bridgekit&env=MCP_BRIDGEKIT_REDIS_URL&envDescription=Redis%20connection%20URL%20for%20session%20and%20job%20storage&envLink=https%3A%2F%2Fgithub.com%2Fmkbhardwas12%2Fmcp-bridgekit%23configuration&project-name=mcp-bridgekit&repository-name=mcp-bridgekit) --- ## Table of Contents - [What Is MCP BridgeKit?](#what-is-mcp-bridgekit) - [The Problem It Solves](#the-problem-it-solves) - [Use Cases & Scenarios](#use-cases--scenarios) - [Architecture](#architecture) - [Request Flow](#request-flow) - [Key Features](#key-features) - [Quickstart](#quickstart) - [Docker (Recommended)](#docker-recommended) - [One-Click Deploy (Vercel)](#one-click-deploy-vercel) - [API Reference](#api-reference) - [Concurrency Model](#concurrency-model) - [Configuration](#configuration) - [Security (Auth & Rate Limiting)](#security-auth--rate-limiting) - [Push Notifications (Webhook & SSE)](#push-notifications-webhook--sse) - [Connecting to Any MCP Server](#connecting-to-any-mcp-server) - [Embedding in Your App](#embedding-in-your-app) - [Project Structure](#project-structure) - [TypeScript Version](#typescript-version) - [End-to-End Testing Guide](#end-to-end-testing-guide) - [Horizontal Scaling](#horizontal-scaling) - [Full Architecture Docs](#-full-architecture-docs) - [License](#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}` 的实时发现接口。 ## 来源与感谢 > Source: https://github.com/mkbhardwas12/mcp-bridgekit > License: MIT > GitHub stars: 60 · forks: 14 --- Source: https://tokrepo.com/en/workflows/mcp-bridgekit-mcp-stdio-to-http-bridge-dashboard Author: MCP Hub