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 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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, description carries full burden. It lists outputs but lacks details on performance, scope, or any destructive potential. Adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no redundancy, front-loaded with purpose and outputs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given complexity of codebase analysis and presence of output schema, description covers key aspects. Could add more about supported languages or limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% coverage (no parameter descriptions). Description clarifies 'path' as codebase root but does not explain 'depth' parameter. Partial improvement over schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool gets a high-level overview including specific outputs (languages, file count, entry points, directory tree). It distinguishes from siblings that focus on features, details, project types, or symbols.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implied usage for initial codebase exploration, but no explicit guidance on when to use vs alternatives (e.g., find_features) or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_featuresC
Detect features, API routes, controllers, components, and patterns in the codebase. Optionally filter by type (e.g. 'API Route', 'Controller', 'Component', 'Test').
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| type_filter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must disclose behavioral traits. It does not mention whether the operation is read-only, destructive, or any side effects. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded purpose with a clarifying second sentence on filtering. No redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Lacks usage guidance, parameter details beyond examples, and behavioral traits. While output schema exists, the description does not help with context like path format or filter case sensitivity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description adds meaning for type_filter by providing examples, but the required path parameter lacks semantic explanation beyond its name.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool detects features, API routes, controllers, etc. in the codebase, with optional type filtering. This distinguishes it from siblings like search_symbols but lacks explicit sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like analyze_structure or get_feature_detail. The description is purely declarative without usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_feature_detailC
Get detailed code context around a feature by name. The feature name is matched against detected routes, controllers, services, etc.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the full burden of disclosing behavioral traits. It reveals that matching is done against detected routes, controllers, services, etc., giving some insight into the search scope. However, it does not discuss edge cases (e.g., no match, multiple matches) or the nature of the returned context, leaving gaps in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at two sentences, with no wasted words. It front-loads the main action and adds relevant matching details. However, it could be slightly more structured by explicitly linking parameters to their roles.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has two required parameters, an output schema, and sibling tools, the description lacks crucial information about the 'path' parameter and usage context. It does not set expectations for the return value or when to prefer this tool over alternatives, making it incomplete for effective selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage and two undocumented parameters, the description adds minimal semantic value. It only implies that 'name' is the feature name, leaving 'path' entirely unexplained. This is insufficient for correct parameter usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as retrieving detailed code context for a feature by name. It specifies that matching occurs against routes, controllers, services, etc., distinguishing it from sibling tools like search_symbols or find_features. However, the 'path' parameter is not explained, causing slight ambiguity in the full scope of the tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use this tool versus its siblings. While the purpose implies use when needing detailed context for a named feature, there is no mention of alternative scenarios or exclusions, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_project_typesA
List all project types and frameworks this server can detect.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It indicates a read-like operation ('list') but does not disclose whether any side effects exist, authentication requirements, or rate limits. While the tool is likely safe, the description is minimal and does not add significant transparency beyond the action itself.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys the core purpose without any unnecessary words. It is concise and front-loaded, making it easy for an agent to quickly understand the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, output schema present), the description is largely complete. However, it could briefly mention the output format or that it returns a list of types/frameworks. Still, it is sufficient for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100% (none to cover). The description adds meaning by specifying what is listed ('project types and frameworks'), which is valuable context beyond the empty schema. A baseline of 4 is appropriate given no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: listing all project types and frameworks. It uses a specific verb ('List') and resource ('project types and frameworks'), and distinguishes itself from sibling tools like analyze_structure or find_features by focusing on enumeration rather than analysis or search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or situations where siblings might be preferred. The agent receives no help in decision-making beyond the basic action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_symbolsC
Search for symbols/patterns across the codebase using regex. Optionally filter by file extension (e.g. 'py', 'js', 'ts').
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pattern | Yes | ||
| file_ext | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions regex usage and optional filtering but lacks details on performance, error handling, or whether the operation is read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core function. No wasted words; efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and an output schema (implied), the description is too minimal. It lacks guidance on regex syntax, prerequisites, and behavior when no matches are found.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description adds meaning by stating pattern is regex and file_ext filters. However, the 'path' parameter is not explained, and the scope 'across the codebase' is ambiguous.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches for symbols/patterns using regex across the codebase and optionally filters by file extension. This distinguishes it from sibling tools like analyze_structure or find_features. However, it could be more precise about what constitutes a 'symbol/pattern'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. The description only mentions optional file extension filtering but does not compare to sibling tools or provide context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v1.0.0- First observed
analyze_structure - First observed
find_features - First observed
get_feature_detail - First observed
list_project_types - First observed
search_symbols
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
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.3181ISC
- AlicenseNot gradedqualityCmaintenanceAnalyzes 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.19MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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