Codebase Context MCP

Codebase Context gives an agent a repository map, ranked code search, symbol references and project memory through MCP and a CLI

  • 68 ★ on the repository
  • Last commit
MCP server

Minimal access

Why this level

  • Indexes code locally and writes data into the project's .codebase-context folder
  • Code snippets the client returns may go to its model provider
All reasons and checks

patricksys/codebase-context

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/codebase-context

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • Indexes code locally and writes data into the project's .codebase-context folder
  • Code snippets the client returns may go to its model provider

This is third-party code. Review the repository files before installing.

What it does

Codebase Context indexes a repository locally so an agent can inspect it before editing. Through MCP and a CLI it exposes a repository map with structure, detected patterns and example files, ranked search with sources and match-quality information, symbol references and file relationships. Symbol references show static identifier occurrences and are not a runtime call graph. Import and re-export links cover TypeScript and JavaScript, and Python and Go import navigation is not supported. Dedicated analyzers exist for Angular, React, Next.js and NestJS. The remember and get_memory tools store and return a project's conventions, decisions and failures. The memory file can be committed, while the index is better kept out of git. codebase-context-review builds a bounded packet from a committed diff but does not review code itself. Fresh beta indexes use keyword search without downloading embedding models, and semantic mode is opt-in and needs LanceDB. The client starts the server over stdio, and the init wizard writes registrations for Claude Code, Codex, Cursor and OpenCode. As of 4 November 2026 npm beta points to 2.3.1-beta.0 while latest stays 2.2.0.

Who it is for. Developers whose agents in Claude Code, Codex, Cursor or OpenCode edit large repositories and first need to find the right files and conventions.

Good fit when

  • In an unfamiliar repository you need to find where a feature is implemented before changing anything
  • You want the structure, patterns and example files before narrowing the task
  • The agent needs symbol references and import links in a TypeScript project
  • A team's conventions and reasons for decisions should be stored in memory.json next to the code
  • A review needs a bounded context packet from a committed diff

Not a fit when

  • You need a runtime call graph: symbol references here are static
  • The project is Python or Go and you need import links: navigation for them is not supported
  • Node.js 22 or newer cannot be installed: the beta requires it
  • You want an automated code reviewer: codebase-context-review only builds context

Example request

Use Codebase Context to find where report export is implemented in this project and open the relevant files

MCP

Transport
stdio
Authentication
not required

Limitations

  • The beta 2.3.1-beta.0 needs Node.js 22 or newer. Pick it explicitly with npx -y codebase-context@2.3.1-beta.0, since a bare npx -y codebase-context may resolve 2.2.0.
  • Semantic indexing is opt-in and needs LanceDB, and local provider models download separately.
  • Low search confidence means weak matching evidence, and the implementation may still exist, so open and read the code found.
  • Angular, React, Next.js and NestJS have dedicated analyzers, and other files use the generic analyzer.
  • The AI client may send returned code to its own model provider, which the server does not control.

How to disable. Remove the codebase-context entry from the client config, which for Claude Code is claude mcp remove codebase-context. The index lives in the project's .codebase-context folder, so delete it by hand.

FAQ

How do I connect Codebase Context to Claude Code?

Run claude mcp add --scope user --transport stdio codebase-context -- npx -y codebase-context. For the beta pin codebase-context@2.3.1-beta.0. The init wizard writes project registrations for Claude Code, Codex, Cursor and OpenCode.

Do I need a GPU or an API key?

No. The keyword index is built locally with no Docker, GPU or API key. If you configure a remote embedding provider by hand, code chunks are sent to it.

What is project memory?

The remember and get_memory tools save and return conventions, decisions, gotchas and failures. To share memory but not the index, add .codebase-context/* and !.codebase-context/memory.json to .gitignore.

How are symbol references different from a call graph?

They are static occurrences of an identifier in code. The tool does not build a runtime call graph.

How do I run a search from the terminal?

From the repository run node /path/to/codebase-context/dist/index.js search --query "a symbol or feature" --limit 5. map builds the map, status shows the state and reindex refreshes the index.

Discussion

No questions or reviews yet.

An MCP server that turns a large codebase into a semantic feature graph for precise navigation and meaning-based search

MCP serverExtended access2KRepository stars

A local semantic code index: the agent searches by meaning, then follows hits into definitions, callers and dependency paths

MCP serverExtended access229Repository stars

A local MCP server that indexes your code so the agent pulls the functions it needs instead of rereading whole files

MCP serverExtended access457Repository stars

CLI and MCP server for vector-based semantic code search: local Ollama embeddings, call graphs and file outlines

CLIExtended access121Repository stars

Gives the agent an understanding of your repository: it indexes the code and answers questions about it in Claude Code, Cursor, Codex, Windsurf and more

PluginExtended access1.4KRepository stars

One MCP server gives agents a code map across over 300 languages, git history, shared memory and document search with OCR.

MCP serverExtended access119Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Codebase Context (this card)nonot required68
Serenanonot required31,335Serena relies on language servers for symbol navigation, while Codebase Context builds a local index with a repository map and project memory
Code Context Enginenonot required457a separate code context engine, while Codebase Context adds a pattern map, project memory and a review context packet

README in short

The README starts with versions: beta 2.3.1-beta.0 and stable 2.2.0 as of 4 November 2026. It then covers terminal use with map, search, status and reindex, client setup through init, what the agent can inspect, privacy and storage and the limits of the evidence with a benchmark report.

README badge

Report a problem