Codebase Context
Codebase Context gives coding agents a map of your repository through MCP, for developers who want their agent to find relevant code and follow the team's patterns. Search, examples and project memory run locally by default.
Set up your AI client
These commands use 2.4.0. If that version is not available on npm yet, use the published 2.2.0 setup guide.
Use Node.js 22 or newer. Choose your coding tool and run its command once; the examples target the 2.4.0 release:
# Claude Code
claude mcp add --scope user --transport stdio codebase-context -- npx -y codebase-context@2.4.0
# Codex CLI
codex mcp add codebase-context -- npx -y codebase-context@2.4.0
# OpenCode 1.x (keep the quoted separator on Windows)
opencode mcp add codebase-context '--' npx -y codebase-context@2.4.0Start a new agent session in your project, then ask:
Use Codebase Context to find [feature] in this repository. Pass this repository's absolute path as project, wait for indexing if needed, and open the relevant source files.






