AI & LLMs

Claude builds knowledge graphs without a local LLM server

Chaos Cypher introduces an MCP server that lets Claude Code extract and validate knowledge graphs using only client-side models, removing the need for GPU-heavy local servers.

DocBento preview

A new open-source tool called Chaos Cypher allows developers to build persistent knowledge graphs using Claude Code or other Model Context Protocol (MCP) clients. Published on September 28, 2026, by Denis MacPherson, this approach shifts the computational burden of entity extraction from a local server to the assistant already running in the developer’s editor. The system validates every claim against source text before committing it to a local database.

What happened

Traditional Graph Retrieval-Augmented Generation (GraphRAG) systems typically require a server to host a large language model. This setup demands significant hardware resources, such as GPUs, to process documents and extract relationships. Chaos Cypher reverses this architecture. Instead of the server calling a model, the client-side assistant performs the extraction. The server acts only as a storage and validation layer, receiving structured data from the assistant and checking it against the original text.

The workflow begins when a user connects the Chaos Cypher CLI to an MCP-compatible client like Claude Code, Cursor, or Claude Desktop. The user instructs the assistant to process a folder of markdown files. The assistant reads the documents in chunks, identifies entities and relationships, and submits them back to the server. The server then runs an evidence validator to ensure each submitted fact corresponds to specific sentence numbers in the source text. If the evidence does not match, the server rejects the entry. This loop continues until the graph is built, resulting in a persistent SQLite database that survives session restarts.

Key details

  • The Chaos Cypher CLI requires Python 3.14 or newer and installs via pipx.
  • Extraction is performed entirely by the client-side assistant, meaning the server runs no language model.
  • The server validates submissions by checking sentence references, dropping any entity or relationship that lacks textual evidence.
  • The resulting graph is stored in a local SQLite database and can be exported as a .ccx package.
  • Multi-hop queries are resolved using Personalized PageRank and Reciprocal Rank Fusion, combining graph traversal with vector search.
  • The system degrades gracefully to keyword search if the local embedding model is unavailable.

Background

GraphRAG is a technique that enhances standard retrieval systems by mapping connections between concepts. While traditional vector search finds documents containing similar words, a knowledge graph understands how entities relate to one another. This allows for multi-hop reasoning, where the system can answer questions that require connecting disparate pieces of information across multiple documents. For example, it can identify which components depend on a specific library and which architectural decision records govern changes to that library.

The Model Context Protocol (MCP) is an open standard that enables AI assistants to connect to external tools and data sources. By using MCP, Chaos Cypher allows any compatible assistant to act as the intelligence layer for graph construction. This decouples the reasoning capability from the storage infrastructure, letting developers leverage the models they already have access to in their coding environments without setting up dedicated inference servers.

Why it matters

For teams running their own software, this approach significantly lowers the barrier to entry for advanced retrieval systems. Maintaining a local LLM server requires specialized hardware and ongoing maintenance. By offloading extraction to the client, developers can build sophisticated knowledge bases on standard laptops without GPUs. This makes it feasible for small teams or individual engineers to implement GraphRAG workflows without investing in expensive infrastructure.

The emphasis on evidence validation also addresses a critical concern in automated knowledge management: trust. Large language models often hallucinate relationships or misinterpret context. By requiring sentence-level citations and validating them server-side, Chaos Cypher ensures that the graph reflects the actual content of the documents. This auditability allows teams to inspect rejected entries and understand why certain facts were excluded, providing a higher degree of confidence in the retrieved information.

Furthermore, the persistence of the graph means that knowledge accumulates over time. Unlike transient chat sessions where context is lost after closing the window, the graph remains available for future queries. This enables assistants to answer complex, cross-document questions that would otherwise exceed their context windows. It transforms static documentation into an interactive, queryable asset that grows with the project.

What you can do

  • Install the Chaos Cypher CLI using pipx and ensure your environment runs Python 3.14 or later.
  • Connect the CLI to your preferred MCP client, such as Claude Code, in write mode to enable graph construction.
  • Start with a small set of markdown files, such as design notes or meeting summaries, to test the extraction quality.
  • Review the tool logs in your editor to monitor the extraction process and see which sentences support each entity.
  • Use the local server interface to inspect the generated graph, edit incorrect relationships, and view quality grades.
  • Export the finished graph as a .ccx package to share it with other team members or import it into different assistants.

More news

All news