# Claude MCP Bridge

> Claude MCP Bridge is an open-source MCP server for ai models and llm tooling. Call Claude Code CLI from other MCP clients for queries, web search and JSON output. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/hampsterx/claude-mcp-bridge
- **MCP Registry name:** io.github.hampsterx/claude-mcp-bridge
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add claude-mcp-bridge -- npx -y claude-mcp-bridge
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "claude-mcp-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "claude-mcp-bridge"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "claude-mcp-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "claude-mcp-bridge"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "claude-mcp-bridge": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "claude-mcp-bridge"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "claude-mcp-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "claude-mcp-bridge"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "claude-mcp-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "claude-mcp-bridge"
      ]
    }
  }
}
```

## Tools

- `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

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/claude-mcp-bridge
