Codebase Explorer MCP Server
The Codebase Explorer MCP Server analyzes any codebase to provide structural, architectural, and code-level insights — just provide the repo path.
analyze_structure: Get a high-level overview including detected languages, file counts, entry points, and a directory tree.find_features: Detect and list features such as API routes, controllers, components, tests, and services; supports optional filtering by type.get_feature_detail: Retrieve code context around a specific feature by name, automatically locating the file and line number.generate_architecture: Produce a Mermaid diagram showing layered architecture (entry, API, services, data, UI) with import connections.analyze_dead_code: Find functions, classes, and exports that are defined but never referenced.get_git_info: Get branch, recent commits, contributors, hot files, and uncommitted changes.find_secrets: Scan for hardcoded API keys, tokens, passwords, private keys, and database credentials.search_symbols: Perform regex-based searches across all source files, with optional filtering by file extension.list_project_types: List all project types and frameworks the server can detect.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codebase Explorer MCP Server analyze structure of /home/user/project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codebase-explorer-mcp
An MCP server that analyzes any codebase — detects project type, languages, framework, entry points, API routes, controllers, services, components, tests, and more.
Quick start
1. Install uv
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | shVerify: uv --version
Why
uv?uv.lockpins exact dependency versions (likepackage-lock.json), so everyone gets identical environments.mcp devalso usesuvxunder the hood.
2. Setup the project
cd /path/to/codebase-explorer-mcp
uv syncThis reads uv.lock, creates .venv, and installs all dependencies.
3a. Use with Claude Desktop
Find your venv Python path:
# From the project folder:
.venv\Scripts\python.exe --versionAdd to claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"codebase-explorer": {
"command": "C:\\full\\path\\to\\codebase-explorer-mcp\\.venv\\Scripts\\python.exe",
"args": ["server.py"],
"cwd": "C:\\full\\path\\to\\codebase-explorer-mcp"
}
}
}Restart Claude Desktop.
3b. Test with MCP Inspector (development)
cd /path/to/codebase-explorer-mcp
mcp dev server.pyOpens http://localhost:6274 — test all tools live in a web UI.
Related MCP server: Codebase Insights MCP Server
How to use
You only need to provide the repo path — the server auto-discovers everything else.
Tool | What you give it | What it returns |
|
| Languages, file count, entry points, directory tree |
|
| Routes, controllers, components, tests, interfaces |
|
| Code context around a feature (auto-locates file + line) |
|
| Layered Mermaid diagram — entry points, API, services, data, UI with import connections |
|
| Functions, classes, and exports defined but never referenced elsewhere |
|
| Git branch, recent commits, contributors, hot files, uncommitted changes |
|
| Hardcoded API keys, tokens, passwords, private keys, database credentials |
|
| Regex search results across all source files |
Example flow
Get an overview:
analyze_structure(path="C:\\MyProject")See the big picture:
generate_architecture(path="C:\\MyProject")→ Renders a Mermaid diagram with layers: Entry → API → Logic → Data → UI, plus import graph edgesCheck git health:
get_git_info(path="C:\\MyProject")→ Branch, recent commits, contributors, hot files, uncommitted changesScan for leaks:
find_secrets(path="C:\\MyProject")→ Hardcoded API keys, tokens, passwords, and database credentialsFind dead code:
analyze_dead_code(path="C:\\MyProject")→ Lists functions, classes, and exports defined but never imported or referenced elsewhereFind specific features:
find_features(path="C:\\MyProject")→ See all API routes, controllers, tests listed with their file locationsInspect one:
get_feature_detail(path="C:\\MyProject", name="get_users")→ Shows code context around that feature, no need to know the file or line numberSearch:
search_symbols(path="C:\\MyProject", pattern="async def")→ Find all async functions in the codebase
Alternative setup (without uv)
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS / Linux
pip install "mcp[cli]>=1.6.0"
python server.pySupported Languages
Python, JavaScript/TypeScript, Java, Go, Ruby, C#, Rust, PHP, Kotlin, Swift, and more.
Available Tools
5 toolsanalyze_structureA
Get a high-level overview of a codebase: languages, file count, entry points, and directory tree.
Inputs: path (required), depth. Returns: result
find_featuresC
Detect features, API routes, controllers, components, and patterns in the codebase. Optionally filter by type (e.g. 'API Route', 'Controller', 'Component', 'Test').
Inputs: path (required), type_filter. Returns: result
get_feature_detailC
Get detailed code context around a feature by name. The feature name is matched against detected routes, controllers, services, etc.
Inputs: name (required), path (required). Returns: result
list_project_typesA
List all project types and frameworks this server can detect.
Inputs: no named parameters. Returns: result
search_symbolsC
Search for symbols/patterns across the codebase using regex. Optionally filter by file extension (e.g. 'py', 'js', 'ts').
Inputs: path (required), pattern (required), file_ext. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: overview, feature detection, detailed context, project type listing, and symbol search. No overlapping functionality.
All tool names follow a consistent verb_noun pattern (e.g., analyze_structure, find_features, get_feature_detail).
With 5 tools covering overview, feature detection, detail, types, and symbol search, the set is well-scoped for codebase exploration.
Covers core exploration tasks but lacks direct file content or listing operations, which may be needed in some workflows.
Related MCP Connectors
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables inspection and analysis of project structures to detect languages, frameworks, entry points, and dependencies across multiple programming languages including Node.js, Python, PHP, Go, Java, and Rust.39 npm1ISC
- AlicenseNot gradedqualityDmaintenanceAnalyzes API codebases from GitHub and Bitbucket repositories to generate Postman collections, business reports, and detailed code insights. Supports multiple frameworks including FastAPI, Spring Boot, Flask, Express, and OpenAPI/Swagger specifications.MIT
- AlicenseAqualityDmaintenanceAnalyzes codebases from local directories, GitHub, and Azure DevOps, providing intelligent context to AI coding assistants through repository structure, critical files, and semantic maps.144MIT
- AlicenseNot gradedqualityDmaintenanceProvides intelligent codebase analysis, dependency scanning, architecture detection, security vulnerability scanning, and automatic documentation generation for modern development teams.15 npmMIT