
Claude Mcp Bridge
io.github.hampsterx由 GitHub 帳號 hampsterx 發布v0.7.2更新於 Oct 24, 2026
Wraps Claude Code CLI as MCP tools: query, search, structured, ping, listSessions.
發布方自己的服務:Claude Platform Docs
概覽
把 Claude Code CLI 包裝成 MCP 工具,讓助理執行 Claude 提示、網路搜尋與符合 schema 的 JSON 輸出,並支援工作階段續接與費用上限。
- 可以做什麼
- 帶檔案內容與圖片執行提示,可續接工作階段、調整推理強度並設定預算上限
- 透過 Claude 的 WebSearch 與 WebFetch 工具上網搜尋,回傳附來源的綜合答案
- 依指定的 JSON Schema 產生結構化輸出
- 檢查 CLI 版本、驗證方式與模型設定
- 列出進行中的工作階段及其輪次與累計費用
- 每次回應都附上耗時、模型、工作階段 ID 與 token 用量等中繼資料
- 適用情境
- 適合 MCP 用戶端沒有 shell 存取權(例如 Cursor、Windsurf、VS Code、Claude Desktop)但仍想使用 Claude Code 能力的情況,或需要結構化 JSON、可續接的工作階段、並行控制與單次呼叫費用上限時。具備 shell 的終端代理可直接呼叫 CLI。
- 執行需求
- 透過 npx 在本機執行,需要已安裝 Claude Code CLI 並位於 PATH(或以 CLAUDE_CLI_PATH 指定)。驗證方式為 Claude 訂閱登入(預設),或僅在 CLAUDE_BRIDGE_USE_API_KEY 設為 1 時轉送 ANTHROPIC_API_KEY。選用變數可調整模型、推理強度、並行數與預算。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Claude Mcp Bridge,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
claude-mcp-bridge
[npm version] [npm downloads] [CI] [License: MIT] [Node.js] [TypeScript] [MCP] [Available on CodeGuilds]
MCP server that wraps Claude Code CLI as a subprocess, exposing its capabilities as Model Context Protocol tools.
Works with any MCP client: Codex CLI, Gemini CLI, Cursor, Windsurf, VS Code, or any tool that speaks MCP.
Do you need this?
If you're in a terminal agent (Codex CLI, Gemini CLI) with shell access, call Claude Code CLI directly:
--bare skips hooks, memory, and plugins for clean subprocess use. --tools restricts which tools Claude can use at all; --allowed-tools only pre-approves permission and leaves everything else, including Bash, still reachable. --max-budget-usd prevents runaway costs.
--tools is variadic, so end the list with -- (or another flag) before the prompt. Without it the prompt is read as one more tool name and the CLI exits with "Input must be provided".
For code review, see Code review with this CLI.
Use this MCP bridge instead when:
- Your client has no shell access (Cursor, Windsurf, Claude Desktop, VS Code)
- You need structured output with native
--json-schemavalidation - You need session resume across calls (
--resume SESSION_ID) - You need concurrency management and security hardening
- You want cost metadata surfaced in MCP responses
Quick Start
Prerequisites
- Claude Code CLI installed and on PATH
- Authentication (one of):
- Subscription (default):
claude login(uses your Pro/Max plan, no API credits needed) - API key: set
ANTHROPIC_API_KEY+CLAUDE_BRIDGE_USE_API_KEY=1(billed per use via console.anthropic.com)
- Subscription (default):
Codex CLI
Add to ~/.codex/config.json:
Gemini CLI
Add to ~/.gemini/settings.json:
Cursor / Windsurf / VS Code
Add to your MCP settings:
Tools
query
Execute a prompt with optional file context. Supports session resume via sessionId, effort control (low/medium/high/max), and budget caps (maxBudgetUsd). Images (.png, .jpg, .gif, .webp, .bmp) up to 5MB each are passed to Claude's Read tool.
Key parameters: prompt (required), files, model (default sonnet), sessionId, effort, maxBudgetUsd, workingDirectory, timeout (default 60s).
search
Web search powered by Anthropic's WebSearch tool via Claude CLI. Returns synthesized answers with source URLs.
Key parameters: query (required), model (default sonnet), maxResponseLength, maxBudgetUsd, timeout (default 120s).
structured
Generate JSON conforming to a provided schema using Claude CLI's native --json-schema flag. Returns clean JSON in the first content block, metadata in a separate block so JSON parsing isn't broken.
Key parameters: prompt (required), schema (required, JSON string, max 20KB), files, model (default sonnet), sessionId, maxBudgetUsd, timeout (default 60s).
ping
No parameters. Returns CLI version, auth method (subscription/api-key/none), configured models, capabilities, and server version.
listSessions
No parameters. Returns active sessions with metadata: sessionId, model, createdAt, lastUsedAt, turnCount, totalCostUsd.
All tools attach execution metadata (_meta) with durationMs, model, sessionId, totalCostUsd, and token breakdowns. See DESIGN.md for details.
Configuration
Models
Model resolution: explicit parameter > tool-specific env var > CLAUDE_DEFAULT_MODEL > built-in default.
Runtime
Effort
Tools
Each spawned subprocess gets an explicit built-in toolset. The defaults are read-only, so Bash, Write and Edit are not granted unless you widen them below.
Accepts a comma or space separated list, default for the CLI's full built-in set, or an empty value for no tools. Widening these gives the subprocess real capability in the working directory you pass it. See SECURITY.md § Tool Sandboxing.
Choosing a Claude Code MCP server
Performance
Claude Code CLI has minimal startup overhead. Wall time is dominated by model inference and any agentic exploration.
Cost metadata (totalCostUsd, token breakdowns) is returned in _meta on every response.
Bridge family
Two MCP servers, same architecture, different underlying CLIs. Each wraps a terminal agent as a subprocess and exposes it as MCP tools. Pick the one that matches your model provider, or run both for cross-model workflows.
Both share: subprocess env isolation, path sandboxing, output redaction, FIFO concurrency queue, MCP tool annotations, _meta response metadata, progress heartbeats.
Code review with this CLI
The reviewer prompt is supplied by the caller. The bridge does not bundle review prompts (see ADR-001).
- In Claude Code (interactive REPL): use the built-in
/review,/security-review,/ultrareview. REPL-only; not reachable viaclaude -por this bridge. - Through this bridge (
query/structured): pass the review prompt as plain text. Slash commands (built-in or user-installed~/.claude/commands/) do not resolve through the bridge, the isolation flags (--bareon the API-key path,--setting-sources ""on the subscription path) block all skill resolution by design. Tracked upstream: anthropics/claude-code#37207. - Direct
claude -p(no bridge): user skills resolve as/skill-namewhen no isolation flags suppress them. For subprocess-isolated review use the hardened invocation below.
Route based on where you are:
- Already in Claude Code? Type
/review,/security-review, or/ultrareview. Skip the rest of this section. - Calling from another MCP host (Cursor, Codex CLI, Gemini CLI, Claude Desktop)? Slash commands and skills are not reachable through the bridge. Pass your review prompt as plain text to
query/structured, or invokeclaude -pdirectly per below.
Direct claude -p invocation (subprocess-isolated)
For shell-equipped consumers (terminal agents, CI, BYOS skills), invoke the CLI directly with hardened isolation flags:
--permission-mode plan: read-only.--bare: strips parent's hooks, plugins, auto-memory, andCLAUDE.mdautoload.--add-dir <repo-root>: makes the repo'sCLAUDE.md/AGENTS.mdavailable where the diff warrants it.--strict-mcp-config --mcp-config '{"mcpServers":{}}': blocks parent's MCP servers from leaking in. The innermcpServerskey is required; the schema rejects bare'{}'.--no-session-persistence: no session files for one-off reviews.--max-budget-usd: per-call cost cap.
Claude Code skill template
For Claude Code users who want a reusable command, drop this into ~/.claude/commands/review-claude.md:
Representative review prompt
A starting point; adapt freely:
Development
Further reading
- DESIGN.md - Architecture, sessions, cost tracking, response metadata, progress notifications
- SECURITY.md - Environment isolation, path sandboxing, output redaction, tool sandboxing
- CHANGELOG.md - Release history
License
MIT
來源:README.md,提交 de2b9b1
工具
0版本歷史
2- v0.7.2最新Oct 18, 2026
- v0.7.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Claude 整合
Claude Platform Docs
com.claude.platform官方發布者
遠端 MCP 伺服器,讓助理搜尋並閱讀 Claude 平台文件與 API 參考。

Insta Edits for Claude
由 GitHub 帳號 faisalkhanzemi 發布
讓 Claude 驅動 Mac 版 Instagram Edits 完整 274 個工具編輯器的橋接服務,並隨專案開啟同步工具清單。

Claude Checkpoint Mcp
由 GitHub 帳號 daniel-munoz 發布
本機 MCP 伺服器,把 Claude Code 工作階段的狀態存成專案內的 JSON 檔,並能還原成精簡的續接摘要。

Qwen DAP MCP — C/C++ Debugger for Claude Code, Codex & Qwen
由 GitHub 帳號 spk-c 發布
通過 GDB、LLDB 和 MCP 為 Claude Code、Codex 和 Qwen 提供 C/C++ 崩潰、掛起和轉儲除錯AI 翻譯

AVE for Claude Code — Local Video Editing
由 GitHub 帳號 lemberalla 發布
僅適用於 Claude Code 的本機 AVE 時間軸編輯與匯出。需要現有 AVE 連接。AI 翻譯