OPEN-SOURCE MCP INFRASTRUCTURE

Connect your localcodebase to anyAI assistant.

CodeMCP is the controlled bridge between your local project and MCP-compatible AI clients. Give an assistant project-scoped tools, authenticated access, and real context without giving up the keys.

Local-first Permission-aware MIT licensed
01 / THE BRIDGE

AI can only work with what it can reach.

CodeMCP makes your project available through a standard MCP interface. It keeps the project local, makes access explicit, and gives the client structured tools for the work you actually want it to do.

01Local codebaseyour project / source / context
02
ACTIVE BRIDGE
CodeMCPCodeMCP
controlled MCP server
03MCP clientcompatible AI assistant
Live Inspector: CodeMCP Server & GuardCONTROLLED BRIDGE

Sandboxed JSON-RPC server evaluating every incoming assistant call.

  • Intercepts write_file, edit_file, and execute_command calls
  • Interactive human-in-the-loop terminal approval prompts
  • Transports via local stdio or authenticated HTTP/SSE stream
PROTOCOL FRAMEstdio / JSON-RPC
// JSON-RPC 2.0 validation in flight
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": { "name": "read_file", "path": "src/auth.ts" },
  "policy": "VERIFIED_SAFE"
}
02 / START HERE

One command.
Your project stays yours.

Run CodeMCP from the project you want an AI assistant to understand. No hosted index. No migration. The server exposes the local context you choose.

npx codemcp
Requires Node.js and an MCP-compatible client
codemcp — terminal
$npx codemcp
CodeMCP Project Agent (MCP)
Project:@mahesh2-lab/codemcp (mahesh2-lab-codemcp)
Root:C:\Users\azure\Documents\projects\CodeMCP
Config:codemcp.json
Permission:Read & Write
Approval:Enabled (Ask before changes)
Context:CONTEXT.md
Local URL:http://localhost:4173/mcp
Global URL:https://xxxx-xxxx-xxxx.ngrok-free.app/mcp
Waiting for AI client requests...
03 / WHAT IT EXPOSES

Project context,
as tools.

CodeMCP gives an assistant a small, legible surface area for working with a real codebase.

Explore and search

List files, find paths, read source, and search the codebase for keywords or patterns. The assistant can build an understanding before it proposes a change.

$ search_code "permission"
src/services/approval.js:12

Create and edit

Write, edit, and delete project files through explicit filesystem tools with permission and approval checks.

Run commands

Execute project commands inside the sandbox when policy allows it.

Project rules

Use CONTEXT.md, project metadata, and session memory to keep assistants aligned with your codebase.

04 / CONTROL THE CHANGE

Nothing touches disk
by surprise.

When approval is required, a write becomes a visible proposal. Inspect the diff, then decide whether it should reach your filesystem.

FILE CHANGE REQUESTwrite_file
src/config.ts +2 −1
- const mode = "open"
+ const mode = "approval"
+ export const allowWrites = false
05 / SECURITY MODEL

Boundaries you can
reason about.

Path-guarded accessPaths are resolved and constrained to the configured project. Traversal outside it is rejected.
Protected pathsSensitive paths, including credential locations, are protected from tool access, including .env, .git, .ssh, and vault files.
Encrypted credentialsCredentials are stored outside the project in an AES-256-GCM vault tied to the local machine and user profile.
06 / REFERENCE

Everything an assistant
needs to know.

Read the surface area. Configure the context. Connect the client.

MCP TOOLS

Small interface, clear intent.

8 tools
07 / PROJECT CONTEXT

Put your rules
in the room.

A CONTEXT.md file lets you provide project-specific rules and knowledge alongside the source. It is part of the context CodeMCP makes available.

See the CLI reference
CONTEXT.mdproject root
# Project context
Use TypeScript for new files.
Run pnpm test before proposing a change.
Do not edit generated files in /dist.
read by CodeMCP
Available to the MCP client as project context
08 / CONFIGURATION

Make the boundary
explicit.

Use codemcp.json to describe how this project should be exposed. The file lives in your project.

{
  "id": "my-project",
  "name": "My project",
  "permission": "both",
  "approval": true,
  "contextFile": "CONTEXT.md"
}
09 / CONNECT

Bring your own
MCP client.

CodeMCP speaks MCP over local stdio or Streamable HTTP. Connect a compatible client with a project-scoped configuration and OAuth when the endpoint is remote.

Local processRemote tunnel
MCP CLIENT CONFIG

Start CodeMCP as a local server.

Point your client at the command that starts the server in the project you want to expose.

{ "command": "npx", "args": ["codemcp"] }
10 / QUESTIONS

Clear answers for
careful builders.

Does CodeMCP upload my project?

CodeMCP is designed to run locally and expose the configured project through an MCP server. It does not upload project contents to a hosted indexing service; remote access is an optional tunnel to your running server.

Can an assistant change files?

Yes. File creation, editing, and deletion are exposed as tools, and changes can require explicit approval through the configured permission and approval settings.

What is CONTEXT.md for?

It provides project-specific rules and knowledge so an MCP client can work with the conventions of your codebase.

Can I use a remote web client?

Yes. CodeMCP can expose a local Streamable HTTP endpoint through an optional ngrok HTTPS tunnel. Remote clients authenticate through the documented OAuth 2.0 and PKCE flow.

The shortest path from
intent to context.

Install CodeMCP and let your AI client work with the project that is actually on your machine.