graphrag
Builds and queries a knowledge graph in Neo4j Community, storing documents, passages, speakers, topics, and entities and supporting graph-based context, search, and Cypher queries.
Allows an Ollama instance to serve as the embedding backend via an OpenAI-compatible /v1/embeddings endpoint, generating vectors for documents and queries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@graphragadopt the product-leader persona and tell me how to run a roadmap review"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
graph-rag
Persona-grounded Graph RAG you can drop into any project as an MCP server or CLI.
Ingest text → parse → chunk → embed → build a graph in Neo4j Community → query it through a
FastMCP server (.mcp.json is pre-wired for Claude Code) or the graphrag CLI.
Knowledge is organised into personas: a role prompt plus the real sources that ground it.
git clone https://github.com/smittysmee/graphrag && cd graphrag
make setup # images, model, Neo4j, MCP server on :8765
# then either import a persona someone sent you...
make persona-import FILE=their-persona.tar.gz
# ...or build one from source
make sources && make ingest PERSONA=product-leader SRC=data/raw/product-leader
make context Q="how do I know we have product-market fit" PERSONA=product-leaderNo content ships with this repo. You bring your own sources and build the graph locally. The included
product-leaderpersona is an example configuration pointing at a public transcript archive that you fetch yourself. See NOTICE.md before redistributing anything you build with it.
Read the usage guide for the tools, workflows and troubleshooting.
What you get
Surface | How |
MCP server |
|
CLI |
|
Claude skills |
|
Portable graph |
|
Related MCP server: Cognify MCP Server
Quick start
Requirements: Docker Desktop. Nothing else is installed on the host.
make init # asks a few questions, writes .env, runs setup
make doctor # sanity checkIngesting the example archive takes a few hours on CPU, or minutes if you point the embedder at a
GPU box (see below). Everything is reproducible: the source archive is pinned as a git submodule
and the embedding model is pinned by revision and SHA-256 in vendor/model.lock. Once built, the
snapshot in data/snapshots/ restores into an empty database in well under a minute, so the Neo4j
volume is disposable.
Then in Claude Code (this repo has .mcp.json): "Use the graphrag MCP: adopt the
product-leader persona and tell me how to run a roadmap review."
Personas
personas/<id>/persona.yaml role prompt, voice, sdlc_stages, sources, retrieval config
data/snapshots/<id>/ the ingested graph for that persona (committed)
.claude/skills/persona-<id>/ generated skill so an agent can assume the personaproduct-leader— an example persona wired to a public podcast archive. Ingest it to see the whole pipeline end to end: 291 unique episodes, ~13,300 passages, and an optional entity layer. Add your own withgraphrag persona new; see PERSONAS.md.
Add one: docker compose run --rm graphrag graphrag persona new "Name" -d "...", drop files under
data/raw/<id>/<source>/, make ingest PERSONA=<id> SRC=data/raw/<id>, commit the snapshot.
Where the compute runs
Embeddings are the only heavy step. By default an ONNX model (BAAI/bge-small-en-v1.5, 384-d)
runs inside the container: free, offline, nothing leaves your machine. To run it on a GPU box on
your network (e.g. a GB10):
# on the GPU box
EMBED_GPU=1 GRAPHRAG_EMBEDDING_CUDA=true \
docker compose -f docker-compose.yml -f docker-compose.gpu.yml --profile embed up -d --build embed
# on your machine (.env)
GRAPHRAG_EMBEDDING_BACKEND=http
GRAPHRAG_EMBEDDING_BASE_URL=http://gb10.local:8766/v1The http backend speaks the OpenAI /v1/embeddings format, so Ollama, vLLM,
text-embeddings-inference or llama.cpp work too. Query vectors must come from the same model as
the snapshot; make doctor refuses mismatches.
Development
Everything runs in Docker; make hooks (done by make setup) enables versioned git hooks:
pre-commit runs ruff + mypy --strict + unit tests, pre-push adds Neo4j integration tests.
make check # what the pre-commit hook runs
make test-integration # what the pre-push hook runs
make shell # bash in the dev container
make lsp # python-lsp-server over stdio for your editorDocs
Doc | What's in it |
Start here. Tools, workflows, CLI, troubleshooting | |
Pipeline, graph schema, snapshot format | |
Persona spec and lifecycle | |
Which persona applies at which stage | |
Testing conventions, LSP setup | |
Attribution, third-party licenses, what you may redistribute |
License
MIT for this project's code — see LICENSE. Ingested content is not covered by it; read NOTICE.md first.
Optional: entity enrichment
Enrichment adds Entity nodes (people, companies, products, frameworks, concepts, books,
metrics, regulations) with MENTIONS edges from passages and RELATED_TO edges between entities.
The deterministic graph (documents, passages, speakers, topics, topic co-occurrence) never needs it.
Two ways to produce it:
Agent-driven (no API key). Any agent, including Claude Code, reads a transcript and writes
data/enrichment/<doc>.json({doc_id, entities[], relations[]}; seeDocumentExtractioninsrc/graphrag/extract/llm.py). Then:docker compose run --rm graphrag graphrag enrich-import product-leader /app/data/enrichment/*.jsonwhich anchors mentions to passages by name match, writes the graph, and re-exports the snapshot.Unattended (API key).
make enrich PERSONA=product-leader LIMIT=10callsclaude-opus-5with structured outputs; needsANTHROPIC_API_KEYin.env.
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Personal knowledge graph as an AI memory layer over MCP - read, save, and link your memories.
Build and run grounded business agents over MCP: agents, knowledge bases, skills, Storylines.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables 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.-
- AlicenseNot gradedqualityBmaintenanceEnables document ingestion and typed knowledge graph queries through Claude MCP tools, allowing agents to extract, store, and retrieve typed entities and relations from documents.2MIT
- FlicenseNot gradedqualityBmaintenanceExposes a Neo4j knowledge graph to AI assistants via MCP, enabling entity search, neighbor traversal, and read-only Cypher queries.-
- FlicenseNot gradedqualityBmaintenanceEnables to build and query a knowledge base with retrieval-augmented generation, supporting document ingestion, hybrid search, and live data integration from external APIs via MCP tools.1-