Editor experience
Fields that take a MongoDB query, update, or aggregation pipeline (filter, update, pipeline, command, documents, projection, sort) render as a JSON editor; paste or type your queries directly without escaping.
Misspelled MongoDB operators are flagged inline with a suggestion. Typing $grater_than shows Did you mean $gt?. Aggregation variables ($$ROOT, $$NOW) and the positional update marker ($) are recognised and never flagged.
Connection setup
You can connect using either a connection string (recommended for Atlas) or individual credentials.1
Choose your connection method
Option A: Connection String (recommended for MongoDB Atlas):
- Copy the connection string from your Atlas dashboard (e.g.,
mongodb+srv://user:pass@cluster.mongodb.net/mydb)
- Host (e.g.,
localhostormongo.example.com) - Port (default:
27017) - Username and Password
- Database (optional, default database)
- Auth Source (optional, authentication database, usually
admin)
2
Add the connection in Spojit
Go to Connections in Spojit, click Add Connection, select MongoDB, and enter either:
- Connection String: Your full MongoDB URI, or
- Host, Port, Username, Password, Database, and Auth Source fields
Common MongoDB settings
Tools
run-command: Execute a raw database command
run-command: Execute a raw database command
find-documents: Query documents from a collection
find-documents: Query documents from a collection
string
required
Collection name.
object
MongoDB query filter (e.g.,
{ "status": "active" }).object
Fields to include (1) or exclude (0).
object
Sort order (1 for ascending, -1 for descending).
number
Maximum number of documents to return (default: 100).
number
Number of documents to skip.
insert-documents: Insert documents into a collection
insert-documents: Insert documents into a collection
update-documents: Update documents matching a filter
update-documents: Update documents matching a filter
delete-documents: Delete documents matching a filter
delete-documents: Delete documents matching a filter
aggregate: Run an aggregation pipeline
aggregate: Run an aggregation pipeline
list-databases: List all databases
list-databases: List all databases
List all databases accessible with the current credentials. No parameters required.Example response:
list-collections: List collections in a database
list-collections: List collections in a database