Codebase MCP Bridge
Provides tools for interacting with Git repositories, including status and diff inspection, path-scoped staging and committing, and push operations, with risk controls around sensitive files and high-risk actions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codebase MCP Bridgesearch for TODO comments in src, then show the first few matches"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Codebase MCP Bridge
A compact Model Context Protocol server that gives LLM clients (ChatGPT, Claude, Codex, Cursor, Antigravity) controlled access to a source repository: search, read, patch with rollback, Git, and allowlisted validation.
Design rule: the bridge provides capabilities and facts; the model provides workflow and reasoning.
There are no prompts, no workflow macros and no mandatory call sequence, just 16 small tools with hard limits and a server-side security model the model can't talk its way around.
Highlights
Safe edits.
code.patchapplies unified diffs with stale-content checks and takes a rollback snapshot. Every mutation can be undone withcode.rollback, which itself creates an inverse snapshot.Batched, bounded I/O. Up to 10 searches or 10 file/range reads per call, run with bounded concurrency. Each search returns up to 200 matches by default (500 on request). Combined output is capped and truncation is always reported. File discovery is paginated.
Secrets stay out. Search and read skip secret-bearing files. Git operations refuse
.env, private keys and Git internals. The optional audit log (BRIDGE_ENABLE_AUDIT) stores metadata only, never source or full arguments.Operator-controlled trust. The model can list and target workspaces but can't add them. Trust is granted out of band with a CLI.
Validation without a shell.
validation.runruns allowlisted command ids. Its arguments reject shell metacharacters, and output defaults to failures only. Arbitrary shell (command.run) is off unless the operator enables it.Two transports. stdio for local agents; Streamable HTTP with OAuth (dynamic client registration, refresh tokens) for ChatGPT connectors and remote clients. High-risk tools stay blocked over HTTP unless explicitly allowed.
Related MCP server: MCP ToolHub
Tools
Group | Tools | Notes |
Workspace |
|
|
Code |
| Text/regex search and file globbing; incremental lexical symbol cache. |
Edits |
| All mutations snapshot for rollback |
Git |
|
|
Validation |
| Allowlisted checks; |
Typical small fix: code.search → code.read → code.patch → validation.run.
Quick start
npm install
npm run build
node dist/stdio.js # stdio, for local agents
npm run dev # HTTP endpoint at http://localhost:3030/mcpClient setup (Claude, Codex, Cursor, Antigravity, ChatGPT connector over OAuth) is in docs/clients.md. The full tool reference is in docs/reference.md, and tool-selection guidance for models in docs/mcp-instructions.md.
Configuration
Variable | Default | Meaning |
| launch directory | Repository the bridge serves when no |
|
| HTTP port |
|
| OAuth/public issuer URL (set to your tunnel URL) |
|
| Skip OAuth for local HTTP; does not unlock high-risk tools |
|
| Require an OAuth client secret |
|
| Refuse to start when security warnings exist |
| unset | Protect dynamic client registration |
|
| Allow |
|
| Enable |
|
| Raw command output cap |
| unset | Override the validation-command manifest |
All settings, including limits, ripgrep and diagnostics, are listed in .env.example. Trust another repository: npm run workspace -- trust "C:\path\to\repo" my-repo.
Transient data (symbol cache, rollback snapshots, audit log, OAuth state) lives in .ai-bridge/ inside each repository.
Project layout
src/
createBridgeServer.ts tool registration, input schemas and limits
server.ts / stdio.ts HTTP (Express + OAuth) and stdio entry points
workspace-cli.ts operator CLI for trusted workspaces
config/ path allowlist, validation commands, workspace manifest
services/ repo (search/read), indexer (symbols), patches (diff + rollback),
git, policy + security (risk and secret rules), oauth, audit, workspaces
tests/ node:test suites: tool bounds, security, OAuth, patching, git, routing, performanceDevelopment
npm run typecheck
npm test # typecheck + node:test suites
npm run build
npm run lint:scripts # PowerShell syntax check (Windows)License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Git-backed platform for skills, tools, and context for AI agents
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI clients to inspect and carefully edit a bounded local workspace via stdio, with a read-only default, conflict-safe updates, and no network listener or telemetry.102Apache 2.0
- FlicenseAqualityAmaintenanceEnables coding agents to perform workspace-confined file operations, read-only Git inspection, and structured shell commands, while requiring out-of-band human approval for mutations and external executions and maintaining an audit trail.143-
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to safely read, search, understand, and edit local project code and files, with Git inspection, code indexing, and controlled command execution within permissioned workspaces.06MIT
- AlicenseCqualityBmaintenanceLocal-first MCP runtime for coding agents with bounded workspace access, content-preconditioned writes, AST search, LSP navigation and diagnostics, and Git status/diff. Designed to give coding agents useful repository access without treating unrestricted shell access as the default integration boundary.133MIT