Skip to main content
Glama

codegraph-mcp

MCP-сервер графа знаний для репозиториев GitHub. Загружает код любого репозитория GitHub в граф Neo4j (узлы Repository / File / Function; ребра CONTAINS / DEFINES / IMPORTS / CALLS) и предоставляет этот граф в виде read-only MCP-инструментов любому MCP-хосту — Claude Desktop, opencode, Cursor или любому клиенту, поддерживающему Model Context Protocol.

Статус

v0.1 — транспорт stdio, backend Neo4j 5.x, парсинг с помощью Python ast + tree-sitter (JS/TS/TSX).

Related MCP server: revibe-mcp

Быстрый старт

git clone <codegraph-mcp> && cd codegraph-mcp
uv sync --extra dev              # all deps pinned via uv.lock
docker compose up -d             # Neo4j on bolt://localhost:7687
cp .env.example .env
uv run pytest -m "not slow and not integration"

Загрузка репозитория

uv run codegraph ingest https://github.com/<owner>/<name>
# → {"graph_id": "owner/name", "files": 142, "functions": 880, ...}

Подключение MCP-хоста

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "codegraph": {
      "command": "uv",
      "args": ["run", "--directory", "C:\\path\\to\\codegraph-mcp", "codegraph", "serve"]
    }
  }
}

opencode (в opencode.json)

{
  "mcp": {
    "codegraph": {
      "type": "local",
      "command": ["uv", "run", "--directory", "/path/to/codegraph-mcp", "codegraph", "serve"]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "codegraph": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/codegraph-mcp", "codegraph", "serve"]
    }
  }
}

MCP Inspector (для тестирования без MCP-хоста)

uv run mcp dev src/codegraph/server.py

CLI

Команда

Назначение

codegraph ingest <url> [--branch main] [--force]

Клонировать, разобрать и загрузить репозиторий в Neo4j

codegraph serve

Запустить MCP-сервер (stdio) — запускается MCP-хостом

codegraph reset --graph-id <owner/name>

Полностью удалить один репозиторий из Neo4j (разрушительно)

codegraph ls

Вывести список загруженных репозиториев

Инструменты

Инструмент

Назначение

list_repos

Вывести список загруженных репозиториев

init_repository_node

Подтвердить существование графа репозитория; вернуть количество файлов/функций

get_repo_structure

Иерархическое представление дерева по указанному пути

find_file_dependencies

Флагманский: какие файлы/функции зависят от файла (или от которых зависит файл)

search_nodes

Найти функции/файлы по имени

get_node_detail

Подробная информация об одном узле (диапазон строк, тип)

Технический стек

Python 3.11+, mcp>=1.27,<2 (стабильный v1.x FastMCP), Neo4j 5.x, pydantic v2, tree-sitter, GitPython, pytest, ruff, mypy, uv.

См. CONTRIBUTING.md для архитектуры, соглашений и стратегии тестирования.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    AI-native code intelligence graph that builds a persistent knowledge graph of your codebase in Neo4j and exposes it to AI assistants via MCP, enabling contextual code analysis, impact analysis, and dependency tracking.
    21
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables analysis of any GitHub repository to get architecture, file roles, execution flows, system design Q\&A, and structured agent context. Works with MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.
    6
    47
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Embeds your codebase into a local vector and graph database and exposes it as an MCP tool, enabling AI assistants to perform fast semantic search over your code using Graph RAG.
    4
    MIT

Latest Blog Posts

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/Ritesh-977/codegraph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server