mcpField
C
codebase-context-mcp

codebase-context-mcp

Local
github.com/Jhackman2019Developer Tools0Updated 37w ago

About codebase-context-mcp

codebase-context-mcp is an MCP server for indexing and searching codebases, including on ARM64 systems. It uses WASM parsing, pure-JavaScript BM25 search, and JSON indexes instead of native bindings.

Key features

  1. 01Index code into symbols and chunks
  2. 02Search symbols and code with BM25
  3. 03Show file outlines with line numbers
  4. 04Summarize stacks and directory structure
  5. 05Skip unchanged files on re-index

Use cases

  1. 01Search symbols across an indexed repository
  2. 02Inspect a file's functions, imports, and exports
  3. 03Review a project's languages and directory layout
  4. 04Index codebases on ARM64 hosts

MCP support

The server uses the standard MCP stdio transport and exposes indexing, symbol and code search, file outline, and project summary tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"jhackman2019-codebase-context": {
"command": "npx",
"args": [
"-y",
"codebase-context-mcp"
]
}
}
}
Run commandnpx -y codebase-context-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcodebase-context-mcp1.0.1

Tools

5

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
directorystringYesAbsolute path to the project root directory to index

Details

From the project README

codebase-context-mcp

MCP server for codebase indexing and search that works on every platform — including ARM64 devices like Raspberry Pi and Apple Silicon where most alternatives fail.

The Problem

Popular codebase-indexing MCP servers like @zilliz/claude-context-mcp depend on native C++ bindings (tree-sitter, faiss-node) that ship pre-built binaries only for x86_64. If you're on ARM64 — a Raspberry Pi, Apple Silicon Mac, AWS Graviton, or any other arm64 host — npm install fails with missing prebuilts and no fallback. There's no workaround short of cross-compiling the native modules yourself.

The Solution

This package replaces every native dependency with a WASM equivalent. The tree-sitter parser runs as WebAssembly, search uses a pure-JS BM25 implementation, and the index is stored as plain JSON. Zero native bindings means npm install succeeds on the first try on any architecture: ARM64, x86_64, macOS, Linux, Windows.

Drop-in compatible — provides the same core tools (index, search, outline, summary) via the standard MCP stdio transport.

Tools

ToolDescription
index_codebaseParse a directory into symbols/chunks, cache as JSON
search_symbolsFind functions, classes, types by name or pattern
search_codeBM25 full-text search across indexed files
get_file_outlineFile structure: functions, classes, imports, exports with line numbers
get_project_summaryTech stack, file counts by language, directory structure

Supported Languages

TypeScript, TSX, JavaScript, Python, C#, VB.NET, XML, CSS, JSON

Install

Claude Code (recommended)
claude mcp add codebase-context -s user -- npx codebase-context-mcp

Or from a local clone:

git clone https://github.com/Jhackman2019/codebase-context-mcp.git
cd codebase-context-mcp
npm install && npm run build
claude mcp add codebase-context -s user -- node /path/to/codebase-context-mcp/dist/index.js
MCP Settings (JSON)
{
  "mcpServers": {
    "codebase-context": {
      "command": "npx",
      "args": ["codebase-context-mcp"]
    }
  }
}

How It Works

  • Parsing: web-tree-sitter (WASM) — same AST quality as native tree-sitter, runs on any architecture
  • Search: BM25 text ranking (pure JS) + symbol name matching
  • Storage: JSON file index at ~/.codebase-context-mcp/<project-hash>.json
  • Transport: MCP stdio via @modelcontextprotocol/sdk
  • Incremental: Files with unchanged content hash are skipped on re-index

Safety Limits

LimitValue
Max files20,000
Max file size512KB
Default ignoresnode_modules, .git, dist, build, .venv, binaries, lock files
.gitignoreRespected (root level)

Development

npm install
npm run build    # Build with tsup
npm run dev      # Watch mode
npm start        # Run the server

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.