Skip to main content

Droste

See your codebase as a living galaxy — and give your agents causal memory of it.

Droste indexes any repo into a fractal, zoomable map of its symbols, wires them together with their real call / import / DB edges across languages, and serves an agent the causal slice of code it actually needs — not just keyword matches.

Local-first · zero-config · polyglot · MCP-native

PyPI Python CI License: MIT

Droste fractal code galaxy

Zooming out reveals the causal web — every cyan arc is a real syntax_dependency edge. Full flythrough (FastAPI)

Live demo ? Quickstart · Why it's different · How it works · MCP · Benchmarks


Quickstart

# Windows
python -m pip install --upgrade droste-memory

# macOS / Linux
python3 -m pip install --upgrade droste-memory

droste index . # index the current repo
droste view    # open the fractal galaxy in your browser

Install once, then index and view. droste view opens a full-screen, zoomable map of your code — scroll to dive from the project star into folder orbits, down to the individual functions, with the causal edges glowing between them.

Need it for an agent instead of your eyes?

droste context "checkout flow" --budget 1500   # causal context slice for an LLM

Running droste with no arguments prints the command palette:

                  .-----------------------.
             .----'           |           '----.
         .---'          .-----+-----.          '---.
       .'          .----'     |     '----.          '.
      /        .---'      .---+---.      '---.        \
     /      .-'        .-'    |    '-.        '-.      \
    |     .'        .-'   .---+---.   '-.        '.     |
    |    /        .'    .'    |    '.    '.        \    |
    |   |        |     |   .--+--.   |     |        |   |
    | --+--------+-----+---+  @  +---+-----+--------+-- |
    |   |        |     |   '--+--'   |     |        |   |
    |    \        '.    '.    |    .'    .'        /    |
    |     '.        '-.   '---+---'   .-'        .'     |
     \      '-.        '-.    |    .-'        .-'      /
      \        '---.      '---+---'      .---'        /
       '.          '----.     |     .----'          .'
         '---.          '-----+-----'          .---'
             '----.           |           .----'
                  '-----------------------'

DROSTE-MEMORY // RIGID FRACTAL RADIAL LAYOUT
Local Graph Engine v1.1.6-Alpha-Sharded

Commands
  droste index <path> [--reset]
  droste status
  droste zoom <symbol_name>
  droste context [query] --budget 1500
  droste mcp

Fast path: droste context hub_core --budget 1000 | clip

Why it's different

Droste combines lexical and semantic retrieval with a static code graph and an interactive map. A graph can bring callers and callees into context even when they share few words with the query. Other tools also offer graph-based MCP retrieval; see the dated ecosystem review.

Droste focuses on a small Python CLI, budgeted context, and visual exploration. The graph is a static approximation: name matching and cross-language bridges can produce false positives and do not prove runtime behavior.

Droste's edge is the causal graph:

  • Causal wormholes. Real syntax_dependency edges (calls, imports, inheritance) in both directions — Droste hands the caller and callees, ordered, within a token budget.
  • Cross-language bridges. Droste links across languages — app code to SQL functions/tables (.rpc('x'), .from('table')), to edge functions, and same-name handlers between any two languages. Your Dart/TS/Python frontend and your database stop being two separate worlds on the map.
  • A map you actually want to look at. The fractal galaxy isn't a gimmick — it's how you see coupling, risk hotspots, and the blast radius of a change.
  • Zero-config and local. No cloud, no account, no API key. fastembed (ONNX, no torch) gives real semantics; a deterministic fallback keeps it runnable anywhere.

Polyglot: Python (AST) + tree-sitter for Dart, TypeScript/JavaScript, Go, Rust, Java, C#, C/C++, Kotlin, Swift, Ruby, PHP, SQL — symbols and edges.

Honest scope: the measured advantage is structural / causal retrieval. On pure semantic "concept" queries it's competitive with a vector baseline, not a leap. Cross-language bridges are strongest where the target is actually defined in the indexed repo (e.g. SQL schema in your migrations).


Benchmarks

The evaluation script compares structural retrieval against lexical and vector baselines, using caller/callee relations extracted from the same code as the reference. This measures graph-neighbor retrieval, not agent task completion or superiority over another product. Previous headline numbers are omitted until we publish a fixed public corpus, pinned revisions and complete result files.

python eval/comparative_eval.py --repos /path/to/public/repo --sample 60 --seed 7 --json results.json

Use the real embedding backend for semantic comparisons; the offline hash mode is deterministic but does not provide semantic similarity.


How it works

  • Causal graph. Each definition is parsed (Python ast; tree-sitter for the rest) into the names it calls / imports / inherits, becoming first-class syntax_dependency edges. Cross-language edges add DB calls (.rpc, .from, .functions.invoke) and string-literal name matches across languages.
  • Hybrid seed. A query is matched by a normalized blend of lexical score and semantic cosine (fastembed bge-small-en-v1.5, 384-dim), then the graph expands the seed bidirectionally (callees and callers).
  • Token packer. Results fit a budget with LOD-demotion (full to contract to skeleton) and a hard guardrail that never cuts a line of code mid-token.
  • Sharded persistence. One shard per file under a database-specific .droste/ directory, blake2b dirty-tracking so a re-index rewrites only what changed; atomic file replacement with metadata written last. Multi-file updates are not transactions; use one writer per DB and re-index after an interrupted write.

Use it as an MCP server

Droste is a drop-in MCP server — an AI agent can call it as primary code memory instead of doing blind file reads. Add this to your client configuration file (e.g., Cursor, Claude Desktop, or Codex):

First install or upgrade the PyPI package:

# Windows
python -m pip install --upgrade droste-memory

# macOS / Linux
python3 -m pip install --upgrade droste-memory

droste mcp --help

For Codex, add this to C:\Users\<you>\.codex\config.toml on Windows, or ~/.codex/config.toml on macOS/Linux:

[mcp_servers.droste]
command = "droste"
args = ["mcp"]
startup_timeout_sec = 120

Installed packages store their default database in %LOCALAPPDATA%/Droste on Windows, ~/Library/Application Support/Droste on macOS, or ${XDG_DATA_HOME:-~/.local/share}/droste on Linux. Source checkouts preserve their repository-local database. Set DROSTE_DB or pass --db to override. Existing databases inside an older installation are not moved automatically; point --db at the old file to continue using it, or re-index your source.

For explicitly offline operation, set DROSTE_EMBEDDING_BACKEND=hash. The default auto backend may download an embedding model on first use; code is processed locally. Hash mode trades semantic retrieval for deterministic, network-free embedding. droste view serves a snapshot; rerun it after indexing.

By default, droste mcp uses Droste's global local database. That is fine for quick use and small workflows. For serious multi-repo work, use one database per repository so each project has isolated memory and agents can safely re-index that project with reset=true.

The --db option is global, so keep it before mcp:

# Windows example
[mcp_servers.droste]
command = "droste"
args = ["--db", "C:/Users/you/AppData/Local/Droste/my-project/droste_memory_db.json", "mcp"]
startup_timeout_sec = 120
# macOS / Linux example
[mcp_servers.droste]
command = "droste"
args = ["--db", "/Users/you/.local/share/droste/my-project/droste_memory_db.json", "mcp"]
startup_timeout_sec = 120

For JSON-based MCP clients:

{
  "mcpServers": {
    "droste": {
      "command": "droste",
      "args": ["mcp"]
    }
  }
}

The same isolated-DB pattern works in JSON clients:

{
  "mcpServers": {
    "droste": {
      "command": "droste",
      "args": [
        "--db",
        "/absolute/path/to/droste_memory_db.json",
        "mcp"
      ]
    }
  }
}

Restart your client after changing the MCP config. In a repo, ask your agent to call droste_index_project first, then droste_get_context for causal context.

Key tools: droste_index_project, droste_get_context, droste_status.


Use it as an agent skill

Droste also ships agent skill templates for Codex and Claude. They teach an agent how to use Droste safely: isolated DBs, indexing, droste context, MCP config, and root-contamination guardrails.

Codex skill:

integrations/codex-skill/droste-code-memory/

Claude-compatible skill:

integrations/claude-skill/droste-code-memory/

Install the Codex skill by copying the folder into your Codex skills directory:

# macOS / Linux
mkdir -p ~/.codex/skills
cp -R integrations/codex-skill/droste-code-memory ~/.codex/skills/
# Windows PowerShell
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex\skills" | Out-Null
Copy-Item -Recurse -Force integrations\codex-skill\droste-code-memory "$env:USERPROFILE\.codex\skills\"

Then ask Codex:

Use $droste-code-memory to index this repository and retrieve causal context before editing.

For Claude, import or copy the Claude skill folder as a Claude Skill package and keep its SKILL.md, references/, and scripts/ together.


Development

pip install -e ".[dev]"
pytest                            # deterministic regression suite (tests/)
python eval/comparative_eval.py   # retrieval benchmark vs lexical & vector cores

tests/ = invariants + concurrency (round-trip, dirty-oracle, packer guardrail, cross-process shard race). eval/ = performance/quality benchmarks.


Status

v1.1.7 (alpha). Engine, polyglot + cross-language graph, CLI, fractal visualizer and MCP server are working and tested. Packaging/distribution are maturing — issues and PRs welcome (see CONTRIBUTING.md).

What's new in v1.1.7

  • Restored fresh-install MCP startup by requiring the compatible 1.x SDK.
  • Restored polyglot syntax edges with the current tree-sitter Python API.
  • Fixed droste --db ... view to visualize the requested database.
  • Viewer snapshots use temporary storage, including with read-only installations.
  • Isolated shards, registries and embedding caches for databases sharing a folder.
  • Installed packages use writable user data storage; DROSTE_DB overrides it.
  • Added Windows CI, wheel-content checks and an installed CLI/viewer/MCP smoke test.
  • Restored the demo homepage and refreshed the competitive positioning.

What's new in v1.1.6

  • Fixed the PyPI wheel packaging for droste view by shipping the visualizer HTML/templates and public demo graph inside the installed package.
  • Verified the three-command pitch from a clean install: pip install droste-memory, droste index ., droste view.

What's new in v1.1.5

  • Fixed self-index contamination by excluding Droste's own .droste/, .tmp/, and *.egg-info directories from project scans.
  • Improved small-budget context packing by pinning the focus node's direct callers/callees before secondary lexical matches.
  • Guaranteed compact stubs for true causal neighbours so important wormholes do not disappear when full context cannot fit.

What's new in v1.1.4

  • Fixed Python 3.10/3.11 compatibility by replacing Python 3.12-only Path.walk() usage.
  • Hardened MCP Registry publishing so metadata is only published after the matching PyPI release is live.
  • Improved CI diagnostics for faster multi-version release debugging.

What's new in v1.1.3

  • Added public Codex and Claude skill templates for agent-side Droste adoption.

What's new in v1.1.2

  • Added MCP Registry ownership metadata in the README/PyPI description.
  • Added server.json for official MCP Registry publishing.
  • Added manual and scheduled growth workflows for MCP registry publishing and visibility checks.

What's new in v1.1.1

  • Packaging/privacy hardening: generated visualizer JSON files (graph.json, status.json, context.json) are excluded from source distributions, while the public visualizer/demo_graph.json remains included.

What's new in v1.1.0

  • MCP context is root-isolated: droste_index_project records the active repo, and droste_get_context / droste_status filter to that root unless an agent passes another root explicitly.
  • Multi-root databases no longer silently mix repositories when no safe root can be inferred; Droste returns a clean warning instead.
  • Windows CLI output is guarded for UTF-8 consoles to avoid UnicodeEncodeError crashes on older terminal encodings.
  • Retrieval ranking is now query-aware: runtime code gets a slight boost for normal implementation queries, while tests/docs remain fully visible when the query asks for them.

License

MIT — see LICENSE.

Metadata

Release files for droste-memory 1.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for droste-memory 1.1.7
File Size Uploaded Provenance
droste_memory-1.1.7.tar.gz 150.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for droste-memory 1.1.7
File Interpreter ABI Platform
droste_memory-1.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 283.9 kB

Release files / droste_memory-1.1.7.tar.gz

Download URL droste_memory-1.1.7.tar.gz
Size 150.1 kB
Tags Source
SHA-256 checksum
How to use checksums
27ed921dd5dd2b27c9568827239b12d2cda00de77f435170e8d13a80a56bb358
BLAKE2b-256 checksum
How to use checksums
49313d32167fca5744b4cb36f7132bd00f2cae6661ea017c3a98eb240fb4445e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / droste_memory-1.1.7-py3-none-any.whl

Download URL droste_memory-1.1.7-py3-none-any.whl
Size 133.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c1115e663fc78289795a7314811de5f384d88bff925459444eb40179679d2b6
BLAKE2b-256 checksum
How to use checksums
1f859b105262db7e41e37f399a52b37fd487732e568597ca45a889d14b45c3e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for droste-memory 1.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for droste_memory-1.1.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page