code-context-mcp
Make any LLM a codebase expert instantly. Provides deep code intelligence through semantic search, architecture mapping, security analysis, and smart context that fits perfectly in token windows.
README
Code Context MCP Server
Make any LLM a codebase expert instantly. This MCP server provides deep code intelligence through semantic search, architecture mapping, security analysis, and smart context that fits perfectly in token windows. 90% more efficient than sending raw files. Perfect for Claude, GPT, and any LLM-powered IDE.
Installation
git clone https://github.com/RaheesAhmed/code-context-mcp.git
cd code-context-mcp
uv sync
Usage
# Development mode with inspector
uv run mcp dev src/server.py
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"code-context": {
"command": "uv",
"args": ["run", "--directory", "/path/to/code-context-mcp", "mcp", "run", "src/server.py"]
}
}
}
Tools (16 Total)
Core Tools
| Tool | Description |
|---|---|
get_repo_map |
Condensed map of all symbols in entire codebase |
get_file_context |
File content with related imports |
search_symbols |
Find function/class definitions |
get_dependencies |
Import relationships for a file |
get_project_stats |
File count, lines, language breakdown |
read_file |
Read file with optional line range |
Advanced Search
| Tool | Description |
|---|---|
find_usages |
Find ALL places where a symbol is used |
smart_context |
Auto-find relevant files for a question |
semantic_search |
Search code by meaning, not keywords |
Deep Analysis
| Tool | Description |
|---|---|
get_call_graph |
Trace callers/callees with Mermaid diagram |
get_architecture |
Auto-generate project layer diagram |
analyze_patterns |
Detect security, performance, quality issues |
Optimization
| Tool | Description |
|---|---|
get_compressed_context |
Token-efficient multi-file context |
analyze_change_impact |
What breaks when you change a file |
get_recent_changes |
Git history - recently modified files |
trace_code_flow |
Step-by-step execution path tracing |
Examples
# See entire codebase structure
get_repo_map(project_path="/path/to/project")
# Find all usages of a function
find_usages(project_path="/path/to/project", symbol="authenticate")
# Auto-find relevant code for a question
smart_context(project_path="/path/to/project", question="how does auth work?")
# Build call graph with visualization
get_call_graph(project_path="/path/to/project", function_name="main")
# Analyze before making changes
analyze_change_impact(project_path="/path/to/project", file_path="src/core.py")
# Trace execution flow
trace_code_flow(project_path="/path/to/project", entry_point="handleRequest")
Requirements
- Python 3.10+
- uv
License
MIT License - see LICENSE
Author
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.