The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Codebase Context
Codebase Context gives AI agents understanding of your codebase through semantic code search, team conventions, patterns, and memory, so they use fewer tokens, spend less time,…
Install
claude mcp add --scope user --transport stdio codebase-context -- npx -y codebase-context@2.2.0Install command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Codebase Context
Your coding agent doesn't understand your codebase.
Coding agents can read files, but they still have to discover how your repository is organized, which patterns your team follows, and which examples are worth copying.
Codebase Context gives an agent a local view of that information through code search, team patterns, strong examples, and project memory. It runs as an MCP server - a local tool that your editor or command-line agent can call while it works - and keeps the index on your machine by default.
Set up your AI client
Choose your coding tool and run its command once. Use Node.js 22 or newer. These commands use published npm 2.2.0 and do not require a project folder in your configuration:
# Claude Code
claude mcp add --scope user --transport stdio codebase-context -- npx -y codebase-context@2.2.0
# Codex CLI
codex mcp add codebase-context -- npx -y codebase-context@2.2.0
# OpenCode 1.x (keep the quoted separator on Windows)
opencode mcp add codebase-context '--' npx -y codebase-context@2.2.0
Start 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 when checking get_indexing_status and searching. Wait for indexing if needed, read codebase://context, then search_codebase and open a returned source file. Show me the relevant files.
Replace [feature] with something you want to find. The agent supplies the repository path in its tool calls, so the registration can serve different projects. Initial indexing may need a local model download. The October 6 isolated checks proved these client registrations and published-package project selection/search; they did not establish a full native agent investigation.
For Codex Desktop, create or merge .codex/config.toml in the project you want to search:
[mcp_servers.codebase-context]
command = "npx"
args = ["-y", "codebase-context@2.2.0"]
startup_timeout_sec = 120
Trust the project if asked, restart Codex, and start a new task there. Use the prompt above. Config placement alone does not establish successful first use; this no-folder recipe has not been accepted in a fresh native Desktop task.
Other clients use their own setup commands:
| Client | Shortest current setup |
|---|---|
| Gemini CLI | gemini mcp add --scope user codebase-context npx -y codebase-context@2.2.0 |
| Cursor | Add .cursor/mcp.json |
| VS Code with GitHub Copilot | Add .vscode/mcp.json |
| GitHub Copilot CLI | copilot mcp add codebase-context -- npx -y codebase-context@2.2.0 |
| Windsurf | Add ~/.codeium/windsurf/mcp_config.json |
Check an existing same-name entry before replacing it. To give the server a default folder, append that folder's absolute path to the npx arguments. The client setup guide covers scopes, optional fixed-folder configuration, verification limits and the unreleased installer. Published 2.2.0's interactive init has registration bugs; use the commands above.
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io