
rileylemm/graphrag_mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
rileylemm/graphrag mcp - кандидат на сервер MCP, импортированный из https://github.com/rileylemm/graphrag_mcp.
Обзор
rileylemm/graphrag mcp - кандидат на сервер MCP, импортированный из https://github.com/rileylemm/graphrag_mcp.
Обзор (машинный перевод)
Сервер Model Context Protocol для запроса гибридной системы графовых и векторных баз данных, объединяющий Neo4j (графовая база данных) и Qdrant (векторная база данных) для мощного семантического и графового поиска документов.
Обзор
GraphRAG MCP обеспечивает бесшовную интеграцию между крупными языковыми моделями и гибридной системой поиска, которая использует преимущества как графовых баз данных (Neo4j), так и векторных баз данных (Qdrant). Это позволяет:
Семантический поиск через встраивание документов Расширение контекста на основе графика после отношений Гибридный поиск, сочетающий векторное сходство с графовыми отношениями Полная интеграция с Claude и другими LLM через MCP
Этот проект соответствует спецификации Model Context Protocol, что делает его совместимым с любым клиентом с поддержкой MCP.
Особенности
Семантический поиск с использованием вставок предложений и Qdrant Расширение контекста на основе графов с использованием Neo4j Гибридный поиск**, сочетающий оба подхода ** Инструменты и ресурсы MCP** для интеграции LLM
- Полная документация по схеме Neo4j и информации о сборе Qdrant
Предпосылки
Python 3.12+ Neo4j работает на localhost:7687 (конфигурация по умолчанию)
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
GraphRAG MCP Server
A Model Context Protocol server for querying a hybrid graph and vector database system, combining Neo4j (graph database) and Qdrant (vector database) for powerful semantic and graph-based document retrieval.
Overview
GraphRAG MCP provides a seamless integration between large language models and a hybrid retrieval system that leverages the strengths of both graph databases (Neo4j) and vector databases (Qdrant). This enables:
- Semantic search through document embeddings
- Graph-based context expansion following relationships
- Hybrid search combining vector similarity with graph relationships
- Full integration with Claude and other LLMs through MCP
This project follows the Model Context Protocol specification, making it compatible with any MCP-enabled client.
Features
- Semantic search using sentence embeddings and Qdrant
- Graph-based context expansion using Neo4j
- Hybrid search combining both approaches
- MCP tools and resources for LLM integration
- Full documentation of Neo4j schema and Qdrant collection information
Prerequisites
- Python 3.12+
- Neo4j running on localhost:7687 (default configuration)
- Qdrant running on localhost:6333 (default configuration)
- Document data indexed in both databases
Installation
Quick Start
-
Clone this repository:
git clone https://github.com/rileylemm/graphrag_mcp.git cd graphrag_mcp -
Install dependencies with uv:
uv install -
Configure your database connections in the
.envfile:# Neo4j Configuration NEO4J_URI=bolt://localhost:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=password # Qdrant Configuration QDRANT_HOST=localhost QDRANT_PORT=6333 QDRANT_COLLECTION=document_chunks -
Run the server:
uv run main.py
Detailed Setup Guide
For a detailed guide on setting up the underlying hybrid database system, please refer to the companion repository: GraphRAG Hybrid Database
Setting up Neo4j and Qdrant
-
Install and start Neo4j:
# Using Docker docker run \ --name neo4j \ -p 7474:7474 -p 7687:7687 \ -e NEO4J_AUTH=neo4j/password \ -v $HOME/neo4j/data:/data \ -v $HOME/neo4j/logs:/logs \ -v $HOME/neo4j/import:/import \ -v $HOME/neo4j/plugins:/plugins \ neo4j:latest -
Install and start Qdrant:
# Using Docker docker run -p 6333:6333 -p 6334:6334 \ -v $HOME/qdrant/storage:/qdrant/storage \ qdrant/qdrant
Indexing Documents
To index your documents in both databases, follow these steps:
- Prepare your documents
- Create embeddings using sentence-transformers
- Store documents in Neo4j with relationship information
- Store document chunk embeddings in Qdrant
Установка
docker run \Конфигурация
{
"mcpServers": {
"GraphRAG": {
"command": "/path/to/graphrag_mcp/run_server.sh",
"args": []
}
}
}