Generate a map of your codebaseto help AI Agents understand your architecture, coding conventions and patterns. Discoverable with Semantic Search
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"codebase-context": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
You're tired of AI agents writing code that "just works" but still misses how your team actually builds things. They search too broadly, pick generic examples, and spend tokens exploring before they understand the shape of the repo.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in search / ai-ml
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Production ready MCP server with real-time search, extract, map & crawl.
Dynamic problem-solving through sequential thought chains
Web and local search using Brave Search API
MCP Security Weekly
Get CVE alerts and security updates for Codebase Context and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
You're tired of AI agents writing code that "just works" but still misses how your team actually builds things. They search too broadly, pick generic examples, and spend tokens exploring before they understand the shape of the repo.
codebase-context changes the first step. Start with a bounded conventions map that shows the architecture, dominant patterns, and strongest local examples. Then search for the exact file, symbol, or workflow you need.
Here's what codebase-context does:
Starts with a bounded conventions map - The first call shows architecture layers, active patterns, golden files, and next calls without dumping vendored repos, fixtures, generated output, or oversized entrypoint lists into the default surface.
Finds the right local example - Search does not just return code. Each result comes back with pattern signals, file relationships, and quality indicators so the agent can move from the map to the most relevant local example instead of wandering through raw hits.
Knows what is current - Conventions are detected from your code and git history, not only from rules you wrote. The map distinguishes what is common from what is rising or declining, and points at the files that best represent the current direction.
Adds support signals when you need them - Team memory and edit-readiness checks stay available, but as supporting context after the map and search have already narrowed the work.
Map first, search second, local-first throughout. Your code never leaves your machine by default.
See the current discovery benchmark for the checked-in discovery-only proof. The gate is still pending_evidence, and claimAllowed remains false.
Real CLI output against angular-spotify, the repo used for the launch screenshots.
Lead signal: pattern drift and golden files

This is the part most tools miss: what the team is doing now, what it is moving away from, and which files are the strongest examples to follow.
Before editing: preflight and impact

When the agent searches with edit intent, it gets a compact decision card: confidence, whether it's safe to proceed, which patterns apply, the best example, and which files are likely to be affected.
More CLI examples in docs/cli.md. Full walkthrough: demo.md on GitHub.
claude mcp add codebase-context -- npx -y codebase-context
The server runs in two modes. Use stdio unless you need multiple clients connected at once:
| Mode | How it runs | When to use |
|---|---|---|
| stdio (default) | Process spawned by the client | One AI client talking to one or more repos |
| HTTP | Long-lived server at http://127.0.0.1:3100/mcp | Multiple clients sharing one server |
Client support at a glance:
| Client | stdio | HTTP |
|---|