A unified Neo4j MCP server for GraphRAG: vector search, fulltext search, and search-augmented Cypher queries
Project description
Neo4j GraphRAG MCP Server
An MCP server that extends Neo4j with vector search, fulltext search, and search-augmented Cypher queries for GraphRAG applications.
Inspired by the Neo4j Labs
mcp-neo4j-cypherserver. This server adds vector search, fulltext search, and the innovativesearch_cypher_querytool for combining search with graph traversal.
Overview
This server enables LLMs to:
- 🔍 Search Neo4j vector indexes using semantic similarity
- 📝 Search fulltext indexes with Lucene syntax
- ⚡ Combine search with Cypher queries via
search_cypher_query - 🕸️ Execute read-only Cypher queries
Built on LiteLLM for multi-provider embedding support (OpenAI, Azure, Bedrock, Cohere, etc.).
Related: For the official Neo4j MCP Server, see neo4j/mcp. For Neo4j Labs MCP Servers (Cypher, Memory, Data Modeling), see neo4j-contrib/mcp-neo4j.
Installation
Step 1: Download the Repository
git clone https://github.com/guerinjeanmarc/mcp-neo4j-graphrag.git
cd mcp-neo4j-graphrag
Step 2: Configure Your MCP Client
Claude Desktop
Edit the configuration file:
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this server configuration (update the path to where you cloned the repo):
{
"mcpServers": {
"neo4j-graphrag": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-neo4j-graphrag",
"run",
"mcp-neo4j-graphrag"
],
"env": {
"NEO4J_URI": "neo4j+s://demo.neo4jlabs.com",
"NEO4J_USERNAME": "recommendations",
"NEO4J_PASSWORD": "recommendations",
"NEO4J_DATABASE": "recommendations",
"OPENAI_API_KEY": "sk-...",
"EMBEDDING_MODEL": "text-embedding-ada-002"
}
}
}
}
Cursor
Edit .cursor/mcp.json in your project or global settings. Use the same configuration as above.
Step 3: Reload Configuration
- Claude Desktop: Quit and restart the application
- Cursor: Reload the window (Cmd/Ctrl + Shift + P → "Reload Window")
Tools
get_neo4j_schema_and_indexes
Discover the graph schema, vector indexes, and fulltext indexes.
💡 The agent should automatically call this tool first before using other tools to understand the schema and indexes of the database.
Example prompt:
"What is inside the database?"
vector_search
Semantic similarity search using embeddings.
Parameters: text_query, vector_index, top_k, return_properties
Example prompt:
"What movies are about artificial intelligence?"
fulltext_search
Keyword search with Lucene syntax (AND, OR, wildcards, fuzzy).
Parameters: text_query, fulltext_index, top_k, return_properties
Example prompt:
"find people named Tom"
read_neo4j_cypher
Execute read-only Cypher queries.
Parameters: query, params
Example prompt:
"Show me all genres and how many movies are in each"
search_cypher_query
Combine vector/fulltext search with Cypher queries. Use $vector_embedding and $fulltext_text placeholders.
Parameters: cypher_query, vector_query, fulltext_query, params
Example prompt:
"In one query, what are the directors and genres of the movies about 'time travel adventure' "
Configuration
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
NEO4J_URI |
Yes | bolt://localhost:7687 |
Neo4j connection URI |
NEO4J_USERNAME |
Yes | neo4j |
Neo4j username |
NEO4J_PASSWORD |
Yes | password |
Neo4j password |
NEO4J_DATABASE |
No | neo4j |
Database name |
EMBEDDING_MODEL |
No | text-embedding-3-small |
Embedding model (see below) |
Embedding Providers
Set EMBEDDING_MODEL and the corresponding API key:
| Provider | Model Format | API Key Variable |
|---|---|---|
| OpenAI | text-embedding-ada-002 |
OPENAI_API_KEY |
| Azure | azure/deployment-name |
AZURE_API_KEY, AZURE_API_BASE |
| Bedrock | bedrock/amazon.titan-embed-text-v1 |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
| Cohere | cohere/embed-english-v3.0 |
COHERE_API_KEY |
| Ollama | ollama/nomic-embed-text |
(none - local) |
Advanced Topics
See docs/ADVANCED.md for:
- Comparison with Neo4j Labs
mcp-neo4j-cypherserver - Production features (output sanitization, token limits)
- Detailed tool documentation
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_neo4j_graphrag-0.3.0.tar.gz.
File metadata
- Download URL: mcp_neo4j_graphrag-0.3.0.tar.gz
- Upload date:
- Size: 201.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c84be674271b59d8fa491280fdc4dc526a988759b9e5e94bac42a03bc6572c3
|
|
| MD5 |
715a60692209b3ce716c6a3eb79ddd41
|
|
| BLAKE2b-256 |
a15b566fef965085da7926aac407f2ea8496d6c5c2e335971878bf956b32c620
|
File details
Details for the file mcp_neo4j_graphrag-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mcp_neo4j_graphrag-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
497f874f67bb1dda4cac0ea29f10387ff8c5b679d109124a89df2549a7c12824
|
|
| MD5 |
14a1b851fab7984d3e9746757ded6f7d
|
|
| BLAKE2b-256 |
fb203b39e1ae0a4530bc8b39c5fb22fb164405ac2120f9bb893abcba3084b3e7
|