Cerebro MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CEREBRO_ROOT | No | Path to the repository to analyze (defaults to current working directory if not set). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| cerebro_mapA | Cheap whole-project overview: file/language counts and the most important modules ranked by dependency centrality (PageRank). Call this FIRST in a new session instead of exploring folders. |
| cerebro_getA | Everything Cerebro knows about a file WITHOUT reading it: cached summary (with staleness flag), defined symbols, and dependency edges. |
| cerebro_searchA | Find relevant files. When the semantic index is built it ranks by meaning (intent), so phrase queries naturally ("where do we validate stock at checkout?"); it also includes keyword/symbol matches. Returns paths to cerebro_get(). |
| cerebro_recordB | Leave a trace: store your English understanding of a file so future sessions reuse it instead of re-analyzing. Write 1-3 dense sentences in English describing what the file does and its role. |
| cerebro_staleA | What the index no longer trusts: files changed/added/deleted on disk since the last reindex, plus summaries whose source file has changed. |
| cerebro_syncA | Catch changes made outside Claude Code (branch switch, git pull, edits in the raw editor) and reindex only the affected files. Works across nested repos. |
| cerebro_reindexA | Refresh the static index (symbols, dependency edges, hashes). Only
changed/new/deleted files are reprocessed. Pass |
| cerebro_noteA | Record a decision, domain rule, or gotcha — the why that reading code can
never recover (e.g. 'QR_MANUAL = merchant confirms payment by hand', 'Seller was
refactored to Organization'). Future sessions retrieve it with cerebro_recall.
Keep |
| cerebro_recallA | Recall decisions/rules/gotchas recorded by past sessions BEFORE re-deriving them. Pass a query to search by meaning of topic/content, or leave empty for the most recent notes. |
| cerebro_impactA | Transitive blast radius: every file that directly OR indirectly imports
|
| cerebro_cyclesA | Find circular import groups (files that mutually depend on each other) — an architecture smell worth breaking. Returns each cycle's members. |
| cerebro_callersA | Find every call site of a function / method / class by NAME across the repo (symbol-level call graph; name-resolved, so it may include same-named symbols). Use to see who actually uses a symbol before you change it. |
| cerebro_callsA | List the internal functions/methods a file calls — its outgoing call edges (name-resolved). External library calls are omitted. |
| cerebro_orphansB | List code files that nothing imports — dead-code candidates. Framework entrypoints (modules, controllers, pages, configs, tests) are listed separately since they're loaded by convention, not by import. |
| cerebro_dead_symbolsA | List unused-export candidates: functions/classes/methods whose name is referenced nowhere in the indexed code, inside files that ARE imported (the symbol-level dead code that cerebro_orphans, which works per-file, can't see). Heuristic — confirm before deleting: dynamic access (obj['x'], string-based DI) and reflection can make a used symbol look dead. |
| cerebro_endpointsA | Backend HTTP endpoints (NestJS routes) the project exposes — the front↔back
boundary that |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 16 tools
Each tool targets a clearly distinct aspect of code analysis: call sites, call edges, circular imports, dead symbols, endpoints, file info, impact analysis, project overview, note-taking, orphan files, recall, file recording, reindexing, search, stale index, and sync. Even similar tools like dead_symbols vs orphans and note vs record vs recall are differentiated by scope and purpose.
All tools follow a consistent 'cerebro_' prefix with snake_case naming (e.g., cerebro_callers, cerebro_dead_symbols). The second part is either a noun (callers, cycles) or a verb (get, search), maintaining a predictable pattern throughout.
With 16 tools, the server covers a comprehensive set of code intelligence operations without being overly numerous. Each tool serves a specific purpose in the workflow of understanding and navigating a large codebase, fitting well within the typical 3-15 range for focused servers.
The tool set covers core code analysis needs: dead code detection, call graphs, dependency analysis, search, project overview, and knowledge persistence. Minor gaps include lack of direct file content retrieval or file listing, but the server's focus on precomputed index data means these are reasonable omissions.