Claude MCP Bridge
Call Claude Code CLI from other MCP clients for queries, web search and JSON output
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.7.2
- Listing updated
- today
Similar MCP servers
About Claude MCP Bridge
Claude MCP Bridge is an open-source MCP server for ai models and llm tooling. It runs locally on your machine and is started by your AI client.
This bridge is for clients that cannot run a shell, such as Cursor, Windsurf, Claude Desktop or VS Code, yet want to ask Claude Code a question. It spawns the Claude Code CLI as a subprocess and exposes it as MCP tools. The README is upfront that terminal agents with shell access can simply call the CLI themselves, and lists when the bridge earns its place: no shell, schema-validated output, session resume, concurrency control and cost metadata.
Authentication defaults to your Claude subscription through claude login; API-key billing is opt-in with an environment variable, and an optional per-call budget cap applies to API use. Each subprocess gets an explicit tool set. The defaults are read-only (Read, Glob, Grep for queries, WebSearch and WebFetch for search), withholding Bash, Write and Edit unless you widen them. A fallback model, haiku by default, takes over on quota errors, and up to three subprocesses run at once.
Responses carry metadata such as duration, model, session id, cost and token counts.
Install
Run in a terminal
claude mcp add claude-mcp-bridge -- npx -y claude-mcp-bridgeAdd to claude_desktop_config.json
{
"mcpServers": {
"claude-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"claude-mcp-bridge"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"claude-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"claude-mcp-bridge"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"claude-mcp-bridge": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"claude-mcp-bridge"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"claude-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"claude-mcp-bridge"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"claude-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"claude-mcp-bridge"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
CLAUDE_CLI_PATHPath to the claude CLI binary. Defaults to 'claude' on PATH.CLAUDE_DEFAULT_MODELShared default model for all tools. Overridden by per-tool CLAUDE_<TOOL>_MODEL vars (QUERY, SEARCH, STRUCTURED).CLAUDE_QUERY_MODELOverride model for the query tool.CLAUDE_STRUCTURED_MODELOverride model for the structured tool.CLAUDE_SEARCH_MODELOverride model for the search tool.CLAUDE_FALLBACK_MODELModel to use when the primary model hits a quota error. Set to 'none' to disable fallback.CLAUDE_MAX_CONCURRENTMaximum concurrent Claude CLI subprocesses (default 3).CLAUDE_BRIDGE_USE_API_KEYSet to '1' to forward ANTHROPIC_API_KEY to the CLI. Default is subscription-first: the CLI uses existing Max/Pro session and API key is NOT forwarded. Opt in only if you want API billing.CLAUDE_MAX_BUDGET_USDMaximum USD spend per call (pass-through to --max-budget-usd). Only applies when using API key auth.CLAUDE_QUERY_TOOLSBuilt-in tools the query subprocess may use. Comma or space separated list, 'default' for the CLI's full built-in set, or empty for no tools. The default withholds Bash, Write and Edit; widening it grants real capability in the caller-supplied working directory.CLAUDE_STRUCTURED_TOOLSBuilt-in tools the structured subprocess may use. Same format and caveats as CLAUDE_QUERY_TOOLS.CLAUDE_SEARCH_TOOLSBuilt-in tools the search subprocess may use. Same format and caveats as CLAUDE_QUERY_TOOLS.CLAUDE_QUERY_EFFORTReasoning effort for the query tool (low|medium|high|max).CLAUDE_SEARCH_EFFORTReasoning effort for the search tool (low|medium|high|max).
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
- query
- Execute prompts with file context, session resume, effort control and budget caps
- search
- Web search via the CLI's WebSearch and WebFetch tools
- structured
- JSON Schema validated output
- ping
- Health check with CLI version, auth method and model config
- listSessions
- List active sessions with cost, turn count and timestamps
What it does
- Prompt with file context
- Run a prompt over files or images with effort control and a budget cap.
- Session resume
- Continue a conversation across calls using a session id.
- Web search
- Return a synthesized answer with sources via Claude's WebSearch and WebFetch.
- Schema-validated JSON
- Produce JSON that matches a schema up to 20KB.
- Read-only by default
- Subprocess tools exclude Bash, Write and Edit unless widened.
- Cost metadata
- Surface cost, tokens and duration in every response.
Good for
- Ask Claude a code question from Cursor or VS Code
- Get a second opinion on a file from another agent
- Generate structured JSON from a prompt
- Run a sourced web search from an MCP client without a shell
Pricing
Open source
MIT licence; uses your Claude subscription or API billing
Claude MCP Bridge FAQ
Do I need an Anthropic API key?
No, by default it uses your Claude subscription login; API billing is opt-in.
Can it edit my files?
Not by default; the default tools are read-only.
What clients work?
Any MCP client, including Codex CLI, Gemini CLI, Cursor, Windsurf and VS Code.
Does it need anything installed?
The Claude Code CLI on PATH and Node.js.
Is Claude MCP Bridge free?
Yes. Claude MCP Bridge is open source, so you can use and self-host it for free.
How do I add Claude MCP Bridge to Claude Code?
Run this command in your terminal: claude mcp add claude-mcp-bridge -- npx -y claude-mcp-bridge
What are the best alternatives to Claude MCP Bridge?
The closest alternatives to Claude MCP Bridge are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


