Local-first knowledge graphs from your documents: build, search (GraphRAG) and edit on your machine.
io.github.chaoscypherinc/chaoscypher MCP Server
The MCP server io.github.chaoscypherinc/chaoscypher provides local-first knowledge graph capabilities. It supports building and searching knowledge graphs (GraphRAG) using documents, and also enables editing those graphs on the machine.
π οΈ Key Features
Local-first knowledge graphs from your documents
Build knowledge graphs
Search via GraphRAG
Edit graphs locally
π Use Cases
Turning local documents into knowledge graphs
Performing GraphRAG-style searches over those graphs
Updating or correcting knowledge graph content on your machine
β‘ Developer Benefits
Runs locally for document-to-graph workflows
Supports graph search (GraphRAG) and local editing
β οΈ Limitations
Available scope is limited to building, searching (GraphRAG), and editing knowledge graphs from documents
Turn your documents into a knowledge graph you can inspect, search, chat with, and take with you β all running on your own machine.
Chaos Cypher is a local-first GraphRAG platform β knowledge you can see,
trust, and own. Point it at your sources (documents, audio, video, images,
pasted text, web pages β 30+ formats, auto-detected), and it extracts entities
and relationships into a knowledge graph you can actually see and explore β
not a black-box vector blob. Search it, chat with it, refine it, and export the
result as a portable Lexicon knowledge package (.ccx) you can back up,
share, or load into another instance.
Why Chaos Cypher
Local-first GraphRAG β sources β extraction β graph β search & chat, with
embeddings generated on your own system. Bring your own LLM, or run fully offline
with Ollama.
Inspectable knowledge graphs β every entity and relationship is visible
and traceable back to its source. You can correct extractions, not just trust
them.
Portable knowledge packages β import and export your graph as a
self-contained package. Your knowledge is yours to move, version, and keep.
MCP server built in β plug Claude Desktop, Cursor, or any
MCP client straight into your graph:
36 tools for search,
traversal, and graph building.
Self-hosted control β you choose where data lives and which models touch
it. The all-in-one container runs the whole stack on hardware you control.
Feature highlights
Core intelligence
Knowledge graph canvas β
typed, filterable, zoomable from corpus overview down to a single entity and
its sources
GraphRAG search β graph
traversal fused with vector search (Personalized PageRank + Reciprocal Rank
Fusion), plus keyword, semantic, and hybrid modes
AI chat with citations β
answers grounded in your content, traceable back to the sources that produced
them
Data foundation
Quality analysis β
score graph richness on a 0β100 scale, with breakdowns that flag weak sources
30+ source formats β
PDF, DOCX, Markdown, HTML, EPUB, audio (MP3/WAV/FLAC), video (MP4/MKV/MOV),
images, ZIP archives, and more
Mix-and-match LLMs β
Ollama, OpenAI, Anthropic, or Gemini, configurable per operation
Automation & integration
Automations β
visual workflow builder with triggers and conditional logic
MCP server β 36 tools for
Claude Desktop, Cursor, ChatGPT, and other MCP clients
Plugin system β
drop-in Python document loaders, extraction domains, and workflow tools
What data leaves your machine?
By default, nothing leaves your machine except the LLM calls you configure.
Embeddings are computed locally; your documents, graph, and exports stay on disk
in a Docker volume you own. If you point Chaos Cypher at a hosted LLM provider
(OpenAI, Anthropic, Gemini), the text sent for extraction and chat goes to that
provider β choose a local model like Ollama to keep everything on-device.
Read the Self-Hosted Threat Model
for exactly what Chaos Cypher defends against, what it accepts by design, and
how to harden a LAN or internet-facing deployment.
πΈ See It in Action
A quick tour β from dropping in a document to asking a question and tracing the
answer back to the exact highlighted sentence in your source:
Animated walkthrough: upload a document, watch entities extract, explore the knowledge graph, ask a question, and trace the cited answer to the highlighted source sentence
βΆοΈ Watch the full tour (with audio-free narration captions) on
chaoscypher.com.
Dashboard β your knowledge base at a glance: entity and relationship counts,
quality and density scores, and a live graph preview.
Knowledge graph β every source becomes an explorable, color-coded graph.
Pan, zoom, search, and filter to see exactly what was extracted.
Entities β inspect any extracted entity: typed, directional relationships
ranked by importance, with stats and provenance back to the source document.
Sources β each document gets a transparent pipeline view: loaded β cleaned β
chunked β extracted β indexed, plus per-source entity distribution.
Chat β ask questions in plain language and get GraphRAG answers with inline
entity citations you can click through to the graph.
π Quick Start
Prerequisites: Docker (with Compose). That's it for end users β embeddings
run locally on CPU. You'll also want an LLM provider; Ollama
keeps everything on-device.
Run the published container (recommended)
The recommended install path is the all-in-one image published to the GitHub
Container Registry:
bash
docker run -d --name chaoscypher \
-p 80:80 \
-p 443:443 \
-v chaoscypher-data:/data \
--add-host=host.docker.internal:host-gateway \
ghcr.io/chaoscypherinc/chaoscypher:latest
# Then open http://localhost (443 is published so HTTPS works if you enable TLS)
Prefer Compose? Save this as docker-compose.yml and run docker compose up -d:
yaml
name:chaoscypherservices:chaoscypher:image:ghcr.io/chaoscypherinc/chaoscypher:latestcontainer_name:chaoscypherports:-"80:80"-"443:443"volumes:-chaoscypher-data:/dataextra_hosts:# Lets the container reach an Ollama running on the host (Linux engines# don't resolve host.docker.internal without this)-"host.docker.internal:host-gateway"restart:unless-stoppedvolumes:chaoscypher-data:
All four Python packages (chaoscypher-core, -cortex, -neuron,
-cli) are published to PyPI on
every release β chaoscypher-core gives you the same extraction and search
engine as an embeddable library. See the
developer quickstart.
Build from source (alternative / development)
Clone and build the all-in-one image locally β no published image required:
bash
git clone https://github.com/chaoscypherinc/chaoscypher.git
cd chaoscypher
make docker-up # builds + starts the all-in-one container# Open http://localhost
Try it in about 5 minutes
The quickstart
covers this in detail β import and search work within about 5 minutes;
extraction and chat come online once your LLM provider is set up (for Ollama,
after a one-time model download).
Start the app with one of the paths above and open http://localhost.
Create your single-user login on the first-run setup page.
Pick an LLM provider in Settings β point at a local
Ollama model to stay fully offline, or add an API key
for OpenAI / Anthropic / Gemini.
Add a source β upload a document or paste text. Chaos Cypher extracts
entities and relationships in the background (watch progress in the Queue
Monitor).
Explore the graph β open the knowledge graph view to see what was
extracted, search across it, and chat with your sources.
Export a knowledge package when you're happy with the result, so you can
back it up or load it elsewhere.
Development setup (with hot-reload)
For contributors who need per-service hot-reload (requires Python 3.14+,
Node.js 24+, and uv 0.11+ β uv replaces pip and
reads the committed uv.lock):
bash
make install # First-time setup (packages + hooks + Docker test image)
make docker-dev # Start multi-container dev environment# Frontend: http://localhost:3000# Cortex API: http://localhost:8080
π¦ Monorepo Structure
code
chaoscypher/
βββ packages/
β βββ core/ # π§ Core (Brain) - Business logic & domain models
β βββ cortex/ # ποΈ Cortex (Processing Center) - Full backend API
β βββ neuron/ # β‘ Neuron (Worker Cells) - Background task processing
β βββ interface/ # π» Interface (Interaction Layer) - Web UI
β βββ cli/ # π§ CLI - Command-line tools
β βββ docker/ # π³ Docker - Orchestration
β βββ docs/ # π Docs - Docusaurus documentation site
βββ e2e/ # Public end-to-end test suite
βββ scripts/ # Public build/test helper scripts
βββ tools/ # Public lint/license tooling
π οΈ Common Commands
Docker
bash
make docker-up # Start all-in-one container (http://localhost)
make docker-rebuild # Rebuild and restart all-in-one
make docker-dev # Start multi-container dev environment (hot-reload)
make docker-prod # Start multi-container production
make docker-down # Stop all Docker services
In plain English: the UI talks to one API, the API delegates all the real
work to a framework-agnostic core, and slow jobs (extraction, exports) run in
background workers so the app stays responsive.
Vertical Slice Architecture (Cortex Backend)
Features are self-contained vertical slices with complete functionality from API β Service β Repository β Database.
# Make changes in any packagecd packages/cortex
# Edit code...# Changes are immediately available (editable install)# If using Docker, hot-reload will restart services# Run tests
pytest
# Commit changes (Conventional Commits β see CONTRIBUTING.md)
git add .
git commit -m "feat(cortex): add new feature"
git push
π€ Contributing
Fork the repository
Create a feature branch (git checkout -b feature/amazing-feature)
Make changes and add tests
Ensure all tests pass
Commit your changes following Conventional Commits (git commit -m 'feat(scope): add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
If Chaos Cypher is useful to you, a β on the repo genuinely helps other
self-hosters find it.
π License
Chaos Cypher is licensed under the GNU Affero General Public License v3.0 only
(AGPL-3.0-only) β see the root LICENSE file. A separate
proprietary enterprise edition is available; external contributions are accepted
under the project CLA.