MongoDB Tools

18 tools for MongoDB Atlas database management — clusters, databases, collections, and queries.

Database operations can be destructive

Be careful with drop, delete, and modify operations. These changes cannot be undone. Always backup important data before making structural changes.

Cluster Management

Manage MongoDB Atlas clusters

mongodb_deployCluster

Deploy a new MongoDB Atlas cluster

Params: projectId, clusterName, tier, region

mongodb_modifyCluster

Update cluster configuration (tier, scaling)

Params: projectId, clusterName, config

mongodb_listClusters

List all clusters in the project

Params: projectId

mongodb_getCluster

Get details of a specific cluster

Params: projectId, clusterName

External Access

Manage network access to your clusters

mongodb_addExternalConnection

Add an IP address to the access whitelist

Params: projectId, clusterName, ipAddress, comment?

mongodb_removeExternalConnection

Remove an IP from the whitelist

Params: projectId, clusterName, ipAddress

Database Operations

Create and manage databases

mongodb_createDatabase

Create a new database

Params: projectId, clusterName, databaseName

mongodb_deleteDatabase

Delete a database (destructive)

Params: projectId, clusterName, databaseName

mongodb_listDatabases

List all databases in a cluster

Params: projectId, clusterName

Collection Operations

Create and manage collections

mongodb_createCollection

Create a new collection

Params: projectId, clusterName, database, collection, options?

mongodb_dropCollection

Drop a collection (destructive)

Params: projectId, clusterName, database, collection

mongodb_renameCollection

Rename a collection

Params: projectId, clusterName, database, oldName, newName

mongodb_listCollections

List all collections in a database

Params: projectId, clusterName, database

Data Operations

Query and modify data

mongodb_createQuery

Execute a find query

Params: projectId, clusterName, database, collection, query, options?

mongodb_modifyDatabase

Insert, update, or delete documents

Params: projectId, clusterName, database, collection, operation, data

mongodb_aggregateQuery

Run an aggregation pipeline

Params: projectId, clusterName, database, collection, pipeline

Index Management

Manage collection indexes for query performance

mongodb_createIndex

Create an index on a collection

Params: projectId, clusterName, database, collection, keys, options?

mongodb_dropIndex

Drop an index

Params: projectId, clusterName, database, collection, indexName

mongodb_listIndexes

List all indexes on a collection

Params: projectId, clusterName, database, collection

Common Patterns

Set up a new database

  1. 1Deploy a cluster with mongodb_deployCluster (or use existing)
  2. 2Create a database with mongodb_createDatabase
  3. 3Create collections with mongodb_createCollection
  4. 4Add indexes for your query patterns with mongodb_createIndex

Query data

  1. 1Use mongodb_createQuery for simple finds
  2. 2Use mongodb_aggregateQuery for complex queries with joins, grouping, etc.
  3. 3Check indexes with mongodb_listIndexes if queries are slow

Enable external access

  1. 1Get your IP address
  2. 2Add it to whitelist with mongodb_addExternalConnection
  3. 3Use the cluster connection string in your application

Query Examples

Find documents
{
  "clusterName": "main",
  "database": "myapp",
  "collection": "users",
  "query": { "status": "active" },
  "options": { "limit": 10, "sort": { "createdAt": -1 } }
}
Aggregation pipeline
{
  "clusterName": "main",
  "database": "myapp",
  "collection": "orders",
  "pipeline": [
    { "$match": { "status": "completed" } },
    { "$group": { "_id": "$userId", "total": { "$sum": "$amount" } } },
    { "$sort": { "total": -1 } },
    { "$limit": 10 }
  ]
}
Create a compound index
{
  "clusterName": "main",
  "database": "myapp",
  "collection": "users",
  "keys": { "email": 1, "status": 1 },
  "options": { "unique": true }
}