Codebase Analyzer MCP
Integrates with Google's Gemini API (key from Google AI Studio) to power optional semantic analysis of codebases — generating architecture insights, detecting design/architecture patterns, and tracing dataflow through the system on top of free structural analysis.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Codebase Analyzer MCP
MCP server for codebase analysis with Gemini AI. Progressive disclosure keeps costs low — start with free structural analysis, drill into semantic details only when needed.
Install
Add to your MCP config (~/.mcp.json for Claude Code):
{
"mcpServers": {
"codebase-analyzer": {
"command": "npx",
"args": ["-y", "codebase-analyzer-mcp"],
"env": {
"GEMINI_API_KEY": "your_key_here"
}
}
}
}Restart Claude Code. The tools will be available immediately.
Gemini API key is optional — enables semantic analysis, pattern detection, and dataflow tracing. Without it, you still get structural analysis. Get a free key at https://aistudio.google.com/apikey
Related MCP server: code-intel
Tools
Tool | Description | Requires Gemini |
| Full analysis with progressive disclosure | No |
| Ask questions about a codebase | Optional |
| Drill into specific analysis sections | No |
| Read source files from a cached analysis | No |
| Detect design/architecture patterns | Yes |
| Trace data flow through the system | Yes |
| List supported languages and options | No |
Analysis Layers
Layer | Cost | What You Get |
Surface | Free | Files, languages, entry points, modules |
Structural | Free | Symbols, imports, complexity (via tree-sitter) |
Semantic | Gemini | Architecture insights, pattern detection |
Results include expandable sections — you only pay for what you drill into.
CLI
npx codebase-analyzer-mcp analyze . # Standard analysis
npx codebase-analyzer-mcp analyze . -d surface # Fast, free overview
npx codebase-analyzer-mcp analyze . -d deep -s # Full semantic analysis
npx codebase-analyzer-mcp analyze . -o analysis.md # Write structured markdown to file
npx codebase-analyzer-mcp analyze . -o analysis.json # Write JSON to file
npx codebase-analyzer-mcp query . "how is auth handled?" # Ask a question
npx codebase-analyzer-mcp patterns . # Find design patterns
npx codebase-analyzer-mcp dataflow . "user login" # Trace data flowUsage with Claude Code
Dump an analysis and reference it from your CLAUDE.md:
npx codebase-analyzer-mcp analyze . -o docs/codebase-analysis.mdThen add to your project's CLAUDE.md:
## Codebase Analysis
See [docs/codebase-analysis.md](docs/codebase-analysis.md) for full analysis.Claude Code will read the summary (~50 lines) for context, then drill into specific module sections as needed using Read with offset/limit.
Development
git clone https://github.com/jaykaycodes/codebase-analyzer-mcp.git
cd codebase-analyzer-mcp
bun install
bun run buildFor local MCP testing, create .mcp.json at repo root:
{
"mcpServers": {
"codebase-analyzer": {
"command": "node",
"args": ["dist/mcp/server.js"]
}
}
}License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Related MCP Servers
- 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 semantic code search and code insights via a knowledge graph, enabling AI to understand, navigate, and modify complex projects with deep dependency and architecture analysis.MIT
- AlicenseNot gradedqualityBmaintenanceProvides local-first repository architecture analysis with file-level proof, enabling agents to map codebases, locate implementations, trace call paths, and assess change impact with deterministic evidence.13MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to retrieve compact structural codebase context through repository architecture summaries, AST symbol extraction, cyclomatic complexity scoring, and TODO/FIXME hotspot search.1MIT