SC

sdsrss/code-graph-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

97 stars 19 forks Качество 85 Тренд 21MIT

sdsrss/code-graph-mcp - кандидат на сервер MCP, импортированный из https://github.com/sdsrss/code-graph-mcp.

Обзор

sdsrss/code-graph-mcp - кандидат на сервер MCP, импортированный из https://github.com/sdsrss/code-graph-mcp.

Обзор (машинный перевод)

Высокопроизводительный графовый сервер знаний кода, реализующий протокол Model Context Protocol (MCP). Индексирует кодовые базы в структурированный граф знаний AST с семантическим поиском, обходом графа вызова и отслеживанием маршрутов HTTP, предназначенный для глубокого структурированного понимания вашего кода помощниками по кодированию ИИ.

Особенности

  • Многоязыковой парсинг — извлечение древовидной АСТ по уровням глубины: Full (звонки + импорт + наследование): TypeScript/TSX, JavaScript, Go, Python, Rust, Java. Извлечение HTTP-маршрутов дополнительно охватывает TypeScript/TSX + JavaScript (Express/Connect), Go ([T0]), Python (Flask/FastAPI) и Rust axum ([T1]) с встроенными префиксами .nest(); только именованные обработчики) — actix/rocket и Java Spring еще не извлечены из маршрута. Испытываемый дым (звонки + импорт + наследование): C#, Kotlin, Ruby, PHP, Swift, Dart Ограниченный (функции + звонки + #include импорт + маркеры тестового тестирования + наследование базового класса C++ + Class::method квалификация области): C, C++ Скриптинг: Баш (функции + команды + source/. импорт), Маркдаун (товарные позиции) File-FTS only (без извлечения символа AST): HTML, CSS, JSON

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

code-graph-mcp

A high-performance code knowledge graph server implementing the Model Context Protocol (MCP). Indexes codebases into a structured AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing — designed to give AI coding assistants deep, structured understanding of your code.

Features

  • Multi-language parsing — Tree-sitter AST extraction across tiers of depth:
    • Full (calls + imports + inheritance): TypeScript/TSX, JavaScript, Go, Python, Rust, Java. HTTP route extraction additionally covers TypeScript/TSX + JavaScript (Express/Connect), Go (net/http), Python (Flask/FastAPI), and Rust axum (.route() chains with inline .nest() prefixes; named handlers only) — actix/rocket and Java Spring are not yet route-extracted
    • Smoke-tested (calls + imports + inheritance): C#, Kotlin, Ruby, PHP, Swift, Dart
    • Limited (functions + calls + #include imports + gtest test markers + C++ base-class inheritance + Class::method scope qualification): C, C++
    • Scripting: Bash (functions + commands + source/. imports), Markdown (headings)
    • File-FTS only (no AST symbol extraction): HTML, CSS, JSON
    • Test markers — detected from the AST for Rust (#[test] / #[cfg(test)]), JavaScript/TypeScript/TSX (describe/it/test blocks and their callbacks) and C/C++ (gtest TEST macros). Go, Python, Java and the rest fall back to path/name heuristics (tests/, src/test/java/, *_test.*, *.test.js, test_*, *Test)
    • Value/type references — a references relation for symbols that are used without being called, imported or inherited (path-qualified constants, type-position uses, functions passed as values): Rust, TypeScript/TSX, JavaScript, Python, Go, Java, C, C++
  • Semantic code search — Hybrid BM25 full-text + vector semantic search with Reciprocal Rank Fusion (RRF), powered by sqlite-vec
  • Call graph traversal — Recursive CTE queries to trace callers/callees with cycle detection
  • HTTP route tracing — Map route paths to backend handler functions (Express, Flask/FastAPI, Go net/http, Rust axum)
  • Dead code detection — Find unreferenced symbols with smart Orphan/Exported-Unused classification
  • Impact analysis — Determine the blast radius of code changes by tracing all dependents
  • Incremental indexing — Merkle tree change detection with a file system watcher; changed files are re-indexed when the next MCP query tool call arrives (get_index_status does not count). Smart event filtering skips metadata-only changes (chmod, xattr)
Открыть полный README на GitHub

Установка

npx -y @sdsrs/code-graph
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "code-graph": { "command": "npx", "args": ["-y", "@sdsrs/code-graph"] } } }