Codebase Context MCP logo

Codebase Context MCP

Indexes local codebases with WASM tree-sitter and provides symbol, BM25 text, outline, and project-summary tools over MCP.

Install Codebase Context MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "codebase-context-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codebase-context-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 5 tools correctly ().

Overview

The codebase-context-mcp MCP server indexes local source directories with WebAssembly tree-sitter and exposes code navigation tools over MCP stdio. It stores parsed symbols, chunks, and metadata as JSON, then supports symbol matching, BM25 full-text search, file outlines, and project summaries. WASM and pure-JavaScript components let it run on ARM64 and x86_64 systems without native bindings. Reach for it when an agent needs searchable context from a local codebase, especially on Apple Silicon, Raspberry Pi, or other ARM64 hosts.

Use cases

  • Index a local repository for agent-assisted code navigation
  • Search functions, classes, and types by name or pattern
  • Find matching code with BM25 full-text queries
  • Inspect file structure and project language composition
  • Run codebase indexing on ARM64 development machines

Key features

  • WASM tree-sitter parsing
  • BM25 full-text search
  • Symbol and pattern search
  • JSON-based cached indexes
  • File outlines with line numbers
  • Project summaries by language and directory

Tools5

What Codebase Context MCP lets your agent do. Expand a tool for its parameters.

Verified live~571 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/21 checks healthy over the last 112d

What it can do

From the 5 tools this server returned when we ran it.

Read-only tools · 5
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age265 days
Maintainers1

Observed 2026-11-06 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · codebase-context-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads227Package downloads in the last 30 days.
Last commit9mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Codebase Context MCP works

What codebase-context-mcp MCP server does

The codebase-context-mcp MCP server turns a local project directory into a searchable index for an MCP-compatible AI client. It parses supported source files into symbols and chunks, records file and language information, and exposes the resulting context through five tools. The server is intended for code navigation and repository understanding rather than editing files or executing project commands.

Supported languages are TypeScript, TSX, JavaScript, Python, C#, VB.NET, XML, CSS, and JSON. The project summary reports the detected technology stack, file totals by language, and directory structure. File outlines identify functions, classes, imports, and exports with line numbers.

How it works

The codebase-context-mcp MCP server uses web-tree-sitter and WebAssembly for parsing. Search combines symbol-name matching with a pure-JavaScript BM25 implementation for full-text queries. Because the parser and search implementation do not require native C++ bindings, the package is designed to work on ARM64 and x86_64 hosts, including macOS, Linux, and Windows.

The MCP transport is stdio through the Model Context Protocol SDK. Index data is written as a JSON file under ~/.codebase-context-mcp/, using a project hash in the filename. Re-indexing skips files whose content hash has not changed, which preserves existing index data for unchanged files.

Setup and configuration

Install the package with npm and start it through an MCP client. For Claude Code, the documented command is:

Terminal
claude mcp add codebase-context -s user -- npx codebase-context-mcp

A generic stdio configuration can invoke npx with codebase-context-mcp as its argument. Local development is also supported by cloning the repository, running npm install, building with npm run build, and starting the generated dist/index.js with Node.

Tools and capabilities

The available tools are:

  • index_codebase: Parses a directory into symbols and chunks and caches the result as JSON.
  • search_symbols: Finds functions, classes, and types by name or pattern.
  • search_code: Runs BM25 full-text search across indexed files.
  • get_file_outline: Returns functions, classes, imports, and exports with line numbers for a file.
  • get_project_summary: Reports the technology stack, language file counts, and directory structure.

The indexer respects the root-level .gitignore and ignores common generated or dependency paths by default, including node_modules, .git, dist, build, and .venv. Binary files and lock files are also excluded by the default ignore behavior.

Limitations and notes

The codebase-context-mcp MCP server limits indexing to 20,000 files and skips individual files larger than 512 KB. Its language coverage is limited to the listed parsers, so projects containing other languages may receive incomplete indexing.

The package uses the MIT license. Its documented transport is MCP stdio, and the README specifically provides setup instructions for Claude Code. Other MCP clients may require their own stdio configuration format.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codebase Context MCP

codebase-context-mcp is an MCP server that connects AI clients to a local codebase directory through stdio. Its main tools index projects, search symbols, run BM25 code searches, show file outlines, and summarize project structure, using WASM tree-sitter and JSON index storage.

Install it with npm through an MCP client, such as Claude Code using `claude mcp add codebase-context -s user -- npx codebase-context-mcp`. You can also clone the repository, run `npm install && npm run build`, and configure Node to run `dist/index.js`.

Yes, codebase-context-mcp is designed to run on ARM64 as well as x86_64. It uses WebAssembly tree-sitter parsing and pure-JavaScript BM25 search instead of native bindings, supporting hosts such as Apple Silicon Macs, Raspberry Pi systems, AWS Graviton, macOS, Linux, and Windows.

It supports TypeScript, TSX, JavaScript, Python, C#, VB.NET, XML, CSS, and JSON. Files in other languages are not listed as supported, so indexing may be incomplete for mixed-language projects.

It stores each project index as a JSON file under `~/.codebase-context-mcp/`, with the filename based on a project hash. During re-indexing, files with unchanged content hashes are skipped.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodebase Context MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codebase-context-mcp?style=directory)](https://allmcps.com/mcp/codebase-context-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/codebase-context-mcp"><img src="https://allmcps.com/api/badge/codebase-context-mcp?style=directory" alt="Codebase Context MCP on AllMCPs" /></a>