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 "Install 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 Serveranalyze 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 Optimizer
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AaadityaG/Codebase-Explainer-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server