codegraph-mcp
codegraph-mcp
Servidor MCP de Grafo de Conocimiento para repositorios de GitHub. Ingiere el código de cualquier repositorio de GitHub en un grafo de Neo4j (nodos: Repositorio / Archivo / Función; aristas: CONTAINS / DEFINES / IMPORTS / CALLS) y expone dicho grafo como herramientas MCP de solo lectura a cualquier host MCP: Claude Desktop, opencode, Cursor o cualquier cliente que hable el Model Context Protocol.
Estado
v0.1 — transporte stdio, backend Neo4j 5.x, análisis con ast de Python + tree-sitter (JS/TS/TSX).
Related MCP server: revibe-mcp
Inicio rápido
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"Ingresar un repositorio
uv run codegraph ingest https://github.com/<owner>/<name>
# → {"graph_id": "owner/name", "files": 142, "functions": 880, ...}Conectar un host MCP
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"codegraph": {
"command": "uv",
"args": ["run", "--directory", "C:\\path\\to\\codegraph-mcp", "codegraph", "serve"]
}
}
}opencode (en 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 (para pruebas sin un host MCP)
uv run mcp dev src/codegraph/server.pyCLI
Comando | Propósito |
| Clonar + analizar + cargar un repositorio en Neo4j |
| Ejecutar el servidor MCP (stdio) — iniciado por el host MCP |
| Eliminar por completo un repositorio de Neo4j (destructivo) |
| Listar repositorios ingeridos |
Herramientas
Herramienta | Propósito |
| Listar repositorios ingeridos |
| Confirmar que existe el grafo de un repositorio; devolver conteos de archivos/funciones |
| Vista de árbol jerárquica dentro de una ruta |
| Estrella: qué archivos/funciones dependen de (o son dependidos por) un archivo |
| Buscar funciones/archivos por nombre |
| Detalle profundo de un nodo (rango de líneas, tipo) |
Stack tecnológico
Python 3.11+, mcp>=1.27,<2 (FastMCP estable v1.x), Neo4j 5.x, pydantic v2, tree-sitter, GitPython, pytest, ruff, mypy, uv.
Consulta CONTRIBUTING.md para la arquitectura, convenciones y estrategia de pruebas.
This server cannot be deployed
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
An MCP server that gives your AI access to the source code and docs of all public github repos
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAI-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.23-
- AlicenseAqualityDmaintenanceEnables 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.639 npm1MIT
- AlicenseNot gradedqualityCmaintenanceProvides 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.3Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEmbeds 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.4MIT