Skip to main content
Glama
guerinjeanmarc

Neo4j GraphRAG MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NEO4J_URIYesNeo4j connection URIbolt://localhost:7687
AZURE_API_KEYNoAPI Key for Azure embedding provider
AZURE_API_BASENoAPI Base URL for Azure embedding provider
COHERE_API_KEYNoAPI Key for Cohere embedding provider
NEO4J_DATABASENoDatabase nameneo4j
NEO4J_PASSWORDYesNeo4j passwordpassword
NEO4J_USERNAMEYesNeo4j usernameneo4j
OPENAI_API_KEYNoAPI Key for OpenAI embedding provider
EMBEDDING_MODELNoEmbedding model format (e.g. text-embedding-ada-002, azure/deployment-name, bedrock/amazon.titan-embed-text-v1, cohere/embed-english-v3.0, ollama/nomic-embed-text)text-embedding-3-small
AWS_ACCESS_KEY_IDNoAWS Access Key ID for Bedrock embedding provider
AWS_SECRET_ACCESS_KEYNoAWS Secret Access Key for Bedrock embedding provider

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_neo4j_schema_and_indexes

Returns Neo4j graph schema with search indexes and property size warnings.

IMPORTANT: Call this tool BEFORE using any search tools (vector_search, fulltext_search, search_cypher_query).

This tool provides:

  • Vector & fulltext indexes (for search)

  • Node/relationship schemas with property types

  • Warnings for large properties (helps choose efficient return_properties)

Property size warnings help you avoid token limits when using search tools. For example, if a property has warning "avg ~100-200KB", avoid returning it unless necessary.

You should only provide a sample_size value if requested by the user, or tuning performance.

vector_search

Performs vector similarity search on a Neo4j vector index.

This tool embeds your text query using OpenAI and searches the specified vector index. Returns node IDs, labels, node properties (automatically sanitized), and similarity scores.

Automatic Sanitization (always applied):

  • Embedding property used by the vector index → automatically excluded (vector_search only)

  • Large lists (≥128 items) → replaced with placeholders

  • Large strings (≥10K chars) → truncated with suffix

  • Total response limited to 8000 tokens (results dropped if needed)

Property Selection:

  • Default (no return_properties): Returns ALL properties (sanitized)

  • With return_properties: Returns ONLY specified properties

  • Example: return_properties="pageNumber,id" → returns only these two

  • Check get_neo4j_schema_and_indexes for property warnings to avoid large fields

Performance Optimization: Internally fetches max(top_k × 2, 100) results to avoid local maximum problems in kANN algorithms.

fulltext_search

Performs fulltext search on a Neo4j fulltext index using Lucene query syntax.

Lucene Syntax Supported:

  • Boolean: "legal AND compliance", "privacy OR security"

  • Wildcards: "compli*", "te?t"

  • Fuzzy: "complience~"

  • Phrases: ""exact phrase""

Automatic Sanitization (always applied):

  • Large lists (≥128 items) → replaced with placeholders

  • Large strings (≥10K chars) → truncated with suffix

  • Total response limited to 8000 tokens (results dropped if needed)

Property Selection:

  • Default (no return_properties): Returns ALL properties (sanitized)

  • With return_properties: Returns ONLY specified properties

  • Example: return_properties="pageNumber,id" → returns only these two

  • Check get_neo4j_schema_and_indexes for property warnings to avoid large fields

Returns node/relationship IDs, labels/types, properties (sanitized), and relevance scores.

read_neo4j_cypher

Execute a read Cypher query on the Neo4j database.

search_cypher_query

Execute a Cypher query that uses vector and/or fulltext search indexes.

This powerful tool allows you to:

  1. Use vector search ($vector_embedding) and/or fulltext search ($fulltext_text) in Cypher

  2. Post-filter large result sets (fetch 100-1000, filter with WHERE)

  3. Combine search with graph traversal

  4. Aggregate over search results

Example:

search_cypher_query( cypher_query=''' CALL db.index.vector.queryNodes('chunk_embedding_vector', 500, $vector_embedding) YIELD node, score WHERE score > 0.75 MATCH (node)-[:BELONGS_TO]->(d:Document) WHERE d.year >= 2020 RETURN node.chunkId, d.title, score ORDER BY score DESC LIMIT 20 ''', vector_query="student requirements" )

Placeholders:

  • $vector_embedding: Replaced with embedding vector

  • $fulltext_text: Replaced with text string for fulltext

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/guerinjeanmarc/mcp-neo4j-graphrag'

If you have feedback or need assistance with the MCP directory API, please join our Discord server