FG

faraazahmad/graphsense

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

35 stars 2 forks 品質 65 トレンド 12MIT

静的解析を用いたコードインテリジェンスを提供するMCPサーバー

概要

グラフデータベース、ベクター検索、LLM を組み合わせたコード解析と検索システムで、自然言語でコードベースを理解し、クエリできます。 JavaScript/TypeScript のコードベースを、Neo4j のグラフデータベースと PostgreSQL のベクターデータベースにインデックス化し、コード構造、依存関係、セマンティックな関係に関する高度なクエリを可能にします。 - : グラフベースの構造解析をセマンティックベクター検索と組み合わせます。 - : 普通の英語のコードベースに関する質問をします。 - : 意味のある類似性と構造的な関係に基づいて機能を見つけます。 - : インポート関係と関数の呼び出し階層を理解します。 - : LLM を使って関数の要約を自動的に生成します。 - : ファイル監視でコードベースを処理します。 - : MCP によるテキストエディタやAI エージェントとの統合 Note: ~/.graphsense/ で宣言された環境変数が必要になります.

概要(AI 翻訳)

グラフデータベース、ベクター検索、LLM を組み合わせたコード解析と検索システムで、自然言語でコードベースを理解し、クエリできます。

お問い合わせ

JavaScript/TypeScript のコードベースを、Neo4j のグラフデータベースと PostgreSQL のベクターデータベースにインデックス化し、コード構造、依存関係、セマンティックな関係に関する高度なクエリを可能にします。

##特徴

-マルチモーダルコード解析:グラフベースの構造解析をセマンティックベクター検索と組み合わせる。 -Natural Language Queries: プレーン英語のコードベースに関する質問をしてください。 -Function Discovery: 意味のある類似性と構造的な関係に基づいて機能を見つける。 -Dependency Tracking:インポートの関係と関数呼び出し階層を理解します。

  • AI-Powered Summaries: LLM を使用して機能の合計を自動的に生成します。
  • リアルタイム解析:ファイル監視でコードベースを処理します。 -MCPインテグレーション:MCPを介してテキストエディタまたはAIエージェントと統合します。

クイックスタート

Note: [~/.graphsense/.env で宣言された環境変数が必要です:

環境変数

必須変数(指定しない)

  • [ANTHROPIC_API_KEY - Claude API キー

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

GraphSense Code Graph RAG

A code analysis and retrieval system that combines graph databases, vector search, and LLMs to understand and query codebases through natural language.


It indexes JavaScript/TypeScript codebases into both a Neo4j graph database and a PostgreSQL vector database, enabling sophisticated queries about code structure, dependencies, and semantic relationships.

Features

  • Multi-Modal Code Analysis: Combines graph-based structural analysis with semantic vector search.
  • Natural Language Queries: Ask questions about your codebase in plain English.
  • Function Discovery: Find functions based on semantic similarity and structural relationships.
  • Dependency Tracking: Understand import relationships and function call hierarchies.
  • AI-Powered Summaries: Automatically generates summaries for functions using LLMs.
  • Real-time Analysis: Processes codebases incrementally with file watching.
  • MCP Integration: Integrates with your text editor or AI agent via MCP.

Quick Start

# Navigate to your git repository
$ cd ~/path/to/repo

# Run GraphSense from within the repository
$ npx graphsense

Note: You will need environment variables declared in ~/.graphsense/.env:

Environment Variables

Required variables (must be set):

  • ANTHROPIC_API_KEY - Claude API key
  • PINECONE_API_KEY - Pinecone API key

Prerequisites

  • Node.js 16+
  • Docker
  • Must be run from within a git repository (GraphSense will exit if not)
  • API Keys for:

Model Context Protocol (MCP) Integration

GraphSense provides an MCP server to integrate with AI assistants like Claude Desktop, enabling natural language queries about your codebase.

MCP Configuration

The MCP server uses stdio transport and is automatically started when you run the main application.

Starting GraphSense MCP

# Navigate to your git repository
$ cd ~/path/to/repo

# Run GraphSense from within the repository
$ npx graphsense

Claude Desktop Configuration

Add this to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "graphsense": {
      "command": "npx",
      "args": ["graphsense"],
      "env": {}
    }
  }
}

Note: Your preferred AI coding editor/agent will have similar configuration options.

Available MCP Tools

  • similar_functions - Find functions based on semantic description

    • Parameters: function_description (string), topK (number, optional)
    • Returns: Array of similar functions with similarity scores
  • function_callers - Find functions that call a specific function

    • Parameters: functionId (string) - The element ID of the target function
GitHub で README 全文を見る

インストール

npx graphsense
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "graphsense": { "command": "npx", "args": ["graphsense"], "env": {} } } }