search_for_ragLABSCO SUMMARY
Retrieval that keeps the relationships.
A plain vector store answers what text looks like this. Running graphiti over Neo4j means results are reranked by how entities relate, and the episode model keeps a record of how those relations changed as documents arrived — useful when the question is about a decision that moved rather than a fact that sits still. The price is infrastructure: Neo4j, an ingest pass, and three model endpoints you supply. The project warns that a local LLM has to return formatted responses within seconds to keep up, and that OpenRouter hits rate limits easily — point at a specific provider instead.
What it is
A self-contained retrieval backend built on graphiti and Neo4j. A batch job ingests documents through unstructured, and an MCP server exposes search over the resulting knowledge graph — vector, graph and full-text results reranked by how entities relate. Because ingestion runs as episodes, how concepts relate to each other over time stays visible rather than being flattened.
What you get
- Search shaped for retrieval-augmented generation over everything ingested, scoped by group —
search_for_rag - Fact-level and node-level retrieval with result caps and optional entity-type filtering —
search_memory_facts,search_memory_nodes - The episodes behind the graph, listed per group —
get_episodes - New content added to the graph from a client rather than through the ingest batch —
add_memory - Ingestion that resumes: a failed run restarts from the file it stopped on, with per-stage directories for pending, in-progress, completed and re-splittable files
Requirements
Docker Compose, plus an OpenAI-compatible endpoint for three models: an embedding model for vector search, an LLM for graph construction and a lightweight LLM for reranking. Embeddings and LLM may point at different URLs — a local Ollama for one, a hosted API for the other. Setup is downloading docker-compose.yml and the example env file, editing it, and docker compose up -d; documents go into data/input/ and docker compose run --rm ingest registers them. Clients connect over SSE at http://localhost:8000/sse. Ingestion covers txt, md, rst, org, html, xml, pdf, doc, docx, ppt, pptx, xls, xlsx, odt, rtf, epub, csv, tsv, eml, msg, p7s and common image formats. Documentation is in Japanese.
Setup effort
Run a container — pull the image and point your client at it
USE CASES
Asking questions of documents that cannot leave the building
Ingest the files locally and query them through an MCP client, with only the model endpoints you chose seeing anything.
Finding a fact and the entities around it
Search at fact level or node level, narrowing by group or entity type, when a whole-document answer is too coarse.
Tracing how a topic changed across documents
Read the episodes behind the graph to see how the relationships around a concept were built up over successive ingests.
Adding a note without a re-ingest
Write new content into the graph directly from the client so the next search includes it.
5 tools
Listed in project docs. Your client may show a different list.
search_memory_factssearch_memory_nodesget_episodesadd_memoryBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation. The MCP server reuses graphiti's implementation; the five tools shown in the JS examples are the documented surface.
Requires
- docker compose (the compose file pulls ghcr.io/suwa-sh/graphiti-mcp-server:latest, ghcr.io/suwa-sh/graphiti-ingest:latest and neo4j:5-community)
- An OpenAI-compatible LLM API for three models — an embedding model, an LLM for graph search and a lightweight LLM for reranking — set in .env (LLM_MODEL_URL, LLM_MODEL_KEY, EMBEDDING_MODEL_URL)
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Pull the image and point your client at it.
Server setup
Install
mkdir -p <YOUR_PATH_TO_RAG>/data/input/
cd <YOUR_PATH_TO_RAG>
curl -Lo docker-compose.yml https://raw.githubusercontent.com/suwa-sh/local-RAG-backend/refs/heads/main/docker-compose.yml
curl -Lo .env https://raw.githubusercontent.com/suwa-sh/local-RAG-backend/refs/heads/main/.env.example
vi .env
docker compose up -dRegister documents
cp -r <YOUR_PATH_TO_DOCUMENTS> <YOUR_PATH_TO_RAG>/data/input/
docker compose run --rm ingestMCP Clients
Any MCP client — SSE
{
"mcpServers": {
"graphiti-memory": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}