# code-atlas [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/lusiem/code-atlas  
**GitHub Stars:** 0  
**npm Downloads (last month):** 231  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/code-atlas

## Description
Multi-language code intelligence MCP server: symbols, call graphs, references, semantic search.

## Tools
Capabilities this server exposes over MCP:

- **find_references** — Usages of a symbol. Uses the exact language server when one is available (provenance lsp), falling back to indexed usages: resolved references first (with confidence), then unresolved same-name occurrences as candidates.
- **call_hierarchy** — Who calls this symbol (direction=in) or what it calls (direction=out), as a tree up to `depth` levels. Uses the exact language server when available ([lsp 1.00] edges), structural index otherwise (confidence per edge).
- **go_to_definition** — Definition site of the identifier at a file position. Uses the exact language server when available, falling back to the structural index (resolved occurrence at that position).
- **type_hierarchy** — Supertypes (direction=super: what this type extends/implements) or subtypes (direction=sub: what extends/implements it), as a tree.
- **get_dependencies** — What a file imports (direction=out) or which files import it (direction=in). Unresolved specifiers are external packages or system headers.
- **trace_path** — Shortest call chain from one symbol to another over the indexed call graph — "how does the request handler end up in the DB layer?". Both ends accept a symbol id or an exact name.
- **tests_for_symbol** — Which tests exercise this symbol? Walks the call/type graph backwards from the target to test files (strongest evidence, names the test-case symbol), then adds test files that only reach it through imports (weaker signal). Complements change_impact: this answers "what should I run?" for one symbol directly.
- **verify_changes** — Post-edit structural check of the uncommitted working tree (or explicit files) against git HEAD: imports that stopped resolving, removed exports that other files still reference, and signature changes with live callers. change_impact predicts blast radius before an edit; this confirms what actually broke after. Waits for the index to catch up with the edits before answering.
- **find_similar_code** — Does a helper for this already exist? Near-duplicate search over the indexed code: target an existing symbol or paste a snippet. Uses local embedding vectors when ready ([cos]), degrading to token-shingle text similarity ([jaccard]) while embedding coverage builds.
- **get_scene_structure** — Node tree of a game-engine scene file with attached scripts, instanced sub-scenes, and signal connections. Supports Godot .tscn/.tres today (Unity prefabs planned).
- **find_asset_references** — Reverse lookup across engine assets: which scenes/prefabs/Blueprints reference this script, scene, asset path, or handler method? Accepts a workspace-relative path, a res:// or /Game/ path, or a bare method/class/event name (Unreal: called functions via call_function, event handlers via handles_event).
- **search_reflection** — Find engine-reflected declarations: Unreal UCLASS/UPROPERTY/UFUNCTION specifiers (e.g. "BlueprintCallable", "Replicated"), Unity attributes ("[SerializeField]"), and Godot annotations ("@export", "@onready") or signals. Answers from the index: declaration signatures plus Unreal reflection macros captured onto the annotated symbol.
- **generate_diagram** — Render index data as a Mermaid diagram (returned in a ```mermaid fence — paste into GitHub markdown, docs, or a Mermaid viewer). kind=imports: workspace import graph, file-level with directory clusters or collapsed to directories (granularity, path_prefix to scope). kind=calls: call graph around one symbol (direction in/out/both, depth). kind=types: inheritance diagram around one type. kind=call_path: shortest call chain from one symbol to another (from_name/from_id -> to_name/to_id). Dotted arrows are low-confidence structural edges (< 0.70) — hints, not facts.
- **change_impact** — Blast radius of a change: transitive callers/subtypes of the target plus files reachable through imports, with affected TEST files highlighted. Target a symbol (symbol_id/path+line/name), a set of files (files=[...]), or nothing — no arguments analyzes the uncommitted git diff.
- **context_pack** — One-call, token-budgeted briefing on a symbol: definition source, surrounding file outline, type context, top callers/callees, route (if a handler), and related tests — instead of stitching six separate lookups. Sections that exceed the budget are named so you can ask for them specifically. Optional task string pulls in possibly relevant symbols.
- **find_dead_code** — Symbols nothing references: no resolved occurrence and no graph edge points at them, after excluding entry points, route handlers, and engine/framework lifecycle callbacks. Candidates with unresolved same-name usages elsewhere are hedged as "possibly dead" — dynamic dispatch and reflection are invisible to a structural index, as are dependency injection, string-keyed lookups and consumers outside the workspace — treat this as a review list, not a delete list, and verify before deleting. A second section lists exported symbols only ever used inside their own file.
- **hotspots** — Risk-ranked files: git commit churn over a window multiplied by current size (score = commits × log2(lines)). High churn on large files marks refactor and review targets.
- **list_routes** — Web-framework routes indexed across the workspace (Express, Fastify, NestJS, FastAPI, Flask, Django, plus file-based routing for Next.js, SvelteKit, Nuxt, and Remix), one line per route with its handler symbol. Filter by framework, HTTP method, or a path fragment.
- **find_route** — Which code serves this URL? Matches a concrete request path (e.g. "/api/users/7") against indexed route patterns, parameter segments (:id, {id}, <int:pk>) treated as wildcards. Returns the handler symbol (#id chains into call_hierarchy / change_impact).
- **repo_map** — Annotated architecture map of the workspace — the first call to make in an unfamiliar repo. Directory tree with per-directory file/symbol counts, dominant language, role, size and import fan-in/fan-out (so layering is visible), plus entry points, the highest-fan-in symbols, and the third-party dependency inventory. One budgeted call instead of a grep sweep. Use path_prefix and depth to zoom into a subtree, and sections to ask for just one part. Ranking is structural and heuristic — distinct-file fan-in over resolved imports and call/type edges; reflection, DI and string-keyed dispatch are invisible to it, and stdlib/builtin classification is a partial list so unlisted modules fall back to "external".
- **search_content** — Literal text search over indexed file contents — string literals, error messages, env var names, TODO comments, config keys: anything that is not a definition name (use search_symbols for those). Covers non-code files (md/json/yaml/toml/sql/Dockerfile/CI) that no other tool indexes. Word and phrase matching; regex=true for patterns.
- **change_coupling** — Which files historically change together with this one? Directional: "when I touch A, B changes 45% of the time" and the reverse, because the asymmetry is the signal. Flags coupled files with NO import edge — config, fixtures, generated code and string-keyed lookups the structural graph cannot see. Co-change is correlation, not causation; commits touching more than 50 files are excluded as refactors.
- **symbol_history** — How did this symbol get this way? Line-range git history (git log -L) for the symbol's span: commit, date, author and subject, following the code as it moves within its file. Answers "why is this here" and "who do I ask" without reading the diff.
- **project_overview** — Cheap orientation router: languages, file/symbol counts, index freshness, top-level layout, entry-point and dependency counts. Call repo_map next for the annotated architecture map.
- **index_status** — Indexing progress, per-file errors, and freshness of the code index.
- **reindex** — Force an incremental re-scan of the workspace (hash-checks every file, reindexes changed ones).
- **search_symbols** — Search definitions (functions, classes, methods, …) by name across the whole workspace. Matches name prefixes and doc comments; falls back to substring match. Returns one line per symbol with its id (#N) for use with get_symbol_info.
- **semantic_search** — Natural-language search over the code: describe behavior ("where is retry backoff implemented", "function that validates auth tokens") rather than symbol names. Hybrid keyword+embedding ranking, fully local. First-ever call downloads the embedding model (~150 MB one-time); until embedding coverage completes, results are keyword-weighted and say so.
- **get_file_outline** — Hierarchical outline of every definition in a file, with signatures — read the structure of a file without reading its source. Pass a DIRECTORY instead of a file to get its public API surface in one call rather than one call per file. Over budget, nesting depth is shed before any top-level symbol is dropped, so the shape stays honest. Set include_docs to also get first-line doc comments.
- **get_symbol_info** — Full detail for one symbol: signature, doc comment, location, container — and optionally its source. Identify the symbol by id (from search_symbols/get_file_outline), by file+line position, or by exact name.
- **batch_symbols** — Compact one-line info for up to 50 symbol ids in a single call — resolve the #ids from call_hierarchy / change_impact / find_dead_code output without one get_symbol_info round trip each. Set include_source for the definition snippets too.
- **ast_query** — Run a raw tree-sitter S-expression query over indexed files of one language and return every capture as path:line with the captured text. Powerful for structural searches no regex can express, e.g. `(call_expression function: (identifier) @fn (#eq? @fn "eval"))` or `(for_statement (await_expression) @hit)`. Parses files on demand, normalized the same way the indexer parses them (e.g. C++ dllexport macros blanked so class nodes parse) — use path_prefix to narrow scope on big repos.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "code-atlas": {
    "command": "npx",
    "args": ["-y","@lusiem/code-atlas"]
  }
}
```

## Documentation

## What the code-atlas MCP server does

The code-atlas MCP server gives an MCP client a structured view of a local repository. It indexes source files, symbols, imports, occurrences, call and type edges, and searchable text, then exposes that information through tools designed for code navigation and maintenance. The index covers 25 languages and also includes adapters for Godot, Unity, and Unreal project data.

Its responses are token-budgeted. Many tools accept a maximum-token limit and can return a cursor for continuing a result, which helps an agent request only the amount of context it can use. The server can also inspect non-code files such as Markdown, JSON, YAML, TOML, SQL, Dockerfiles, and CI configuration.

## How it works

A repository is scanned with gitignore-aware file discovery and parsed with tree-sitter. Results are kept in `<repo>/.code-atlas/index.db`, which is self-gitignored. Content hashes allow incremental refreshes, and a file watcher can reindex saved files after a debounce period. Watching can be disabled.

Cross-file answers use available language servers first. The material lists support for TypeScript, Python, Go, Rust, C/C++, Java, Kotlin, C#, and GDScript through various language-server implementations. When an LSP is unavailable, structural and heuristic resolution supplies fallback results with confidence information. Semantic search and similar-code search use local embeddings, with a text-similarity fallback while embedding coverage is being built.

## Setup and configuration

The documented Claude Code setup is:

```sh
claude mcp add code-atlas -- npx -y @lusiem/code-atlas serve
```

A cloned checkout can be built with npm and started by running its compiled entry point in `serve` mode. By default, the server indexes the current working directory; `--root <path>` selects another repository. The `index` command performs a one-time index build, while `serve` starts the MCP server over stdio. Options include `--no-watch`, `--no-lsp`, `--no-embeddings`, and `--no-download`. An optional `code-atlas.json` file can adjust include and exclude behavior. The Godot language-server port can be overridden with `CODE_ATLAS_GODOT_LSP_PORT`.

## Tools and capabilities

The code-atlas MCP server includes tools for:

- Mapping repositories, checking project status, outlining files or directories, and resolving symbol information.
- Searching symbol names, documentation, raw content, semantic meaning, AST patterns, similar code, and reflection markers.
- Finding definitions, references, callers, callees, supertypes, subtypes, dependencies, and shortest call paths.
- Measuring change impact, verifying edits against Git HEAD, locating related tests, finding potentially dead code, ranking hotspots, and examining historical coupling or symbol history.
- Listing web routes and matching concrete URLs to handlers across the supported frameworks.
- Generating Mermaid diagrams and inspecting Godot scenes plus Godot, Unity, and Unreal asset references.

## Limitations and notes

Exactness depends on language-server availability. Without an applicable server, cross-file relationships use structural or heuristic resolution rather than guaranteed LSP results. GDScript LSP answers require the Godot editor to have the project open; otherwise structural answers are used. Java requires a Java 21-or-newer runtime, Kotlin requires a JRE, and C# support requires the .NET SDK according to the documented setup notes. All indexing and embedding work is described as local, so repository contents are not sent off the machine by the server.

_Full upstream README: https://allmcps.com/mcp/code-atlas/readme_

