code-atlas-mcp
██████╗ ██████╗ ██████╗ ███████╗ █████╗ ████████╗██╗ █████╗ ███████╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔══██╗╚══██╔══╝██║ ██╔══██╗██╔════╝
██║ ██║ ██║██║ ██║█████╗ █████╗███████║ ██║ ██║ ███████║███████╗
██║ ██║ ██║██║ ██║██╔══╝ ╚════╝██╔══██║ ██║ ██║ ██╔══██║╚════██║
╚██████╗╚██████╔╝██████╔╝███████╗ ██║ ██║ ██║ ███████╗██║ ██║███████║
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝
[ M C P ]Высокопроизводительный AST-ориентированный сервер Model Context Protocol
Подключайте Claude Code, Claude Desktop и автономных AI-агентов напрямую к структурным AST-картам кода, токен-эффективным скелетам и анализу радиуса поражения PR.
📖 Обзор
Современные LLM-агенты для написания кода тратят до 70% своего контекстного окна на поглощение сырых деревьев файлов и избыточного содержимого файлов. При изменении больших кодовых баз AI-ассистенты часто не видят:
Нисходящих вызывающих и зависимых компонентов: Изменение сигнатуры экспортируемой функции ломает вызывающих её за 5 каталогов отсюда.
Раздувание токенов: Полные дампы файлов расходуют контекст на тела реализаций вместо определений типов и сигнатур.
Радиус поражения регрессий PR: Отсутствие информации о том, какие наборы модульных и интеграционных тестов покрывают изменённые AST-узлы.
code-atlas-mcp решает эту задачу, предоставляя AST-ориентированный интеллектуальный слой через стандартный Model Context Protocol (MCP). Он разбирает исходные файлы в структурные деревья символов, обрезает тела функций до токен-эффективных скелетов кода, изолирует изменённые AST-узлы в git-диффах и вычисляет транзитивный радиус поражения регрессий.
Related MCP server: MCP Filesystem Server
🏛️ Архитектура
┌────────────────────────────────────────────────────────────────────────┐
│ AI Coding Clients │
│ (Claude Code CLI / Claude Desktop / Cursor / Custom Agents) │
└──────────────────────────────────┬─────────────────────────────────────┘
│ MCP Protocol (JSON-RPC over stdio)
▼
┌────────────────────────────────────────────────────────────────────────┐
│ code-atlas-mcp │
│ ┌───────────────────────────────┬──────────────────────────────────┐ │
│ │ MCP Request Router │ Tool Schema Validators │ │
│ │ (ListTools / CallTool Handler)│ (Zod Runtime) │ │
│ └───────────────┬───────────────┴──────────────────┬───────────────┘ │
│ ▼ ▼ │
│ ┌───────────────────────────────┐ ┌───────────────────────────────┐ │
│ │ AST Engine │ │ Git Engine │ │
│ │ • TypeScript Compiler API │ │ • Unified Diff Parser │ │
│ │ • Symbol & Hierarchy Extr. │ │ • Line-to-AST Correlation │ │
│ │ • Token-Efficient Skeletons │ │ • Working Tree / Ref Diffs │ │
│ └───────────────┬───────────────┘ └───────────────┬───────────────┘ │
│ └───────────────┬──────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ Impact Analyzer │ │
│ │ • Downstream Callers Graph • Transitive Dependency BFS │ │
│ │ • Test Suite Coverage Map • Risk Scoring & Assessment Engine │ │
│ └──────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────┬─────────────────────────────────────┘
▼
┌────────────────────────────────────────────────────────────────────────┐
│ Local Codebase │
│ Filesystem (.ts, .tsx, .js, .jsx) & .git │
└────────────────────────────────────────────────────────────────────────┘⚡ Основные MCP-инструменты
1. get_repo_structure
Возвращает иерархическую, AST-обрезанную структурную карту репозитория с опциональными токен-эффективными скелетами кода. Удаляет тела функций, сохраняя полные сигнатуры, экспортируемые интерфейсы, типы и docstring-комментарии.
Параметры
Параметр | Тип | Обязательный | Описание | По умолчанию |
|
| Нет | Целевой каталог репозитория. | Текущий рабочий каталог |
|
| Нет | Генерировать токен-эффективные скелеты кода с удалёнными телами функций. |
|
|
| Нет | Максимальная глубина обхода каталогов (1-20). |
|
|
| Нет | Массив glob-шаблонов папок/файлов для игнорирования. |
|
|
| Нет | Массив разрешённых расширений (например, | Стандартные TS/JS |
Пример вывода инструмента
{
"rootDir": "/workspace/my-app",
"totalFiles": 42,
"totalSymbols": 318,
"fileTree": {
"name": "src",
"type": "directory",
"children": [
{
"name": "auth.ts",
"type": "file",
"symbolsCount": 4,
"summary": {
"language": "typescript",
"linesOfCode": 120,
"symbols": [
{
"name": "verifyJwt",
"kind": "function",
"signature": "export function verifyJwt(token: string): Promise<JwtPayload>",
"startLine": 15,
"endLine": 42,
"isExported": true
}
],
"astSkeleton": "import { JwtPayload } from \"./types.js\";\n\nexport function verifyJwt(token: string): Promise<JwtPayload>;"
}
}
]
}
}2. analyze_diff_impact
Анализирует изменённые AST-узлы между ветками, коммитами или незакоммиченным рабочим деревом для определения затронутых нисходящих функций, классов и компонентов.
Параметры
Параметр | Тип | Обязательный | Описание | По умолчанию |
|
| Нет | Базовая git-ревизия или ветка (например, | Незакоммиченное рабочее дерево |
|
| Нет | Целевая git-ревизия или ветка (например, | Состояние рабочего дерева |
|
| Нет | Путь к корню git-репозитория. | Текущий рабочий каталог |
Пример вывода инструмента
{
"baseRef": "main",
"headRef": "HEAD",
"changedFilesCount": 2,
"modifiedFiles": ["src/auth/jwt.ts"],
"modifiedAstNodes": [
{
"filePath": "src/auth/jwt.ts",
"symbol": {
"name": "verifyJwt",
"kind": "function",
"signature": "export function verifyJwt(token: string, options?: VerifyOptions): Promise<JwtPayload>",
"startLine": 12,
"endLine": 35,
"isExported": true
},
"changeType": "modified",
"modifiedLines": [12, 13, 14]
}
],
"affectedDownstream": [
{
"symbolName": "verifyJwt",
"sourceFile": "src/auth/jwt.ts",
"dependentFile": "src/middleware/auth.ts",
"impactType": "direct_import",
"reason": "File 'src/middleware/auth.ts' directly imports symbol 'verifyJwt' modified in 'src/auth/jwt.ts'"
}
],
"summary": "Diff Impact Analysis: 1 file(s) modified across 1 distinct AST symbol(s). Identified 1 downstream dependent reference(s) that require verification."
}3. inspect_blast_radius
Определяет потенциальные точки регрессий, транзитивных нисходящих зависимых (обход BFS) и сломанные наборы тестов для целевого изменения файла. Вычисляет оценку риска от 0 до 100 с указанием критических факторов.
Параметры
Параметр | Тип | Обязательный | Описание | По умолчанию |
|
| Да | Путь к целевому исходному файлу (например, | — |
|
| Нет | Путь к корню репозитория. | Текущий рабочий каталог |
Пример вывода инструмента
{
"targetFile": "src/services/user.ts",
"targetSymbols": [ /* AST Symbols */ ],
"directDependents": [
{
"filePath": "src/controllers/auth.ts",
"importedSymbols": ["getUserById", "updateUser"]
}
],
"transitiveDependents": [
{
"filePath": "src/routes/api.ts",
"depth": 2,
"chain": ["src/services/user.ts", "src/controllers/auth.ts", "src/routes/api.ts"]
}
],
"affectedSuites": [
{
"testFile": "tests/auth.test.ts",
"reliesOn": ["src/services/user.ts", "src/controllers/auth.ts"],
"riskLevel": "HIGH",
"potentialFailures": ["getUserById", "updateUser"]
}
],
"riskAssessment": {
"score": 65,
"level": "HIGH",
"factors": [
"Exports 4 symbol(s)",
"High direct coupling: 3 direct dependent files",
"Moderate cascade: 5 transitive dependents",
"1 test suite(s) actively verify dependent code"
]
}
}🚀 Установка и быстрый старт
Глобальная установка через CLI
npm install -g code-atlas-mcpЗапуск напрямую через NPX
npx code-atlas-mcp --root /path/to/your/project🤖 Конфигурация интеграции с Claude
Настройка Claude Desktop
Добавьте code-atlas-mcp в ваш claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"code-atlas": {
"command": "npx",
"args": [
"-y",
"code-atlas-mcp"
]
}
}
}Если вы хотите закрепить конкретный каталог репозитория:
{
"mcpServers": {
"code-atlas": {
"command": "npx",
"args": [
"-y",
"code-atlas-mcp",
"--root",
"/absolute/path/to/your/repository"
]
}
}
}Настройка Claude Code CLI
Запустите claude с подключённым MCP-сервером:
claude --mcp-server "npx -y code-atlas-mcp"🛠️ Разработка и тестирование
Предварительные требования
Node.js >= 18.0.0
npm >= 9.0.0
Git CLI
Настройка
# Clone the repository
git clone https://github.com/GeorgeTsakonas/code-atlas-mcp.git
cd code-atlas-mcp
# Install dependencies
npm install
# Build TypeScript to dist/
npm run build
# Run unit and integration tests with Vitest
npm test
# Run tests in watch mode
npm run test:watch
# Type check
npm run lint🗺️ Дорожная карта
Извлечение AST через TypeScript Compiler API
Генерация токен-эффективных скелетов (с удалёнными телами)
Сопоставление строк git-диффа с AST-узлами
Граф нисходящих зависимостей и анализ влияния на места вызовов
Проверка транзитивного радиуса поражения и определение наборов тестов
Транспорт stdio по стандарту MCP
Поддержка Python-движка парсинга AST (
ast/ Tree-sitter)Модули парсинга AST для Rust и Go
Семантический векторный поиск по AST-символам
🤝 Вклад в проект
Вклад приветствуется! Пожалуйста, не стесняйтесь отправлять Pull Request.
Сделайте форк проекта
Создайте свою ветку функции (
git checkout -b feature/AmazingFeature)Зафиксируйте изменения (
git commit -m 'Add some AmazingFeature')Отправьте изменения в ветку (
git push origin feature/AmazingFeature)Откройте Pull Request
📄 Лицензия
Распространяется под лицензией MIT. См. LICENSE для получения дополнительной информации.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to understand and navigate codebases through structural analysis. Provides code mapping, symbol search, and impact analysis using ast-grep for accurate parsing of Python, JavaScript, TypeScript, and Go projects.452MIT
- AlicenseNot gradedqualityDmaintenanceProvides LLM-optimized tools for advanced code analysis, repository complexity evaluation, and call graph generation. It enables users to visualize directory structures, detect code patterns, and build semantic context with significant token savings.11MIT
- AlicenseAqualityCmaintenanceStructural graph map of any codebase. Scans entities, relationships, and feature flows across 13 languages so LLMs navigate by structure instead of reading everything.614MIT
- AlicenseBqualityAmaintenanceEnables LLMs to efficiently read, write, and refactor code using precise AST-based operations, reducing token usage and context window waste.25573MIT
Related MCP Connectors
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GeorgeTsakonas/code-atlas-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server