# codebase-context-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/Jhackman2019/codebase-context-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 227  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/codebase-context-mcp

## Description
Codebase indexing and search via WASM tree-sitter. Works on ARM64 and x86_64.

## Tools
Capabilities this server exposes over MCP:

- **index_codebase** — Parse a directory into symbols and chunks, building a searchable index. Supports TypeScript, JavaScript, Python, CSS, JSON.
- **search_symbols** — Find functions, classes, types, and other symbols by name or pattern in an indexed codebase.
- **search_code** — BM25 full-text search across all files in an indexed codebase. Returns ranked results with matching lines.
- **get_file_outline** — Get the structure of a file: functions, classes, imports, exports with line numbers.
- **get_project_summary** — Get an overview of an indexed project: tech stack, file counts by language, directory structure.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

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

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

_Full upstream README: https://allmcps.com/mcp/codebase-context-mcp/readme_

