Multi-layer codebase analysis MCP server with Gemini AI and progressive disclosure.
Multi-layer codebase analysis MCP server with Gemini AI and progressive disclosure. Exposed over MCP by the codebase mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
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.
codebase-analyzer-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
Everything the assistant can do here goes through one of these:
analyze_repo — Full analysis with progressive disclosurequery_repo — Ask questions about a codebaseexpand_section — Drill into specific analysis sectionsread_files — Read source files from a cached analysisfind_patterns — Detect design/architecture patternstrace_dataflow — Trace data flow through the systemget_analysis_capabilities — List supported languages and optionsYou will need one environment variable: GEMINI_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Codebase's toolset — analyze_repo, query_repo, expand_section and 4 more — is a fair guide to whether it matches your workflow. It is maintained by GitHub Actions; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| analyze_repo | Full analysis with progressive disclosure |
| query_repo | Ask questions about a codebase |
| expand_section | Drill into specific analysis sections |
| read_files | Read source files from a cached analysis |
| find_patterns | Detect design/architecture patterns |
| trace_dataflow | Trace data flow through the system |
| get_analysis_capabilities | List supported languages and options |
{
"mcpServers": {
"codebase-analyzer": {
"command": "npx",
"args": ["-y", "codebase-analyzer-mcp"],
"env": {
"GEMINI_API_KEY": "your_key_here"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| GEMINI_API_KEY | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.