codebase-context-mcp
Click on "Install 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-context-mcpsearch for function parseToken"
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-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.
Related MCP server: Acemcp
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
Tool | Description |
| Parse a directory into symbols/chunks, cache as JSON |
| Find functions, classes, types by name or pattern |
| BM25 full-text search across indexed files |
| File structure: functions, classes, imports, exports with line numbers |
| Tech 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-mcpOr 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.jsMCP 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 architectureSearch: BM25 text ranking (pure JS) + symbol name matching
Storage: JSON file index at
~/.codebase-context-mcp/<project-hash>.jsonTransport: MCP stdio via
@modelcontextprotocol/sdkIncremental: Files with unchanged content hash are skipped on re-index
Safety Limits
Limit | Value |
Max files | 20,000 |
Max file size | 512KB |
Default ignores | node_modules, .git, dist, build, .venv, binaries, lock files |
.gitignore | Respected (root level) |
Development
npm install
npm run build # Build with tsup
npm run dev # Watch mode
npm start # Run the serverLicense
MIT
Available Tools
5 toolsget_file_outlineA
Get the structure of a file: functions, classes, imports, exports with line numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Relative path to the file within the project | |
| directory | Yes | Absolute path to the indexed project |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It indicates a read-only operation ('Get') and specifies the output (structure with line numbers), but it does not disclose potential requirements such as the file needing to be indexed, error behavior, or whether the tool reads from a cached index. Basic transparency, but lacking depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that states the action and the expected output. Every word earns its place, with no redundancy or fluff, making it concise and easily scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two required parameters and a clear output specification, the description is largely complete. It explains what the output contains, which is necessary since there is no output schema. However, it could mention that the file must be part of an indexed project, though this is covered by the parameter descriptions. Overall, sufficient for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already fully describes both parameters (filePath and directory) with meaningful descriptions, resulting in 100% schema coverage. The tool description adds no additional parameter semantics beyond what the schema provides, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Get the structure of a file' and lists the specific elements (functions, classes, imports, exports) with line numbers. This distinguishes it from sibling tools like search_symbols or search_code, which focus on searching rather than providing a structural outline.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used when a structural overview of a file is needed, but it does not explicitly state when to use this tool versus alternatives, nor does it mention any exclusions or prerequisites. There is no guidance on when not to use it or how it differs from search_code.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_project_summaryA
Get an overview of an indexed project: tech stack, file counts by language, directory structure.
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes | Absolute path to the indexed project |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of explaining behavior. It discloses what the overview includes and implies a read-only operation. The 'indexed project' requirement provides useful context, though it does not detail error handling for non-indexed or invalid paths.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no wasted words. It conveys the action, resource, and specific content in a clear and efficient manner.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (one parameter, no output schema), the description adequately covers the purpose and expected return contents. It could mention outcomes for non-indexed directories, but overall it is sufficient for agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema fully describes the only parameter (directory) as 'Absolute path to the indexed project' with 100% coverage. The tool description adds no additional param-level insights, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get an overview of an indexed project' and enumerates specific content: tech stack, file counts by language, and directory structure. This distinguishes it from sibling tools that search code or outline individual files, making the purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a project-level overview is needed and mentions the prerequisite that the project must be indexed. It does not explicitly contrast with siblings or list exclusions, but the context is clear enough for an agent to know when to invoke it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
index_codebaseA
Parse a directory into symbols and chunks, building a searchable index. Supports TypeScript, JavaScript, Python, CSS, JSON.
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes | Absolute path to the project root directory to index |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose whether indexing has side effects (e.g., writes files), whether it modifies the directory, or its resource/performance implications. This is a significant transparency gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that is front-loaded with the core action and outcome, followed by supported languages. Every word earns its place; no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description conveys the essential function. However, it omits behavioral context (side effects, whether it must be run before sibling search tools) and does not reference the tool's place in the workflow, making it only minimally complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the parameter 'directory' is adequately described as 'Absolute path to the project root directory to index'. The description adds no additional meaning beyond the schema, which is acceptable given the high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('parse') and resource ('directory into symbols and chunks') and clearly states the outcome ('building a searchable index'). It also lists supported languages, which distinguishes it from sibling search/outline tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage as a precursor to search tools by stating it builds a searchable index, but it does not explicitly say when to use it versus siblings or mention that search tools depend on it. No alternatives or exclusions are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_codeA
BM25 full-text search across all files in an indexed codebase. Returns ranked results with matching lines.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query (keywords or code patterns) | |
| directory | Yes | Absolute path to the indexed project | |
| maxResults | No | Maximum results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the BM25 ranking algorithm, indicates the search is across all files, and specifies the output ('ranked results with matching lines'). This adds meaningful behavioral context beyond the tool name, though it omits error cases or performance implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. The first sentence front-loads the core purpose, and the second covers the output format. Every word contributes useful information, making it appropriately concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, so the description's mention of 'ranked results with matching lines' is valuable. The schema covers parameters, and the description covers core behavior and the indexing prerequisite. However, it does not address what happens if the directory is not indexed or how maxResults behaves, leaving minor gaps. Still sufficient for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for all three parameters (query, directory, maxResults). The description does not add parameter-specific details beyond what the schema already explains; the mention of 'all files' and 'indexed codebase' broadly maps to directory, but this is not a substantial addition. Therefore, baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'BM25 full-text search across all files in an indexed codebase,' which is a specific verb (search) + resource (all files) + scope (indexed codebase). This clearly distinguishes it from sibling tools like search_symbols (which searches symbols) and index_codebase (which indexes).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'in an indexed codebase' implies a prerequisite that index_codebase should be run first, and 'full-text search' signals this is for content-based lookup rather than symbol search. However, it does not explicitly name alternatives or state when not to use the tool, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_symbolsB
Find functions, classes, types, and other symbols by name or pattern in an indexed codebase.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Filter by symbol kind | |
| query | Yes | Symbol name or pattern to search for | |
| directory | Yes | Absolute path to the indexed project | |
| maxResults | No | Maximum results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden but only provides a high-level action. It does not disclose pattern syntax (regex, glob, substring), result format, pagination, or behavior when directory isn't indexed. This is a significant transparency gap for a search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It efficiently communicates the core action and scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is too sparse for a tool with 4 parameters and no output schema. It omits critical context like pattern syntax, return payload expectations, prerequisite indexing, and how it differs from search_code. These gaps would force an agent to guess.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes all 4 parameters with 100% coverage, so the baseline is 3. The description's phrase 'by name or pattern' marginally reinforces the query parameter but adds no new semantic insight beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Find') and resource ('symbols in an indexed codebase'), listing example symbol types. It distinguishes itself from siblings like search_code (which likely searches code content) and index_codebase (which creates the index).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the codebase must be indexed but gives no explicit when-to-use or alternative guidance. It does not reference sibling tools or mention when to prefer symbol search over code search, so usage context is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: indexing, symbol search, full-text search, file outline, and project summary. There is no overlap between tools, so an agent can easily select the right one.
All tool names follow a consistent verb_noun pattern (index_, search_, get_), making the set predictable and easy to navigate.
With five tools, the server is well-scoped for its purpose of providing codebase context. Each tool is necessary and there is no bloat.
The domain of codebase context is well-covered with indexing, two complementary search methods, file outline, and project summary. A tool to fetch full file content would be a minor addition, but the current set is functional and does not have critical gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Ground-truth code graph for your codebase: exact callers, callees, symbols & dependencies.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.MIT
- AlicenseAqualityDmaintenanceEnables semantic code search across codebases with automatic incremental indexing. Searches return relevant code snippets with file paths and line numbers based on natural language queries.1806Apache 2.0
- AlicenseAqualityDmaintenanceEnables fast code analysis and navigation through hybrid semantic search, graph-based relationship tracking, and structure exploration across multiple programming languages with optimized indexing for large codebases.83MIT
- AlicenseNot gradedqualityCmaintenanceProvides IDE-like code navigation and search for local repositories, enabling AI assistants to perform symbol search, trigram indexing, and semantic navigation.AGPL 3.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jhackman2019/codebase-context-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server