repo-atlas
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.
@pie527645-cloud/repo-atlas
Deterministic codebase orientation map generator, reverse-import blast-radius analyzer, CI drift verifier, and ultra-lean 3-tool Model Context Protocol (MCP) server.
repo-atlas gives developers and AI coding agents an accurate, token-budgeted structural map of a repository in milliseconds without burning context windows on full-file reads or heavy multi-dozen-tool MCP schemas.
Key Capabilities
Deterministic Token-Budgeted Orientation Maps: Generates byte-identical Markdown (
REPO_ATLAS.md) or structured JSON sorted lexicographically across platforms and line endings, strictly bounded withinMath.ceil(chars / 4) <= budgetTokens.TypeScript & JavaScript AST Extraction: Uses
ts.createSourceFileto extract exported functions, classes, interfaces, type aliases, enums, and constants with concise single-line signatures, exactfile:linelocations, ES/CommonJS local import edges (import,export ... from,require), andprocess.envreferences.Polyglot Linear Scanner: Scans Python (
.py), Go (.go), Rust (.rs), andpackage.json(scripts,bin,exports,dependencies), plus environment variable usage (os.environ,os.getenv,os.Getenv,std::env::var) in guaranteed linear time without backtracking regular expressions.Dependency Graph Intelligence: Computes module fan-in / fan-out hub rankings, detects circular dependency cycles via Tarjan Strongly Connected Components (SCC), and maps test files to covered source modules.
Reverse-Import Blast Radius (
diff): Computes direct and transitive reverse dependents plus recommended test files to run fromgit diffor an explicit--fileslist (even outside git repositories).CI Drift Gate (
check): Verifies thatREPO_ATLAS.mdmatches the current repository state (exiting0when synchronized and1when missing or stale).3-Tool Read-Only MCP Server: Exposes
get_repo_overview,find_symbol, andblast_radiusover stdio with strict root containment.
Related MCP server: CodeGraph MCP
Architecture
flowchart TD
CLI["CLI (dist/cli.js)<br/>map | diff | check | mcp"] --> Guard["Path Containment Guard<br/>(src/path-guard.ts)"]
MCP["MCP Server (dist/mcp.js)<br/>get_repo_overview | find_symbol | blast_radius"] --> Guard
Guard --> Walker["Deterministic Walker & Linear .gitignore<br/>(<= 512 KB cap, binary skip)"]
Walker --> TS["TS / JS AST Extractor<br/>(ts.createSourceFile)"]
Walker --> Poly["Polyglot Linear Scanner<br/>(Python, Go, Rust, package.json, env vars)"]
TS --> Resolver["Local Import Resolver<br/>(ESM .js->.ts, CJS, tsconfig paths, Go/Py/Rust)"]
Poly --> Resolver
Resolver --> Graph["Dependency Graph Engine<br/>(Hubs, Tarjan SCC Cycles, Test Mapper)"]
Graph --> Atlas["Budgeted Atlas Renderer<br/>(Markdown & JSON)"]
Graph --> Blast["Blast Radius & Git Diff<br/>(spawn shell: false)"]Installation (From Source)
Requires Node.js >= 20.18.1.
git clone https://github.com/pie527645-cloud/repo-atlas.git
cd repo-atlas
npm install
npm run buildVerify the build and test suite:
npm run lint
npm testCLI Usage
Run the compiled CLI directly with node:
1. Generate a Repository Orientation Map (map)
# Print a 4000-token markdown atlas to stdout
node /abs/path/to/repo-atlas/dist/cli.js map /path/to/target-repo --budget 4000
# Write REPO_ATLAS.md inside the target repository
node /abs/path/to/repo-atlas/dist/cli.js map /path/to/target-repo --budget 4000 --out REPO_ATLAS.md
# Emit structured JSON summary
node /abs/path/to/repo-atlas/dist/cli.js map /path/to/target-repo --format json2. Analyze Change Blast Radius (diff)
# Analyze uncommitted + untracked git changes relative to HEAD
node /abs/path/to/repo-atlas/dist/cli.js diff /path/to/target-repo --base HEAD
# Compare against another git revision in JSON format
node /abs/path/to/repo-atlas/dist/cli.js diff /path/to/target-repo --base main --format json
# Analyze explicit files (works both inside and outside git repositories)
node /abs/path/to/repo-atlas/dist/cli.js diff /path/to/target-repo --files src/graph.ts,src/walker.ts3. Verify CI Drift (check)
# Exit 0 if REPO_ATLAS.md is up to date, or exit 1 if missing or stale
node /abs/path/to/repo-atlas/dist/cli.js check /path/to/target-repo --file REPO_ATLAS.md --budget 40004. Start the Stdio MCP Server (mcp)
node /abs/path/to/repo-atlas/dist/cli.js mcp --root /path/to/target-repo
# or directly via the dedicated MCP binary entrypoint:
node /abs/path/to/repo-atlas/dist/mcp.js --root /path/to/target-repoMCP Server Configuration
Configure your MCP client (such as Claude Desktop, Claude Code, Cursor, or Windsurf) using the absolute path to the built dist/mcp.js entrypoint:
{
"mcpServers": {
"repo-atlas": {
"command": "node",
"args": [
"/abs/path/to/repo-atlas/dist/mcp.js",
"--root",
"/abs/path/to/target-repo"
],
"env": {
"REPO_ATLAS_ROOT": "/abs/path/to/target-repo"
}
}
}
}Root resolution precedence:
--rootcommand-line argumentREPO_ATLAS_ROOTenvironment variableprocess.cwd()
Exposed MCP Tools (3 Tools)
Tool | Parameters | Description |
|
| Returns a deterministic Markdown architecture and symbol overview of the repository or a strictly confined subdirectory within the specified budget. |
|
| Searches exported functions, classes, interfaces, types, structs, traits, and constants across the repository, returning exact |
|
| Computes direct and transitive reverse-import dependents and recommended test files for a list of repository-relative file paths. |
Security & Determinism Guarantees
Strict Path Traversal Containment: Every user- or tool-supplied path (
path,--out,--file,--files,blast_radius.files) is normalized and checked againstfs.realpathSync(rootDir). Parent directory escapes (..), cross-drive / UNC paths, control characters, and symlinks or junctions resolving outsiderootDirare rejected withPathContainmentError.Bounded Memory & Zero Backtracking: Individual file reads enforce a strict
512 KBcap (524,288bytes), binary files are skipped via extension and null-byte detection, and.gitignore/ polyglot scanners run in guaranteed linear time without backtracking regular expressions.Command-Injection-Safe Git Execution: Git queries invoke
spawn('git', args, { shell: false })with validated base revision syntax (rejecting leading-option injection) and explicit--argument delimiters.Cross-Platform Determinism: All paths are normalized to POSIX
/separators,\r\nline endings are normalized to\n, and collections use ASCII code-point ordering rather than locale-dependent collation.
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
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Code-map tools for AI agents: see a repo's structure first, then edit only what matters.
Stateless TS/JS compiler facts for agents: references, imports, impact. No repo index or OAuth.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients such as Claude Desktop and Claude Code to query an indexed source repository through path-guarded tools for hybrid keyword-and-vector code search, file snippets, symbol explanations, reference lookups, and test-skeleton suggestions. Serves those results over stdio with cited file:line locations so agents can answer questions about a codebase and drive grounded code review.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI coding agents to interrogate a local repository deterministically for symbols, dependencies, call paths, routes, tests, and Git impact, returning verified structured evidence with exact line citations instead of requiring the whole codebase to be read.79 PyPI4-
- AlicenseNot gradedqualityBmaintenanceExposes three read-only tools—impact, explain, and report—so an agent can query a prebuilt local DuckDB graph of a codebase to find the transitive reverse-dependencies of a symbol or file, inspect a symbol's structural neighbourhood, and introspect the index itself. Runs over stdio or Streamable HTTP, always read-only, with no external service.52 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to query a local code graph over stdio, so they can see what a Git change may affect, find related tests, routes and nodes, and cite evidence paths — read-only and fully on-machine.MIT