codebase-context
AI coding agents don't know your codebase. This MCP fixes that.
Your team has internal libraries, naming conventions, and patterns that external AI models have never seen. This MCP server gives AI assistants real-time visibility into your codebase: which libraries your team actually uses, how often, and where to find canonical examples.
Quick Start
Add this to your MCP client config (Claude Desktop, VS Code, Cursor, etc.).
What You Get
Internal library discovery →
@mycompany/ui-toolkit: 847 uses vsprimeng: 3 usesPattern frequencies →
inject(): 97%,constructor(): 3%Pattern momentum →
Signals: Rising (last used 2 days ago) vsRxJS: Declining (180+ days)Golden file examples → Real implementations showing all patterns together
Testing conventions →
Jest: 74%,Playwright: 6%Framework patterns → Angular signals, standalone components, etc.
Circular dependency detection → Find toxic import cycles between files
How It Works
When generating code, the agent checks your patterns first:
Without MCP | With MCP |
Uses
| Uses
(97% team adoption) |
Suggests
directly | Uses
wrapper |
Generic Jest setup | Your team's actual test utilities |
Tip: Auto-invoke in your rules
Add this to your .cursorrules, CLAUDE.md, or AGENTS.md:
Now the agent checks patterns automatically instead of waiting for you to ask.
Tools
Tool | Purpose |
| Semantic + keyword hybrid search |
| Find where a library/component is used |
| Pattern frequencies + canonical examples |
| Project structure overview |
| Query style guide rules |
| Find import cycles between files |
| Re-index the codebase |
Configuration
Variable | Default | Description |
|
|
(fast, cloud) or
(local, private) |
| - | Required if provider is
|
Performance Note
This tool runs locally on your machine using your hardware.
Initial Indexing: The first run works hard. It may take several minutes (e.g., ~2-5 mins for 30k files) to compute embeddings for your entire codebase.
Caching: Subsequent queries are instant (milliseconds).
Updates: Currently,
refresh_indexre-scans the codebase. True incremental indexing (processing only changed files) is on the roadmap.
Links
📄 Motivation — Why this exists, research, learnings
📋 Changelog — Version history
🤝 Contributing — How to add analyzers
License
MIT