db.runCommand() in the MongoDB shell. This gives you access to any operation MongoDB supports: find, aggregate, insert, update, delete, and administrative commands.
Hyperterse connects to your existing database. It does not create or manage
databases — you provide a running MongoDB instance (self-hosted or MongoDB
Atlas) and a connection string.
Adapter configuration
Create an adapter file inapp/adapters/:
app/adapters/mongo-db.terse
- Standard
- Atlas / SRV
mongodb://user:password@host:27017/databaseConnection options
Maximum number of connections in the pool.
Minimum number of idle connections maintained in the pool.
Timeout in milliseconds for establishing a new connection.
Timeout in milliseconds for selecting a server from a replica set or sharded
cluster.
Verify the connection
Start the server and confirm the adapter connects:Usage
MongoDB tool statements are JSON objects with two required fields:database and command. The command field takes a raw MongoDB database command.
app/tools/find-users/config.terse
Statement format
| Field | Description |
|---|---|
database | The MongoDB database to run the command against. |
command | A raw MongoDB database command object. |
Aggregation example
app/tools/sales-summary/config.terse
ObjectId handling
For queries involving ObjectId fields, pass them using the extended JSON format:Troubleshooting
Connection refused
Verify MongoDB is running and reachable:Authentication failed
Ensure the connection string contains the correct username and password. URL-encode special characters in passwords (e.g.,@ becomes %40).
TLS / Atlas
For MongoDB Atlas, always use themongodb+srv:// URI provided by Atlas. The driver handles TLS and server discovery automatically. For custom certificates, configure TLS options in the connection string.
Invalid statement JSON
Thestatement field must be valid JSON after {{ inputs.* }} substitution. Ensure all placeholders resolve to properly quoted JSON values. The command object must have the operation name as its first key.