
faraazahmad/graphsense
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP 서버는 정적 분석을 사용하여 코드 인텔리전스 제공
개요
그래프 데이터베이스, 벡터 검색 및 LLM을 결합하여 자연 언어를 통해 코베이스를 이해하고 쿼리하는 코드 분석 및 검색 시스템. JavaScript/TypeScript codebases를 네오4j 그래프 데이터베이스와 PostgreSQL 벡터 데이터베이스 모두에 색인하여 코드 구조, 의존성 및 semantic 관계에 대해 정교한 쿼리를 가능하게 합니다. - : 그래픽 기반 구조 분석과 semantic 벡터 검색. - : 일반 영어의 codebase에 대한 질문. - : semantic similarity와 구조상 관계에 근거를 둔 기능 찾기. - : 수입 관계와 함수 호출 계층을 이해한다. - : 자동 LLM을 사용하여 기능에 대한 summaries를 생성합니다. - : File watch를 사용하여 codebases를 incrementally 처리합니다. - : MCP를 통해 텍스트 편집기 또는 AI 에이전트와 통합합니다. 참고: ~/.graphsense/에 선언된 환경 변수가 필요합니다.
개요(AI 번역)
그래프 데이터베이스, 벡터 검색 및 LLM을 결합하여 자연 언어를 통해 코베이스를 이해하고 쿼리하는 코드 분석 및 검색 시스템.
JavaScript/TypeScript codebases를 네오4j 그래프 데이터베이스와 PostgreSQL 벡터 데이터베이스 모두에 색인하여 코드 구조, 의존성 및 semantic 관계에 대해 정교한 쿼리를 가능하게 합니다.
특징
- Multi-Modal Code Analysis: 그래픽 기반 구조 분석과 semantic 벡터 검색.
- Natural Language Queries: 일반 영어에서 코드베이스에 대한 질문. -Function Discovery: semantic 유사성 및 구조적 관계에 근거한 기능을 찾습니다. -Dependency Tracking: 수입 관계와 함수 호출 계층을 이해합니다.
- **AI 전원 **: 자동으로 LLM을 사용하여 기능에 대한 summaries를 생성합니다. -Real-time Analysis: 파일 보기와 함께 코드베이스를 incrementally 처리한다.
- **MCP 통합 **: MCP를 통해 텍스트 편집기 또는 AI 에이전트와 통합합니다.
빠른 시작
참고 : ~/.graphsense/.env]에 선언된 환경 변수가 필요합니다.
환경 변수
필수 변수 (must set):
ANTHROPIC_API_KEY- 클로드 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 keyPINECONE_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:
- Anthropic (Claude) - Get API Key
- Pinecone - Get API Key
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
- Parameters:
-
function_callers- Find functions that call a specific function- Parameters:
functionId(string) - The element ID of the target function
- Parameters:
설치
npx graphsense설정
{
"mcpServers": {
"graphsense": {
"command": "npx",
"args": ["graphsense"],
"env": {}
}
}
}