graphrag-mcp-server
Provides read-only access to a Neo4j knowledge graph for GraphRAG-style retrieval, including entity search, entity lookup with attributed neighbours, relationship path discovery, and provenance-backed context retrieval using fixed, parameterised Cypher queries in READ mode.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
graphrag-mcp-server
A read-only, authenticated GraphRAG knowledge service exposed over the Model Context Protocol (Streamable HTTP). Any MCP client discovers the same four typed tools and gets bounded, source-attributed evidence from a Neo4j knowledge graph seeded only with synthetic public data. Open source (MIT), $0 to run: Docker + Neo4j Community, no cloud account, no LLM or paid API.
Status: a local reference implementation, verified with live Neo4j, three MCP client stacks and CI on GitHub's free runners. "Stateless" here means request-level statelessness, demonstrated with two local server processes behind an alternating proxy (docs/PROTOCOL.md); it is not a production deployment, not hosted anywhere, and makes no HA or scale claim. Not deployed anywhere remote: optional free hosting was evaluated, not verified (docs/FREE_HOSTING.md). No production, HA or adoption claims. It is an MCP tool provider, not a chatbot: no LLM is in the request path.
Run it (one command)
docker compose up -d --build --wait # Neo4j Community + seed job + MCP server on http://127.0.0.1:28080/mcp
docker compose run --rm demo # discovers tools and runs real requests (prints a transcript)
docker compose down -v # remove everythingRequires only Docker. Default passwords are local-dev only and everything binds to 127.0.0.1.
To call it yourself, mint a short-lived dev token and connect any MCP client with Authorization: Bearer <token>:
docker compose run --rm --entrypoint python demo -m tools.dev_token mint --ttl 600from fastmcp import Client
async with Client("http://127.0.0.1:28080/mcp", auth=TOKEN) as c:
print(
(
await c.call_tool(
"find_relationship_paths",
{"source_entity_id": "feat-gift-cards", "target_entity_id": "svc-ledger-service"},
)
).structured_content
)Related MCP server: woodpecker-mcp
Tools (contract v1.0 — docs/TOOL_CONTRACTS.md has real request/response examples)
Tool | Purpose | Bounds |
| name/alias search (exact → prefix → substring), optional kind filter | query ≤ 200 chars, limit ≤ 10 |
| one entity by stable id + attributed neighbours | neighbours ≤ 20 |
| node-simple paths between two entities, shortest first | hops ≤ 4, paths ≤ 10 |
| link entities named in a question → supporting facts with provenance; abstains when unsupported | top_k ≤ 10, 500–12 000 chars |
There is deliberately no run_cypher tool: all Cypher is fixed, parameterised and run in READ access mode.
Architecture
flowchart LR
C1[MCP client A] & C2[MCP client B] -->|"HTTP · MCP 2026-07-28 · Bearer JWT"| LB[any process / any request]
subgraph S["Server process (stateless, N copies)"]
H[Host allowlist] --> A[JWT auth 401 · scope 403] --> M["FastMCP /mcp"]
M --> T[4 typed tools] --> SV["GraphToolService<br/>validate · rate/concurrency · deadline · size cap · logs"]
SV --> R["Neo4jRepository<br/>fixed Cypher · READ mode · timeout"]
end
LB --> H
R -->|bolt| DB[(Neo4j: synthetic KG)]
SEED[bootstrap / seeder job<br/>admin creds, not in image] -.-> DBProtocol: MCP 2026-07-28 (server/discover, per-request _meta, no initialize, no session id); legacy handshake clients still accepted.
Two server processes behind an alternating proxy served the same client with 0 errors (see docs/PROTOCOL.md).
Details: ARCHITECTURE · THREAT_MODEL · RUNBOOK · DEMO transcript.
Verify it
uv sync --frozen && docker compose up -d neo4j
export GRAPHRAG_TEST_NEO4J_ADMIN_PASSWORD=local-dev-admin-pw GRAPHRAG_REQUIRE_NEO4J=1
uv run ruff check . && uv run mypy src tools && uv run pytest -rsLast local result on Neo4j Community: 117 passed, 8 skipped (7 need Neo4j Enterprise RBAC, 1 is a deployment-only smoke test; each skip prints its reason).
On Enterprise: 115 passed, 1 skipped. GitHub Actions workflow (.github/workflows/ci.yml: ruff, mypy, unit, integration on Neo4j Community, compose end-to-end,
image checks, Trivy, gitleaks, pip-audit) is written but has not run yet (no remote). Results, baselines and caveats: docs/EVALUATION.md.
Limitations (read these)
Synthetic data (146 entities / 470 relationships); gold evaluation is templated and synthetic, so 100 % there says nothing about real-world retrieval quality.
Community Neo4j has no role boundary: write protection = server-enforced READ access mode + fixed queries; use
docker-compose.enterprise.ymlfor a real read-only role (local evaluation licence only).In-memory per-instance rate limiting; bearer tokens are valid until expiry; dev tokens come from a local key generated by the stack.
Not tested against any third-party OIDC issuer or hosted platform; OAuth-discovery-only clients are unsupported.
Provenance and rights: docs/PROVENANCE.md (nothing copied from the earlier tutorial repo). License: MIT.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your own knowledge graph from any MCP client. The graph lives in a database you own.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Knowledge graph ingestion, entity search, ontology analysis, and CoSync scoring.
Machine-readable entity discovery with provenance, trust and verified source evidence.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables building and querying knowledge graphs by ingesting documents into Neo4j using Gemini for entity extraction, and exposes MCP tools for graph health, document ingestion, and knowledge base querying.-
- AlicenseAqualityCmaintenanceExposes a materialized service dependency graph as an MCP toolset for persistent, queryable root-cause analysis via Cypher queries.51Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables querying a Neo4j knowledge graph built from Git repositories and relational database schemas via MCP, with tools for schema inspection, Cypher queries, and searching code and database entities.MIT
- AlicenseAqualityCmaintenanceProvides governed retrieval over MCP with hybrid search, strict confidence gating, and access control, exposing three read-only tools.3Apache 2.0