Skip to main content
Glama

codegraph-mcp

GitHub 저장소용 지식 그래프 MCP 서버입니다. 모든 GitHub 저장소의 코드를 Neo4j 그래프(Repository / File / Function 노드; CONTAINS / DEFINES / IMPORTS / CALLS 엣지)로 수집하고, 해당 그래프를 읽기 전용 MCP 도구로 Claude Desktop, opencode, Cursor 또는 Model Context Protocol을 지원하는 모든 MCP 호스트에 제공합니다.

상태

v0.1 — stdio 전송, 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를 참조하세요.

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.
    23
    -
  • 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
    39 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    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