Skip to main content
Every database becomes a folder of collections and views. Each one holds a sampled schema and its documents as JSON lines.

Setup

Get a connection URI for a user that can read the databases. Then export it:
  • Local server: mongodb://localhost:27017.
  • Self-hosted with auth: mongodb://<username>:<password>@<host>:27017/?authSource=admin.
  • MongoDB Atlas:
    1. Open the project’s Clusters page and select Connect on the cluster.
    2. Add the application host’s IP address to the access list (also under Network Access).
    3. Create a database user. The built-in Only read any database role is enough, or read on the databases the mount should see.
    4. Select Drivers and copy the mongodb+srv:// string.
    5. Put the user’s password in place of <db_password>, percent-encoding reserved characters such as @ (%40).
See the Atlas driver connection guide.
Python needs pip install "mirage-ai[mongodb]"; Node needs the mongodb peer dependency (pnpm add @struktoai/mirage-node mongodb).

Connect

workspace.yaml

Layout

  • databases limits the tree to those databases. Unset, it shows all but admin, config and local.
  • documents.jsonl holds one document per line in Relaxed Extended JSON; schema.json holds field types from the first 100 documents, the indexes and any validator.
  • tail -n past max_doc_limit (5,000) documents fails with File too large. elide_fields drops heavy fields such as embeddings.

Sample runs

grep fetches only the documents that may match, and wc -l counts on the server. The mount is read-only: no command changes the database.

SDK guides

Python

Every config field, the VFS.md and write support.

TypeScript

Every config field, the VFS.md and write support.