プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Code-Graph-RAG

作者:vitali87バージョン 0.5.0i★ –iパソコンで動く
レジストリ名io.github.vitali87/code-graph-rag

インストール

概要

作者による説明(英語の原文)

Knowledge-graph RAG for multi-language codebases: index, query and edit code in natural language.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 検索・AIの記憶
  • 入力が必要なもの:ORCHESTRATOR_API_KEY, CYPHER_API_KEY

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: ORCHESTRATOR_PROVIDER, ORCHESTRATOR_MODEL, ORCHESTRATOR_API_KEY, CYPHER_PROVIDER, CYPHER_MODEL, CYPHER_API_KEY, MEMGRAPH_HOST, MEMGRAPH_PORT, TARGET_REPO_PATH

「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。

必要なもの

  • PyPIPythonのuvのインストール(uvxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "code-graph-rag": {
      "command": "uvx",
      "args": [
        "code-graph-rag",
        "mcp-server"
      ],
      "env": {
        "ORCHESTRATOR_PROVIDER": "your-value",
        "ORCHESTRATOR_MODEL": "your-value",
        "ORCHESTRATOR_API_KEY": "your-value",
        "CYPHER_PROVIDER": "your-value",
        "CYPHER_MODEL": "your-value",
        "CYPHER_API_KEY": "your-value",
        "MEMGRAPH_HOST": "your-value",
        "MEMGRAPH_PORT": "your-value",
        "TARGET_REPO_PATH": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add code-graph-rag --env ORCHESTRATOR_PROVIDER=your-value --env ORCHESTRATOR_MODEL=your-value --env ORCHESTRATOR_API_KEY=your-value --env CYPHER_PROVIDER=your-value --env CYPHER_MODEL=your-value --env CYPHER_API_KEY=your-value --env MEMGRAPH_HOST=your-value --env MEMGRAPH_PORT=your-value --env TARGET_REPO_PATH=your-value -- uvx code-graph-rag mcp-server

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "code-graph-rag": {
      "command": "uvx",
      "args": [
        "code-graph-rag",
        "mcp-server"
      ],
      "env": {
        "ORCHESTRATOR_PROVIDER": "your-value",
        "ORCHESTRATOR_MODEL": "your-value",
        "ORCHESTRATOR_API_KEY": "your-value",
        "CYPHER_PROVIDER": "your-value",
        "CYPHER_MODEL": "your-value",
        "CYPHER_API_KEY": "your-value",
        "MEMGRAPH_HOST": "your-value",
        "MEMGRAPH_PORT": "your-value",
        "TARGET_REPO_PATH": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "code-graph-rag": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "code-graph-rag",
        "mcp-server"
      ],
      "env": {
        "ORCHESTRATOR_PROVIDER": "your-value",
        "ORCHESTRATOR_MODEL": "your-value",
        "ORCHESTRATOR_API_KEY": "your-value",
        "CYPHER_PROVIDER": "your-value",
        "CYPHER_MODEL": "your-value",
        "CYPHER_API_KEY": "your-value",
        "MEMGRAPH_HOST": "your-value",
        "MEMGRAPH_PORT": "your-value",
        "TARGET_REPO_PATH": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • ORCHESTRATOR_PROVIDER env
    LLM provider for the orchestrator agent (openai, anthropic, google, azure, cohere, ollama)
  • ORCHESTRATOR_MODEL env
    Model name for the orchestrator agent
  • ORCHESTRATOR_API_KEY 秘密 env
    API key for the orchestrator LLM provider (not needed for the default local ollama provider)
  • CYPHER_PROVIDER env
    LLM provider for Cypher query generation (openai, anthropic, google, azure, cohere, ollama)
  • CYPHER_MODEL env
    Model name for Cypher query generation
  • CYPHER_API_KEY 秘密 env
    API key for the Cypher LLM provider (not needed for the default local ollama provider)
  • MEMGRAPH_HOST env
    Hostname of the Memgraph database
  • MEMGRAPH_PORT env
    Port of the Memgraph database
  • TARGET_REPO_PATH env
    Path to the repository to analyze (auto-detected from working directory if not set)

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント vitali87 で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

検索・AIの記憶のほかのサーバーとの比較i

  • このカテゴリのほかの7231件のうち0%よりスターが多い
  • このカテゴリのほかの7231件のうち91%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの7231件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Code-Graph-RAGは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

入力が必要なもの:ORCHESTRATOR_API_KEY, CYPHER_API_KEY

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.5.0)がレジストリに届いたのは3 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。

代わりに使えるものは?

同じカテゴリには:Context7, Codebase Memory, Exa

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Context7

作者:upstash

Up-to-date docs for AI agents

パソコンでもクラウドでも★ 64,224MIT3 日前更新
インストール

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

パソコンで動く★ 48,148MIT20 日前更新
インストール

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

クラウドで動く★ 5,213MIT44 日前更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

Code-Graph-RAG

Code-Graph-RAG parses a multi-language codebase with Tree-sitter, sharpened by compiler-grade frontends and runtime traces where available, builds a knowledge graph of its structure in an embedded graph database that needs no server, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema.

  1. Index: cgr start --update-graph parses a repository into a knowledge graph (sped up)
  1. Ask: cgr start answers questions and edits code, grounded in that graph

Latest News 🔥

  • Rust Upgrade: Updated Rust to version 1.99.1-slim-trixie.
  • Signature Functionality: Added support for reading and writing JavaScript headers for change signatures, including the ability to change the signature of JavaScript functions or methods.
  • macOS Compatibility: The build now leaves macOS-14 support.

See NEWS.md for the full history.

What It Does

Point Code-Graph-RAG at a repository and it reads every source file, extracts functions, classes, methods, modules, and the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:

  • Ask questions about the codebase in natural language and get answers grounded in the real structure.
  • Retrieve the actual source of any function, class, or method by name or by intent.
  • Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
  • Optimise code against language best practices or your own coding standards.
  • Find dead code by walking call and reference edges from entry points.
  • Search and rewrite structurally by AST pattern with ast-grep.
  • Overlay runtime behaviour: trace a test run (or pull production eBPF profiles) with cgr trace and merge the calls that actually happened into the graph, exposing dispatch that static analysis cannot see.

How It Works

The system has two components:

  1. Multi-language parser. A Tree-sitter based parser reads the codebase and ingests functions, classes, methods, modules, and their relationships into the graph under a single language-agnostic schema. Where a toolchain is available, compiler-grade frontends layer exact facts on top (libclang for C/C++, go/types for Go, and opt-in Roslyn, javac and Jedi for C#, Java and Python), and dynamic tracing merges calls observed at runtime. Tree-sitter stays the backbone: a trace only sees code that ran, and a compiler frontend only covers what its toolchain can build.
  2. RAG system (codebase_rag/). An interactive CLI that turns natural language into Cypher queries, retrieves matching code, and drives AI-powered editing and optimisation.
Source Code -> Tree-sitter Parser -> AST Analysis -> Knowledge Graph

| User Query -> AI Model (Cypher Gen) -> Cypher Query -> Graph Results -> Response

The graph is stored in an embedded SQLite file by default. Memgraph and Neo4j are opt-in backends that run the same Cypher; Graph Backends compares them.

See the Architecture Overview and Graph Schema for the full picture.

Supported Languages

Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, Dart, and Julia are fully supported. Scala is in development, and Ruby, Kotlin, Swift, Elixir, Haskell, Solidity, Bash, and Nix have structural support (modules, functions, classes where the language has them, and imports) through the pluggable ast-grep tier. See the Language Support matrix for per-language capabilities.

Installation

cgr is published to PyPI. Install it system-wide with the treesitter-full (tree-sitter grammars), ast-grep (Ruby, Kotlin, Swift, Elixir, Haskell, Solidity, Bash, Nix) and semantic (vector search) extras:

# with uv (recommended)

uv tool install "code-graph-rag[treesitter-full,ast-grep,semantic]"

or with pipx

pipx install "code-graph-rag[treesitter-full,ast-grep,semantic]"

Which version am I getting?

Three version lines exist and they intentionally differ:

wherewhat it tracks
git tagsevery version, one per merge
GitHub Releases (binaries, signatures)every 50th version, plus any security fix, breaking change or merge labelled release now
PyPIevery 50th version, plus any security fix, breaking change or merge labelled release now

So the newest tag on main usually runs ahead of the newest release, often by tens of patch versions; they coincide only just after a release. Nothing is stuck, the cadences differ by design. A security fix, a breaking change or a merge a maintainer labels release now does NOT wait for the cadence: each ships a release and a PyPI upload immediately.

uv tool install and pipx install give you the newest PyPI version, which is the newest RELEASE, not the newest tag. Interim tags exist so every merge is addressable; binaries and PyPI uploads follow the cadence above.

To run code newer than the latest release, install from git:

uv tool install "code-graph-rag[treesitter-full,ast-grep,semantic] @ git+https://github.com/vitali87/code-graph-rag@main"

To upgrade an existing install, run uv tool upgrade code-graph-rag (with pipx, pipx upgrade code-graph-rag, or pipx reinstall code-graph-rag for a git install). Upgrade covers the other install methods.

You also need Python 3.12+ and ripgrep. The graph lives in an embedded SQLite file by default, so there is no database server to run: no Docker and no cmake. Memgraph and Neo4j remain available as opt-in backends (Graph Backends). Full prerequisites, source installs, and environment setup are in the Installation guide.

[!NOTE]

The wheel is pure Python (py3-none-any), so it installs on any platform with Python 3.12 or newer. Older system interpreters (Debian Bookworm ships 3.11) need the interpreter pinned explicitly; see Installation for the commands.

Quick Start

# Parse a repository into the graph, then query it

cgr start --repo-path /path/to/repo --update-graph cgr start --repo-path /path/to/repo

The graph is written to ~/.cgr/graph.sqlite (set SQLITE_GRAPH_PATH to move it). To use Memgraph instead, install the driver with the memgraph extra, set GRAPH_BACKEND=memgraph, and start the packaged Memgraph + Qdrant stack with cgr daemon up.

Repeat the first command for each repository you want indexed; the graph is shared, and syncing one project leaves the others alone. To start over from an empty graph, add --clean — it deletes every project in the shared graph, not just this one, and asks for confirmation first when other projects would be destroyed.

A default index leaves out the opt-in capture groups; add them with --capture or CGR_CAPTURE.

The Quick Start guide walks through parsing, querying, and exporting in five minutes.

MCP Server

Code-Graph-RAG runs as an MCP server so Claude Code and other MCP clients can query and edit your codebase directly. See the MCP Server guide for setup.

Documentation

Getting Started

  • Installation
  • Quick Start
  • Configuration

User Guide

  • CLI Reference
  • Interactive Querying
  • Code Optimisation
  • Dead Code Detection
  • Dynamic Call Tracing
  • Graph Export
  • Real-Time Updates
  • C/C++ Semantic Mode
  • MCP Server
  • Porting Between Languages

Architecture

  • Overview
  • Graph Schema
  • Graph Backends
  • Language Support
  • Data-Flow Edges

Python SDK

  • Overview
  • Graph Loader
  • Cypher Generator
  • Semantic Search

Advanced

  • Adding Languages
  • Ignore Patterns
  • Building Binaries
  • Troubleshooting

Enterprise Services

Code-Graph-RAG is open source and free to use. For organisations that need more, we offer fully managed cloud-hosted solutions and on-premise deployments:

-

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く