read-only by design

The fast, read-only MongoDB GUI you can point at production

Decompass browses, queries, and analyzes MongoDB the way Compass does, but it stays quick on huge clusters and has no write code at all. Browse with Decompass. Write with mongosh.

# in the Decompass folder · Python 3.10+
$ pip install -r requirements.txt
$ python app.py
# then open http://127.0.0.1:5057
  • No insert, update or delete
  • $out / $merge blocked
  • Localhost only
Decompass MongoDB GUI in dark mode: a sidebar of connections and databases, a shell-syntax filter on the users collection, and typed document results returned in 5 ms.
The real Decompass UI, captured on fictional demo data.
Why Decompass

Fast enough for billion-document clusters. Safe enough for prod.

Decompass is for the daily work of inspecting data: finding documents, checking a schema, reading an index, explaining a slow query. It's tuned for big clusters and lots of saved connections.

Speed where it hurts

  • Database and collection lists cached for 60 s, stats for 30 s
  • Estimated counts shown instantly; exact counts run in the background
  • Heavy jobs run in a separate slow lane, so they never block the sidebar
  • Every tab is independent, and switching tabs re-runs nothing

Read-only, guaranteed by code

  • No insert, update, delete, or drop calls in the codebase
  • $out and $merge rejected, allowDiskUse off
  • 10 s default query timeout, with server-side cancel
  • Reads prefer secondaries (secondaryPreferred)

Lightweight footprint

  • ~350 KB of source plus 3 Python packages (Flask, PyMongo, Waitress)
  • Ready in ~0.2 s and ~31 MB of RAM on our test Mac
  • Runs in the browser you already have
  • Idle connections are closed after ~5 min and wake on use
Race simulator

Open the same collection, twice

A playful look at where Decompass saves time: a light startup, cached metadata, and a slow lane that keeps heavy work out of the way. Run it again to see what a warm cache does.

Illustrative simulation. Not a benchmark.
Heavyweight desktop GUI (e.g. Compass)ready
Decompassready

Steps: start the app, list databases, list collections, load stats, find 50 documents. The bar lengths are made up to show the mechanisms. They aren't measured, so benchmark both tools on your own cluster.

“Try to write” sandbox

Go ahead, try to delete something

This is a mock of the Decompass toolbar. Click a write action or type a write command and see what happens. Spoiler: it points you to mongosh.

local-demo › shop › users read-only ~5,000 docs · 3 indexes

Write action → where it goes

You want to…In DecompassIn mongosh
Insert a documentNot availabledb.users.insertOne({ name: "ada", plan: "pro" })
Edit a fieldNot availabledb.users.updateOne({ name: "ada" }, { $set: { plan: "team" } })
Delete documentsNot availabledb.users.deleteMany({ plan: "free" })
Write pipeline outputRejected ($out/$merge)db.users.aggregate([ …, { $out: "users_report" } ])
Find, count, explain, aggregateYes, that's what it's forWorks there too
Query playground

Filter and sort, Decompass-style

Play with a tiny sample collection (fictional data, 20 documents) and watch the shell-syntax filter build itself. Decompass accepts the same syntax in its Filter box.

20 documents

Sample users collection
namecityplanagesignedUp
adaLisbonpro362024-03-14
alanBerlinteam412023-11-02
amaraNairobifree242025-01-20
beaAustinpro292024-07-08
chenOsakateam522022-09-30
devPunepro332025-04-11
edsgerBerlinfree612021-06-05
fatimaNairobipro382024-12-01
graceAustinteam472023-02-17
hiroOsakafree192025-08-23
inesLisbonfree272025-02-09
joaoLisbonteam442022-12-12
kavyaPunefree222025-10-03
linusBerlinpro552021-01-28
mayaAustinfree312024-05-19
noorPuneteam352023-08-14
oluNairobiteam492022-04-26
priyaPunepro282024-10-07
soraOsakapro422023-05-21
tomasLisbonpro582021-09-15
Decompass vs Compass

An honest comparison

Compass is MongoDB's official, full-featured GUI, and it can write. Decompass does less on purpose. Here are the points we could verify. See the full comparison →

 DecompassMongoDB Compass 1.50
Write data (insert / update / delete)Never: no write code pathsYes, unless you enable its read-only mode
Read-only can be switched offNo, there is nothing to switchYes, it's a setting
$out / $merge in pipelinesRejected by the serverAllowed
ArchitectureLocal Python server + your browserElectron desktop app
Install size (measured, macOS)~0.35 MB source + ~7 MB Python packages438 MB app bundle
Shell-syntax queries, aggregation builder, schema, indexes, explainYesYes
Built-in shellLaunches external mongoshEmbedded mongosh
Read vs write

Browse with Decompass, write with mongosh

Splitting reading and writing into two tools means you can't fat-finger a production write while you're only looking. When you do mean to change data, you do it deliberately in a shell.

Read: in Decompass

Type this into the Filter box, then press Ctrl+Enter:

{ plan: 'free', signedUp: { $lt: ISODate("2024-01-01") } }

Check the count, the schema, and the explain plan, so you know exactly what you're about to touch.

Write: in mongosh

Right-click the database in Decompass to open mongosh, or connect directly:

mongosh "mongodb+srv://cluster.example.net/shop"

db.users.updateMany(
  { plan: "free", signedUp: { $lt: ISODate("2024-01-01") } },
  { $set: { plan: "legacy" } }
)
Quick start

Up and running in under a minute

  1. Install the dependencies

    From the Decompass folder, with Python 3.10+:

    pip install -r requirements.txt
  2. Start it

    python app.py      # serves http://127.0.0.1:5057
  3. Connect

    Open http://127.0.0.1:5057, click + New, and paste a mongodb:// or mongodb+srv:// URI. Then click a collection and press Find.

Full quick start: virtualenvs, Windows .exe, background service →

FAQ

Questions, answered

Is Decompass safe to use on a production database?

It's built for that. Decompass's code has no insert, update, replace, delete, or drop calls, and it rejects $out and $merge aggregation stages. Queries run with a server-side maxTimeMS (10 seconds by default), results are capped at 500 documents and 32 MB, and reads prefer secondaries (secondaryPreferred).

For a hard guarantee that doesn't depend on any client, connect with a database user that has only the built-in read role. See why read-only.

Can Decompass modify, insert, or delete data?

No. There's no write code to turn on: Decompass doesn't expose any write endpoints or buttons. Even if someone sends an aggregation pipeline containing $out or $merge, the server refuses it with “write stage $out not allowed in read-only explorer”.

How do I write data if Decompass is read-only?

Use mongosh. Right-click a database in Decompass (or use its mongosh link) to open a mongosh session for that database, then run commands such as db.users.updateOne({ _id: id }, { $set: { plan: "pro" } }). Keeping writes in a separate, deliberate tool is the whole point.

Is Decompass free?

Decompass has no accounts, sign-up, or paid tier in its code, and you run it yourself. It talks only to the MongoDB servers you configure. A software license hasn't been published yet, so check the project repository for terms before redistributing it.

Why is Decompass faster than Compass?

Decompass is built for clusters with billions of documents and many saved connections. It caches database and collection lists (60 s) and stats (30 s), shows estimated counts instantly and runs exact counts in the background, analyzes schema from a bounded sample instead of a scan, and runs heavy jobs in a separate “slow lane” so they can't block fast metadata calls. It's a small local Python server plus your browser rather than a desktop app. We haven't published head-to-head benchmarks, so try it on your own data.

Is Decompass made by MongoDB?

No. Decompass is an independent project. It is not affiliated with, endorsed by, or sponsored by MongoDB, Inc. It works with MongoDB through the official PyMongo driver.

Which operating systems does Decompass run on?

Any OS with Python 3.10+: Windows, macOS, and Linux, running from source. You can also build a single self-contained Windows Decompass.exe (about 30 MB) with PyInstaller. The always-on background-task scripts are Windows-only.

Does it work with MongoDB Atlas and mongodb+srv:// URIs?

Yes. Add a connection with any mongodb:// or mongodb+srv:// URI. For production clusters, use a database user that has only read access.

All questions about Decompass →