Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mushroomdb

mushroomdb is a graph database for any app that needs a graph, embedded in your process or run as a server. A relationship is a schema declaration: write a rule once, and every write derives, maintains and retracts the matching edges, each one carrying the rule, the score and the values that produced it.

It speaks Cypher, keeps time-travel history, and searches by full text and vector similarity.


What it does

You declare a rule once. mushroomdb evaluates it on every subsequent write and maintains the matching edges automatically, adding them when properties align, retracting them when they no longer do. The graph builds itself.

This is different from running a similarity script after each batch load or manually creating edges in a trigger. The rules are schema objects: they carry provenance, produce a score on each derived edge, and are queryable via the explain API and the bundled UI’s why panel.

Six predicate kinds ship today:

Display nameWire shape (JSON predicate field)What it tests
KeyMatch{"KeyMatch": {"field": "..."}}FK equality: one node’s field matches another’s key
FieldEqual{"FieldEqual": {"field": "..."}}Exact match on a named field (any ValueKey: string, int, float, bool)
Overlap{"Overlap": {"field": "...", "min": 0.5}}Jaccard coefficient on list-valued fields, min threshold
NumericWithin{"NumericWithin": {"field": "...", "tolerance": 2.0}}Absolute numeric difference within a tolerance
GeoRadius{"GeoRadius": {"field": "...", "km": 50.0}}Haversine distance between [lat, lon] fields within a radius in km
VectorSimilar{"VectorSimilar": {"field": "...", "min": 0.8}}Cosine similarity on float arrays, min threshold

All six compose with All to require multiple conditions on the same edge.


Positioning

mushroomdb is embedded-first: it runs in your process, against a directory on disk, with no network round-trip and no server to start. The optional serve command adds an HTTP API and a bundled graph explorer when you want them, and several processes can share one store; see Concurrency.

ingest-git stays supported as a data source: commits, pull requests, files and authors become entities with rule-derived relationships, which is what makes a ticket↔commit link a rule rather than a script.

The benchmark numbers are in Benchmarks, and the architecture as built, with the roadmap, is in Architecture.


Status

Pre-1.0 alpha: APIs and formats may change between minor versions. Single writer; multi-statement transactions are snapshot-isolated. Toolchain pinned to Rust 1.92.0.

The current release is on the releases page.


Pages in this section

Reference:


Install for an AI agent

The shortest way in is the Claude Code plugin: claude plugin marketplace add MatthewSherlin/mushroomdb then claude plugin install mushroom@mushroomdb, and type /mushroom:mushroom in a repository. Or run npx mushroomdb install, which writes the /mushroom skill, the MCP server entry, and the session-start and prompt hooks for Claude Code or Cursor. The crates.io (cargo install mushroomdb-cli, cargo add mushroomdb) and PyPI (pip install mushroomdb) packages are published at the same version; which path gives you what is in the Install table.