Query MongoDB with find, projection and batches, read-only
Run read-only MongoDB find queries with filters, projection, ordered sort and batch navigation. Extended JSON in and out, authSource support and SSH tunnels.
Transport: Official MongoDB Go driver (port 27017 by default)

What you can do today
- Database and collection navigation
- JSON find with filter, projection, ordered sort, skip and limit
- Extended JSON filters such as $oid and $date, and Extended JSON results
- Previous batch / Next batch navigation that rewrites the query for you
- Configurable authentication database (defaults to admin)
- TLS with certificate verification and SSH tunnels
Not supported yet
- Editing, inserting or deleting documents
- Aggregation pipelines
- mongodb+srv:// (SRV) and replica-set connection profiles
Find queries, not a shell
DevOpsPad does not embed a JavaScript shell. A MongoDB query is a JSON document that describes one find call, which makes it read-only by construction:
{
"collection": "products",
"filter": {"active": true},
"projection": {"name": 1, "price": 1},
"sort": {"price": -1},
"skip": 0,
"limit": 100
}
Sort keys keep the order you write them in, and _id is appended as a tie-breaker when you leave it out, so batches are stable.
Types survive the round trip
Filters accept Extended JSON, for example {"_id": {"$oid": "507f1f77bcf86cd799439011"}}. Results come back as canonical Extended JSON, so ObjectIDs, dates and 64-bit numbers are shown exactly as stored instead of being converted to lossy JavaScript numbers.
Batch navigation
Previous batch and Next batch generate the next query, put it in the editor and run it, so what you see always matches the query text. Editing the query disables batch navigation until you run it again. Offset-based batches can shift if documents are written concurrently; for deep paging use a range filter on an indexed field instead.
Authentication and network
Set Authentication database to the database where the user was created; it defaults to admin. TLS with certificate verification and SSH tunnels work the same way as for every other connector.
See MongoDB find queries for the full syntax, or the MySQL connector for relational data.
Help articles
Connect to MongoDB
Add a MongoDB connection in DevOpsPad with host, port, database and authentication database (authSource), plus optional TLS and SSH tunneling.
Write MongoDB find queries
The JSON find format DevOpsPad uses for MongoDB, with collection, filter, projection, sort, skip and limit fields, defaults, validation rules and limits.
Use Extended JSON in MongoDB filters
Filter MongoDB by ObjectId, date, Long and Decimal128 in DevOpsPad with Extended JSON, and read the canonical Extended JSON that results come back in.
Page through MongoDB results in batches
How Previous batch and Next batch page through MongoDB results in DevOpsPad, why _id is added to the sort, and when to switch to range filters.
Connect through an SSH tunnel
Reach private MySQL, Redis, MongoDB, Kafka, ClickHouse and Kubernetes endpoints through a bastion with DevOpsPad's built-in single-hop SSH tunnel.
Frequently asked questions
What query language does the MongoDB connector use?
A JSON find document with collection, filter, projection, sort, skip and limit. It maps directly to a MongoDB find call, so there is no shell or JavaScript to execute.
How many documents does a MongoDB query return?
The limit defaults to 100 and can be set from 1 to 500. Skip can be 0 to 1,000,000, and each response is capped at 8 MiB of encoded Extended JSON.
Can DevOpsPad connect to MongoDB Atlas?
Not with an SRV connection string yet. SRV and replica-set profiles are on the roadmap; today the connector takes a single host and port.