Documentation
Get started with Code-Graph-RAG
Everything you need to install, configure, and start using Code-Graph-RAG.
Quick Start
terminal
# 1. Clone the repositorygit clone https://github.com/vitali87/code-graph-rag.gitcd code-graph-rag# 2. Install dependencies (full multi-language support)uv sync --extra treesitter-full# 3. Set up environmentcp .env.example .env# Edit .env with your API keys and configuration# 4. Start Memgraphdocker compose up -d memgraph# 5. Parse your codebaseuv run python -m codebase_rag.ingest /path/to/your/project# 6. Start queryinguv run python -m codebase_rag.main
Claude Code / MCP Setup
terminal
# Add as MCP server in Claude Codeclaude mcp add code-graph-rag \-e MEMGRAPH_HOST=localhost \-e MEMGRAPH_PORT=7687 \-- uv run --directory /path/to/code-graph-rag mcp_server.py# Verify it's workingclaude mcp list
Full Documentation
Full README
Complete documentation with all features and configuration options
Claude Code Setup
Step-by-step guide for MCP server integration with Claude Code
Contributing Guide
How to contribute new language parsers and features
Graph Schema
Node types, relationships, and property definitions
Configuration Reference
All environment variables and configuration options
Environment Variables
| Variable | Description | Default |
|---|---|---|
| ORCHESTRATOR_PROVIDER | AI provider for orchestrator (ollama, openai, google) | ollama |
| ORCHESTRATOR_MODEL | Model name for orchestrator | llama3.2 |
| ORCHESTRATOR_API_KEY | API key (for cloud providers) | — |
| CYPHER_PROVIDER | AI provider for Cypher generation | ollama |
| CYPHER_MODEL | Model name for Cypher generation | codellama |
| CYPHER_API_KEY | API key (for cloud providers) | — |
| MEMGRAPH_HOST | Memgraph database host | localhost |
| MEMGRAPH_PORT | Memgraph database port | 7687 |
Graph Schema
Node Types
| Type | Properties |
|---|---|
| Function | name, file_path, line_number, end_line, source_code, language, is_method |
| Class | name, file_path, line_number, end_line, language |
| Module | name, file_path, language |
| File | path, language, size |
| Package | name, version, source |
Relationships
| Type | From → To | Description |
|---|---|---|
| CALLS | Function → Function | Function invocation |
| CONTAINS | Module/Class → Function/Class | Containment hierarchy |
| IMPORTS | Module → Module | Import/require relationships |
| INHERITS | Class → Class | Class inheritance |
| IMPLEMENTS | Class → Class | Interface implementation |