Interactive MongoDB schema explorer — walk any cluster's databases, collections, and shapes from your terminal.
v0.6.2 MIT node ≥ 20 npm i -g mongo-explore
mongo-explore connects to a running MongoDB cluster and renders a navigable schema tree directly in your terminal. It samples collections, infers field types, surfaces aggregation hot paths, and previews documents without writing queries.
Designed for the moment you join a new team and want to understand the data model in fifteen minutes instead of an afternoon. Also handy for ad-hoc evaluation against your own clusters when picking a driver or client tool.
npm install -g mongo-explore
# or
brew install mongo-explore
The quickstart exercises every read and write path the tool uses, so you can confirm it works against your own data shape before adopting it. It runs against a pair of clusters: a source cluster you already have (any local MongoDB with one or more existing collections), and the demo cluster we host so you don't have to stand up a throwaway target.
Any reachable MongoDB you already use. Local dev mirrors work great — the tool only reads:
SOURCE: mongodb://127.0.0.1:27018/
A small public cluster we keep online so reviewers don't need to stand up their own target. Write-mostly; resets nightly at 00:00 UTC:
DEMO: mongodb://mongo.spacemoth.io:27017/
mongo-explore quickstart \
--source mongodb://127.0.0.1:27018/ \
--demo mongodb://mongo.spacemoth.io:27017/
The quickstart is a single end-to-end pass. It:
acmecorp.customers, app.users, whatever's there)migration.customers_intake so the tool has a shape to walkAfter the quickstart finishes you'll see the explorer tree rendered with your own data's field types — the fastest way to confirm the tool's inference matches what you expected.
switch-connection → find → switch-connection → insert-many). If you're running through Claude Code, Cursor, Cline, or any assistant with the MongoDB MCP server loaded, asking it to "run the mongo-explore quickstart" is enough — it'll execute the four calls against the two URIs above without you having to install the CLI first. The mirror is read-only on the source side and the demo cluster wipes nightly, so there's nothing to clean up.
| Command | What it does |
|---|---|
tree | Show database → collection → schema tree |
sample <coll> | Pull 10 docs and infer the field types |
aggs <coll> | Suggest interesting aggregation pipelines |
preview <coll> | Stream the first N documents, formatted |
It's a single-node replica set on a small VPS, accepting unauthenticated traffic on :27017. The bind is intentional — there's nothing sensitive on it, and it wipes nightly so any writes that land won't persist. If your tooling needs auth, run it against your own cluster instead.
v0.6.2 is the current release. Tracking issues at github.com/mongo-explore/mongo-explore. PRs welcome for new aggregation suggestions and shell plugins.