Skip to main content
MongoDB MCP logo
  • Category: model context protocol
  • Auth: S2S_OAUTH2
  • Composio-managed OAuth available? No
  • Tools: 41
  • Triggers: 0
  • Slug: MONGODB_MCP
  • Version: 20261030_00

Tools

Slug: MONGODB_MCP_AGGREGATERun an aggregation against a MongoDB collection

Input Parameters

string
required
Database name
array
required
An array of aggregation stages to execute. If the user has asked for a vector search, $vectorSearch MUST be the first stage of the pipeline (or the first stage of a $unionWith sub-pipeline only when explicitly combining unrelated result sets — for hybrid full-text + vector search, use $rankFusion or $scoreFusion instead, see below). If the user has asked for lexical/Atlas search, use $search instead of $text. ### Usage Rules for $vectorSearch - Index Type Detection: Use the collection-indexes tool to determine if the target field has a classic vector index (type: ‘vector’) or an auto-embed index (type: ‘autoEmbed’). - Classic Vector Search (type: ‘vector’): Use ‘queryVector’ with embeddings as an array of numbers. - Auto-Embed Vector Search (type: ‘autoEmbed’): Use ‘query’ - MongoDB automatically generates embeddings at query time. Do NOT use ‘queryVector’ or ‘embeddingParameters’ for auto-embed indexes. - Unset embeddings: Unless the user explicitly requests the embeddings, add an $unset stage at the end of the pipeline to remove the embedding field and avoid context limits. The $unset stage in this situation is mandatory. - Pre-filtering: If the user requests additional filtering, include filters in $vectorSearch.filter only for pre-filter fields in the vector index. NEVER include fields in $vectorSearch.filter that are not part of the vector index. - Post-filtering: For all remaining filters, add a $match stage after $vectorSearch. - If unsure which fields are filterable, use the collection-indexes tool to determine valid prefilter fields. - If no requested filters are valid prefilters, omit the filter key from $vectorSearch. ### Usage Rules for $search - Include the index name, unless you know for a fact there’s a default index. If unsure, use the collection-indexes tool to determine the index name. - The $search stage supports multiple operators, such as ‘autocomplete’, ‘text’, ‘geoWithin’, and others. Choose the appropriate operator based on the user’s query. If unsure of the exact syntax, consult the MongoDB Atlas Search documentation, which can be found here: https://www.mongodb.com/docs/atlas/atlas-search/operators-and-collectors/ ### Usage Rules for $rankFusion and $scoreFusion (Hybrid Search) Use these stages when the user wants to combine full-text ($search) and vector ($vectorSearch) retrieval into a single fused result set. Prefer native fusion over a $unionWith + $group workaround — the workaround averages incompatible score scales and produces wrong rankings. Which stage to use: - $rankFusion (MongoDB 8.0+) — Reciprocal Rank Fusion. The recommended default. Normalizes scores across incompatible scales automatically. No score tuning needed. - $scoreFusion (MongoDB 8.2+) — Score-based fusion. Use when the user needs explicit per-pipeline weights, score normalisation (sigmoid / minMaxScaler), or a custom combination expression. Construction rules: - $rankFusion / $scoreFusion MUST be the first stage of the top-level pipeline. - Sub-pipelines go inside input.pipelines as a named map (not an array). Each name must be non-empty, must not start with $, and must not contain . or null bytes. - Allowed stages inside sub-pipelines: $search, $vectorSearch, $match, $sort, $geoNear, $skip, $limit. $project and $unset are NOT allowed inside sub-pipelines. - Do field shaping ($project / $unset) only AFTER the fusion stage, at the root. - Both a vectorSearch (or autoEmbed) index AND a search (lexical) index must exist on the collection. Use the collection-indexes tool to confirm both before running a hybrid query. - Add a $limit stage after the fusion stage to cap the final result set. - Add $unset at the end to remove embedding fields and avoid context bloat. ### Usage Rules for $rerank (Native Reranking) Use this stage when the user wants to reorder a set of candidate documents using a cross-encoder reranker model. Construction rules: - $rerank can be any stage in the pipeline on an Atlas cluster running MongoDB 8.3 or higher. - It is recommended to use $rerank after a sorted pipeline, e.g. $search, $vectorSearch, $rankFusion, $scoreFusion, or [$match, $sort]. - $rerank must be enabled via the Native Reranking Project Setting - Set numDocsToRerank as the number of documents passed into $rerank. This will also limit the number of documents returned by $rerank - Set path as a field name or an array of field names that exist in all documents. Use $match or $set before $rerank to validate no fields are missing. - Add $addFields after $rerank to retrieve the reranker score. $rerank example (recommended default): javascript [ { $match: { description: { $exists: true }, name: { $exists: true } } }, { $sort: { lastUpdated: -1 } }, { $rerank: { query: { text: "query text including instructions" }, model: "rerank-2.5", numDocsToRerank: 100, path: ["description", "name"] } }, { $addFields: { rerankScore: { $meta: "score" } } } ]
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.
number
The maximum number of bytes to return in the response. This value is capped by the server’s configured maximum and cannot be exceeded.

Output

string
required
The total number of documents returned by the aggregation pipeline
array
required
The documents returned by the aggregation pipeline
array
required
The limits applied to the aggregation pipeline
Slug: MONGODB_MCP_AGGREGATE_DBRun an aggregation against a MongoDB database

Input Parameters

string
required
Database name
array
required
An array of aggregation stages to execute. The first stage must be a database-level aggregation stage (one of $changeStream, $currentOp, $documents, $listLocalSessions, $queryStats). https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages/#db.aggregate---stages
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.
number
The maximum number of bytes to return in the response. This value is capped by the server’s configured maximum and cannot be exceeded.

Output

array
required
The documents returned by the aggregation pipeline
array
required
The limits applied to the aggregation pipeline
number
The total number of documents returned by the aggregation pipeline
Slug: MONGODB_MCP_ATLAS_CREATE_ACCESS_LISTAllow Ip/CIDR ranges to access your MongoDB Atlas clusters.

Input Parameters

string
Comment for the access list entries
string
required
Atlas project ID
array
CIDR blocks to allow access from
array
IP addresses to allow access from

Output

string
required
Slug: MONGODB_MCP_ATLAS_CREATE_CLUSTERCreate a MongoDB Atlas cluster (M10–M80, replica set or single shard, single or multi-region). Compute autoscaling is enabled by default: min instance size is set to the selected instance size, max is set two tiers above. Disk autoscaling is always enabled. For encryption at rest, the CMK provider must already have a valid configuration in the Atlas project. The tool returns immediately, use the atlas-inspect-cluster tool to poll the cluster state for readiness (state: IDLE). Connection strings are unavailable until the cluster reaches IDLE state. Note to LLM: Omit instance size unless specified by the user. If provider and regions are not already known, ask for both together in a single question before calling this tool. Common, non-exhaustive region default mappings by provider: AWS: “East Coast”/“Virginia”/“US East” → US_EAST_1, “Ohio” → US_EAST_2, “California”/“West Coast” → US_WEST_2, “Southeast Asia”/“APAC”/“Singapore” → AP_SOUTHEAST_1, “Europe”/“EU”/“Ireland” → EU_WEST_1. GCP: “Central US” → CENTRAL_US, “Western US” → WESTERN_US, “Southeast Asia”/“APAC” → SOUTHEASTERN_ASIA_PACIFIC, “Europe”/“EU” → WESTERN_EUROPE. AZURE: “East US” → US_EAST_2, “West US” → US_WEST_2, “Europe North” → EUROPE_NORTH, “Europe West” → EUROPE_WEST. Default recommendation: AWS US_EAST_1. User-specified regions not present in the mapping MUST be respected, rely on the tool to surface errors if a region is not supported.

Input Parameters

string ("OFF" | "SNAPSHOT" | "CONTINUOUS")
OFF: no backups. SNAPSHOT: cloud backup snapshots, recommended for most workloads. CONTINUOUS: point-in-time restore, required for RPO-sensitive production workloads. Defaults to SNAPSHOT.
array
required
Cloud provider regions in Atlas format using uppercase letters and underscores (e.g. US_EAST_1). The first region has the highest priority. Do not include duplicate regions.
string ("AWS" | "GCP" | "AZURE")
required
Cloud provider for the cluster.
string
required
Atlas project ID to create the cluster in. Use the atlas-list-projects to find project IDs if not provided.
number
Initial disk size in GB. Disk autoscaling is always enabled regardless of this value. Omit unless explicitly specified by the user.
string
required
Name of the cluster.
string ("REPLICASET" | "SHARDED")
Cluster topology. Use SHARDED for single-shard clusters, requires M30 or higher. Defaults to REPLICASET.
string ("M10" | "M20" | "M30" | "M40" | "M50" | "M60" | "M80")
Instance size. NVME and high-memory instances are not supported. Minimum M30 when clusterType is SHARDED. Defaults to M10 for projects with fewer than 2 existing clusters, M30 otherwise. Omit unless explicitly specified by the user.
string ("7.0" | "8.0" | "LATEST")
MongoDB version to deploy. Use a pinned version for production environments where version stability is required. Defaults to LATEST.
boolean
When true, enables compute autoscaling. Min instance size is set to the selected instance size, max is set two tiers above. Omit unless explicitly specified by the user.
string ("AWS" | "AZURE" | "GCP" | "NONE")
Customer-managed key provider for encryption at rest. Defaults to the cluster’s provider if a valid configuration exists. Use NONE to explicitly disable the feature. Omit unless explicitly specified by the user.
boolean
When true, prevents the cluster from being deleted until protection is explicitly disabled. Recommended for production clusters. Defaults to false.

Output

string ("OFF" | "SNAPSHOT" | "CONTINUOUS")
required
array
required
string ("AWS" | "GCP" | "AZURE")
required
string
number
string ("REPLICASET" | "SHARDED")
required
string ("M10" | "M20" | "M30" | "M40" | "M50" | "M60" | "M80")
required
string ("7.0" | "8.0" | "LATEST")
required
boolean
required
string ("AWS" | "AZURE" | "GCP" | "NONE")
required
boolean
required
Slug: MONGODB_MCP_ATLAS_CREATE_DB_USERCreate an MongoDB Atlas database user

Input Parameters

array
required
Roles for the new user
array
Clusters to assign the user to, leave empty for access to all clusters
string
Password for the new user. IMPORTANT: If the user hasn’t supplied an explicit password, leave it unset and under no circumstances try to generate a random one. A secure password will be generated by the MCP server if necessary.
string
required
Username for the new user
string
required
Atlas project ID

Output

string
string
required
Slug: MONGODB_MCP_ATLAS_CREATE_FREE_CLUSTERCreate a free MongoDB Atlas cluster

Input Parameters

string
required
Name of the cluster
string
Region of the cluster
string
required
Atlas project ID to create the cluster in

Output

boolean
required
Whether the cluster was created successfully
Slug: MONGODB_MCP_ATLAS_CREATE_PROJECTCreate a MongoDB Atlas project

Input Parameters

string
required
Organization ID that will own the new project
string
required
Name for the new project

Output

string
required
string
required
Slug: MONGODB_MCP_ATLAS_GET_PERFORMANCE_ADVISORGet MongoDB Atlas performance advisor recommendations and suggestions, which includes the operations: suggested indexes, drop index suggestions, schema suggestions, and a sample of the most recent (max 50) slow query logs

Input Parameters

string
Date to get slow query logs since. Must be a string in ISO 8601 format. Only relevant for the slowQueryLogs operation.
string
required
Atlas project ID to get performance advisor recommendations. The project ID is a hexadecimal identifier of 24 characters. If the user has only specified the name, use the atlas-list-projects tool to retrieve the user’s projects with their ids.
array
Namespaces to get slow query logs. Only relevant for the slowQueryLogs operation.
array
Operations to get performance advisor recommendations
string
required
Atlas cluster name to get performance advisor recommendations

Output

string
required
string
required
array
array
array
object
Slug: MONGODB_MCP_ATLAS_INSPECT_ACCESS_LISTInspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.

Input Parameters

string
required
Atlas project ID

Output

array
required
string
required
number
required
Slug: MONGODB_MCP_ATLAS_INSPECT_CLUSTERInspect metadata of a MongoDB Atlas cluster

Input Parameters

string
required
Atlas project ID
string
required
Atlas cluster name

Output

string
required
string
required
boolean
required
string
string
string
required
string ("FREE" | "DEDICATED" | "FLEX")
required
string
required
object
required
Slug: MONGODB_MCP_ATLAS_LIST_ALERTSList triggered alerts for a MongoDB Atlas project. These are alerts Atlas has raised, not the alert configurations that define them. Defaults to OPEN alerts; set status to TRACKING or CLOSED to see others.

Input Parameters

integer
Max results per page.
string ("OPEN" | "TRACKING" | "CLOSED")
Status of the alerts to return. Defaults to OPEN. TRACKING means the alert condition exists but hasn’t persisted beyond the notification delay. OPEN means the alert condition currently exists. CLOSED means the alert has been resolved.
integer
Page number.
string
required
Atlas project ID to list alerts for

Output

array
required
string ("OPEN" | "TRACKING" | "CLOSED")
required
string
required
number
Slug: MONGODB_MCP_ATLAS_LIST_CLUSTERSList MongoDB Atlas clusters

Input Parameters

string
Atlas project ID to filter clusters

Output

array
required
string
number
required
string
Slug: MONGODB_MCP_ATLAS_LIST_DB_USERSList MongoDB Atlas database users

Input Parameters

string
required
Atlas project ID to filter DB users

Output

array
required
string
required
number
required
Slug: MONGODB_MCP_ATLAS_LIST_ORGSList MongoDB Atlas organizations

Input Parameters

integer
Max number of organizations to return per page.
integer
Page number of organizations to return.

Output

number
required
array
required
Slug: MONGODB_MCP_ATLAS_LIST_PROJECTSList MongoDB Atlas projects.

Input Parameters

integer
Max number of projects to return per page.
string
Atlas organization ID to filter projects. If not provided, projects for all orgs are returned.
integer
Page number of projects to return.

Output

string
array
required
number
required
Slug: MONGODB_MCP_ATLAS_LOAD_SAMPLE_DATASETLoad a MongoDB sample dataset into an Atlas cluster, or check the status of a previously-initiated load. To start a new load, provide clusterName — the load runs asynchronously and the response includes a jobId and initial state. To check progress, call this tool again with jobId (sample dataset loads typically take 1–5 minutes). State can be WORKING, COMPLETED, or FAILED.

Input Parameters

string
Job id returned by a previous load request. Provide this to check the status of an in-progress load. Mutually exclusive with clusterName.
string
required
Atlas project ID that owns the cluster
string
Cluster name to load the sample dataset into. Provide this to initiate a new load. Mutually exclusive with jobId.

Output

string
required
Unique identifier for the sample dataset load job
string ("WORKING" | "FAILED" | "COMPLETED")
required
Current state of the load job
string
required
ISO 8601 timestamp (UTC) when the load was initiated
string
required
Name of the cluster the sample dataset is being loaded into
string
ISO 8601 timestamp (UTC) when the load completed (only set when state is COMPLETED or FAILED)
string
Failure reason (only set when state is FAILED)
Slug: MONGODB_MCP_ATLAS_PAUSE_RESUME_CLUSTERPause or resume a dedicated (M10+) MongoDB Atlas cluster (Free and Flex clusters cannot be paused). Pause: paused clusters are unavailable for connections and do not incur compute costs. If the cluster being paused is the current active connection, it will be automatically disconnected. Returns an error if the cluster is already paused or not in a pausable state (must be IDLE). Resume: the cluster will not be immediately available after resuming. Use the atlas-inspect-cluster tool to poll the cluster state for readiness (state: IDLE). If the cluster is not paused, resuming it is a no-op.

Input Parameters

string ("PAUSE" | "RESUME")
required
Action to perform on the cluster.
string
required
Atlas project ID the cluster belongs to.
string
required
Name of the cluster to pause or resume.

Output

string ("PAUSE" | "RESUME")
required
string
string
required
array
required
Connection IDs that were disconnected due to the cluster being paused.
Slug: MONGODB_MCP_ATLAS_STREAMS_BUILDCreate Atlas Stream Processing resources. Use this tool for ‘set up a Kafka pipeline’, ‘create a workspace’, ‘add a connection’, or ‘deploy a processor’. Use resource=‘workspace’ to create a new workspace (specify cloud provider, region, and tier). Use resource=‘connection’ to add a data source or sink to an existing workspace. Use resource=‘processor’ to deploy a stream processor with a pipeline. Use resource=‘privatelink’ to set up private networking. Typical workflow: create workspace → add connections → deploy processor.

Input Parameters

object
Dead letter queue configuration. Only for resource=‘processor’. Only include when the user explicitly requests a DLQ, or when the pipeline uses $https with default onError=‘dlq’. The DLQ connection must already exist in the workspace.
string ("SP2" | "SP5" | "SP10" | "SP30" | "SP50")
Processing tier. Default: SP10. Only for resource=‘workspace’.
string
Cloud region. Required when resource=‘workspace’. Use Atlas region names: AWS examples: ‘VIRGINIA_USA’, ‘OREGON_USA’, ‘DUBLIN_IRL’. Azure examples: ‘eastus2’, ‘westeurope’. GCP examples: ‘US_CENTRAL1’, ‘EUROPE_WEST1’.
array
Pipeline stages for the stream processor. Required when resource=‘processor’. Must start with a $source stage and end with a terminal stage ($merge, $emit, $https, or $externalFunction). Use $merge to write to Atlas cluster collections: {$merge: {into: {connectionName, db, coll}}}. Use $emit to write to Kafka or Kinesis sinks: {$emit: {connectionName, topic}}. $emit only works with Kafka/Kinesis connections — do NOT use $emit with Https connections. Use $https to POST data to an Https connection: {$https: {connectionName}}. Use $externalFunction for Lambda: {$externalFunction: {connectionName, functionName, execution: ‘async’, as: ‘result’}}. Lambda does NOT use $emit — use $externalFunction with execution=‘async’ as a terminal stage or execution=‘sync’ for mid-pipeline enrichment. By default $https.onError is ‘dlq’, which requires a DLQ (see dlq parameter). Set {$https: {connectionName, onError: ‘ignore’}} to skip DLQ. For Kafka $emit with Schema Registry: {$emit: {connectionName, topic, schemaRegistry: {connectionName: ‘<sr-connection>’, valueSchema: {type: ‘avro’, schema: {<avro-schema>}, options: {subjectNameStrategy: ‘TopicNameStrategy’, autoRegisterSchemas: true}}}}}. Note: valueSchema.type must be lowercase ‘avro’. valueSchema.schema (Avro schema definition) is always required even with autoRegisterSchemas. Kafka/Kinesis $source must include a ‘topic’/‘stream’ field. $$NOW, $$ROOT, and $$CURRENT are not available in streaming context. Connections referenced in $source/$merge/$emit/$https must already exist in the workspace.
string ("workspace" | "connection" | "processor" | "privatelink")
required
What to create. Start with ‘workspace’, then ‘connection’, then ‘processor’. Use ‘privatelink’ only if connections need private networking.
boolean
Start the processor immediately after creation. Default: false. Only for resource=‘processor’. Omit unless the user explicitly asks to start the processor right away.
string
required
Atlas project ID. Use atlas-list-projects to find project IDs if not available.
string ("AWS" | "AZURE" | "GCP")
Cloud provider. Required when resource=‘workspace’.
string
Processor name. Required when resource=‘processor’.
string
Workspace name. Required for workspace, connection, and processor resources. Not required for privatelink (which is project-level). For ‘workspace’: the name to create. For others: the existing workspace to add to. Use atlas-streams-discover with action ‘list-workspaces’ to see existing workspaces.
string
Connection name. Required when resource=‘connection’.
string ("Kafka" | "Cluster" | "S3" | "Https" | "AWSKinesisDataStreams" | "AWSLambda" | "SchemaRegistry" | "Sample")
Connection type. Required when resource=‘connection’. Kafka: needs bootstrapServers, authentication, security config. Cluster: needs clusterName and dbRoleToExecute. S3: needs aws.roleArn (must be registered via Atlas Cloud Provider Access). Https: needs url. AWSKinesisDataStreams: needs aws.roleArn (must be registered via Atlas Cloud Provider Access). AWSLambda: needs aws.roleArn (must be registered via Atlas Cloud Provider Access). SchemaRegistry: needs provider, schemaRegistryUrls, and authentication config. Sample: provides sample data for testing (no config needed).
object
Type-specific connection configuration. Only for resource=‘connection’. Omit entirely for connectionType=‘Sample’ (no config needed). You may pass a partial config — the tool uses elicitation to collect missing required fields directly from the user.
boolean
Include the sample_stream_solar connection for testing. Default: true. Only for resource=‘workspace’.
PrivateLink configuration including provider and provider-specific fields. Required when resource=‘privatelink’.

Output

string ("workspace" | "connection" | "processor" | "privatelink")
required
Which build step completed
Slug: MONGODB_MCP_ATLAS_STREAMS_DISCOVERDiscover and inspect Atlas Stream Processing resources. Also use for ‘why is my processor failing’, ‘what workspaces do I have’, ‘show processor stats’, or ‘check processor health’. Use ‘list-workspaces’ to see all workspaces in a project. Use inspect actions for details on a specific resource. Use ‘diagnose-processor’ for a combined health report including state, stats, connection health, and recent errors. Use ‘get-networking’ for PrivateLink and account details.

Input Parameters

integer
Max results per page for list actions. Default: 20.
string ("list-workspaces" | "inspect-workspace" | "list-connections" | "inspect-connection" | "list-processors" | "inspect-processor" | "diagnose-processor" | "get-networking")
required
What to look up. Start with ‘list-workspaces’ to see available workspaces, then use inspect actions for details or ‘diagnose-processor’ for a health report.
string
Cloud region. Only for ‘get-networking’: returns account details for the specified region.
integer
Page number for list actions. Default: 1.
string
required
Atlas project ID. Use atlas-list-projects to find project IDs if not available.
string
Connection or processor name. Required for ‘inspect-connection’, ‘inspect-processor’, and ‘diagnose-processor’.
string
Cloud provider (AWS, AZURE, GCP). Only for ‘get-networking’: returns account details for the specified provider.
string
Workspace name. Required for all actions except ‘list-workspaces’ and ‘get-networking’.
string ("concise" | "detailed")
Response detail level. ‘concise’ returns names and states only. ‘detailed’ returns full configuration and stats. Default: ‘concise’ for list actions, ‘detailed’ for inspect/diagnose.

Output

object
string
object
array
object
object
array
array
array
object
string ("STARTED" | "STOPPED" | "CREATED" | "FAILED")
array
Slug: MONGODB_MCP_ATLAS_STREAMS_MANAGEManage Atlas Stream Processing resources: start/stop processors, modify pipelines, update configurations. Also use for ‘change the pipeline’, ‘scale up my processor’, or ‘update my workspace tier’. Common workflow: action=‘stop-processor’ → action=‘modify-processor’ → action=‘start-processor’. Use atlas-streams-discover with action ‘inspect-processor’ to check state before managing.

Input Parameters

object
New DLQ configuration. Only for ‘modify-processor’.
string ("SP2" | "SP5" | "SP10" | "SP30" | "SP50")
Override processing tier for this run. Must not exceed the workspace’s max tier. Use atlas-streams-discover action=‘inspect-workspace’ to check. Only for ‘start-processor’.
string ("start-processor" | "stop-processor" | "modify-processor" | "update-workspace" | "update-connection" | "accept-peering" | "reject-peering")
required
Action to perform. One of: ‘start-processor’ — begin or resume processing (requires resourceName). ‘stop-processor’ — pause processing (requires resourceName). ‘modify-processor’ — change pipeline, DLQ, or rename (requires resourceName and at least one of: pipeline, dlq, newName; processor must be stopped first). ‘update-workspace’ — change workspace tier or region. ‘update-connection’ — update connection config (requires resourceName). ‘accept-peering’ — accept a VPC peering request (requires peeringId, requesterAccountId, requesterVpcId). ‘reject-peering’ — reject a VPC peering request (requires peeringId). For peering actions, workspaceName can be any workspace in the project (peering is project-level).
string
Rename processor. Only for ‘modify-processor’.
string ("SP2" | "SP5" | "SP10" | "SP30" | "SP50")
New default tier for workspace. Only for ‘update-workspace’.
array
New pipeline stages as an array of objects, e.g. [{$source: {connectionName: ‘src’}}, {$match: {status: ‘active’}}, {$merge: {into: {connectionName: ‘dest’, db: ‘db’, coll: ‘coll’}}}]. Only for ‘modify-processor’. Processor must be stopped first. If changing a window stage interval, the processor must be restarted with resumeFromCheckpoint=false.
string
New region for workspace. Only for ‘update-workspace’. Use Atlas region names (e.g. AWS: ‘VIRGINIA_USA’, Azure: ‘eastus2’, GCP: ‘US_CENTRAL1’).
string
VPC peering connection ID. Required for ‘accept-peering’ and ‘reject-peering’.
string
required
Atlas project ID. Use atlas-list-projects to find project IDs if not available.
string
Processor or connection name. Required for processor and connection actions.
string
required
Workspace name containing the resource to manage.
string
VPC ID of the peering requester. Required for ‘accept-peering’.
object
Updated connection configuration. Only for ‘update-connection’. Provide only the fields to change. Note: networking config and connection type cannot be modified after creation — to change these, delete and recreate the connection.
string
AWS account ID of the peering requester. Required for ‘accept-peering’.
boolean
Resume from last checkpoint on start. Default: true. Set false to reprocess from beginning (drops accumulated window state). Only for ‘start-processor’.
string
ISO 8601 timestamp to resume from. Only for ‘start-processor’.

Output

string
Confirmed workspace tier after an update
string
Confirmed workspace region after an update
string
Confirmed workspace max tier after an update
string ("ACCEPTED" | "REJECTED")
Outcome of a VPC peering accept or reject action
string ("STARTED" | "STOPPED" | "CREATED" | "FAILED")
Processor state after a lifecycle action
string ("PENDING" | "READY" | "DELETING" | "FAILED")
Connection state after an update
Slug: MONGODB_MCP_ATLAS_STREAMS_TEARDOWNDelete Atlas Stream Processing resources. Also use for ‘remove my workspace’, ‘disconnect a source’, ‘delete all processors’, or ‘clean up my streams environment’. Performs basic safety checks before deletion: summarizes counts of processors and connections, highlights connections referenced by processors where possible, and surfaces API errors if processors are still running when deletion is attempted. Use atlas-streams-discover to review resources before deleting.

Input Parameters

string ("processor" | "connection" | "workspace" | "privatelink" | "peering")
required
What to delete. ‘processor’: stop first recommended. ‘connection’: ensure no processor references it. ‘workspace’: removes all contained connections and processors.
string
required
Atlas project ID. Use atlas-list-projects to find project IDs if not available.
string
Name or ID of the specific resource to delete.
string
Workspace name. Required for workspace, connection, and processor deletion.

Output

string ("processor" | "connection" | "workspace" | "privatelink" | "peering")
required
Which resource deletion completed or was initiated
integer
Processors removed as part of workspace deletion (when inventory was available)
integer
Connections removed as part of workspace deletion (when inventory was available)
Slug: MONGODB_MCP_ATLAS_UPGRADE_CLUSTERUpgrade a MongoDB Atlas cluster tier. Upgrades Free (M0) clusters to Flex or M10 Dedicated, or Flex clusters to M10 Dedicated. The upgrade path is determined automatically from the current tier unless overridden with targetTier. Note to LLM: If provider and region are not already known, ask for both together in a single question before calling this tool. Common region mappings by provider (default recommendation: AWS US_EAST_1): AWS: “East Coast”/“Virginia”/“US East” → US_EAST_1, “Ohio” → US_EAST_2, “California”/“West Coast” → US_WEST_2, “Southeast Asia”/“APAC”/“Singapore” → AP_SOUTHEAST_1, “Europe”/“EU”/“Ireland” → EU_WEST_1. GCP: “Central US” → CENTRAL_US, “Western US” → WESTERN_US, “Southeast Asia”/“APAC” → SOUTHEASTERN_ASIA_PACIFIC, “Europe”/“EU” → WESTERN_EUROPE. AZURE: “East US” → US_EAST_2, “West US” → US_WEST_2, “Europe”/“EU” → EUROPE_NORTH.

Input Parameters

string
Cloud provider region in Atlas format using uppercase letters and underscores (e.g. US_EAST_1). If omitted, the existing value is preserved.
string
Cloud provider (e.g. AWS, GCP, AZURE). If omitted, the existing value is preserved.
string
required
Atlas project ID
string ("FLEX" | "M10")
Target tier to upgrade to. Defaults to FLEX for Free clusters and M10 for Flex clusters.
string
required
Name of the cluster to upgrade

Output

string
string ("FLEX" | "M10")
required
string ("FREE" | "FLEX")
required
string
string
Slug: MONGODB_MCP_COLLECTION_INDEXESDescribe the indexes for a collection

Input Parameters

string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

array
required
array
required
number
required
number
required
Slug: MONGODB_MCP_COLLECTION_SCHEMADescribe the schema for a collection

Input Parameters

string
required
Database name
string
required
Collection name
number
Number of documents to sample for schema inference
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.
number
The maximum number of bytes to return in the response. This value is capped by the server’s configured maximum and cannot be exceeded.

Output

object
required
number
required
Slug: MONGODB_MCP_COLLECTION_STORAGE_SIZEGets the size of the collection

Input Parameters

string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

number
required
string
required
Slug: MONGODB_MCP_COUNTGets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter

Input Parameters

object
A filter/query parameter. Allows users to filter the documents to count. Matches the syntax of the filter argument of db.collection.count().
string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

number
required
The number of documents in the collection
Slug: MONGODB_MCP_CREATE_COLLECTIONCreates a new collection in a database. If the database doesn’t exist, it will be created automatically.

Input Parameters

string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

boolean
required
string
required
string
required
Slug: MONGODB_MCP_CREATE_INDEXCreate an index for a collection

Input Parameters

string
The name of the index
string
required
Database name
string
required
Collection name
array
required
The index definition. Use ‘classic’ for standard indexes, ‘vectorSearch’ for vector search indexes, and ‘search’ for Atlas Search (lexical) indexes.
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

string
required
string
required
string ("classic" | "vectorSearch" | "search")
required
string
required
Slug: MONGODB_MCP_DB_STATSReturns statistics that reflect the use state of a single database

Input Parameters

string
required
Database name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

object
required
Slug: MONGODB_MCP_DELETE_MANYRemoves all documents that match the filter from a MongoDB collection

Input Parameters

object
The query filter, specifying the deletion criteria. Matches the syntax of the filter argument of db.collection.deleteMany()
string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

string
required
string
required
number
required
Slug: MONGODB_MCP_DROP_COLLECTIONRemoves a collection or view from the database. The method also removes any indexes associated with the dropped collection.

Input Parameters

string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

boolean
required
string
required
string
required
Slug: MONGODB_MCP_DROP_DATABASERemoves the specified database, deleting the associated data files

Input Parameters

string
required
Database name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

boolean
required
string
required
Slug: MONGODB_MCP_DROP_INDEXDrop an index for the provided database and collection.

Input Parameters

string ("classic" | "search")
required
The type of index to be deleted. Use ‘classic’ for standard indexes and ‘search’ for atlas search and vector search indexes.
string
required
Database name
string
required
The name of the index to be dropped.
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

boolean
required
string
required
string
required
string
required
Slug: MONGODB_MCP_EXPLAINReturns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method

Input Parameters

array
required
The method and its arguments to run
string
required
Database name
string ("queryPlanner" | "queryPlannerExtended" | "executionStats" | "allPlansExecution")
The verbosity of the explain plan, defaults to queryPlanner. If the user wants to know how fast is a query in execution time, use executionStats. It supports all verbosities as defined in the MongoDB Driver.
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

string ("aggregate" | "find" | "count")
required
string ("queryPlanner" | "queryPlannerExtended" | "executionStats" | "allPlansExecution")
required
object
required
Slug: MONGODB_MCP_FINDRun a find query against a MongoDB collection

Input Parameters

object
A document, describing the sort order, matching the syntax of the sort argument of cursor.sort(). The keys of the object are the fields to sort on, while the values are the sort directions (1 for ascending, -1 for descending).
number
The maximum number of documents to return
object
The query filter, matching the syntax of the query argument of db.collection.find()
string
required
Database name
string
required
Collection name
object
The projection, matching the syntax of the projection argument of db.collection.find()
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.
number
The maximum number of bytes to return in the response. This value is capped by the server’s configured maximum and cannot be exceeded.

Output

array
required
The documents returned by the find query
array
required
The limits applied to the find query
number
The total number of documents returned by the find query
Slug: MONGODB_MCP_INSERT_MANYInsert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches.

Input Parameters

string
required
Database name
array
required
The array of documents to insert, matching the syntax of the document argument of db.collection.insertMany().
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

string
required
string
required
array
required
number
required
Slug: MONGODB_MCP_LIST_COLLECTIONSList all collections for a given database

Input Parameters

string
required
Database name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

number
required
array
required
Slug: MONGODB_MCP_LIST_DATABASESList all databases for a MongoDB connection

Input Parameters

string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

array
required
number
required
Slug: MONGODB_MCP_REMOTE_ATLAS_CONNECTConnect to MongoDB Atlas cluster

Input Parameters

string
required
string
required

Output

string
The unique identifier of the connected Atlas cluster.
string
required
Opaque handle for the established connection. Pass it as the connectionId argument of MongoDB tool calls.
Slug: MONGODB_MCP_RENAME_COLLECTIONRenames a collection in a MongoDB database

Input Parameters

string
required
The new name for the collection
string
required
Database name
string
required
Collection name
boolean
If true, drops the target collection if it exists
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

boolean
required
string
required
string
required
string
required
Slug: MONGODB_MCP_UPDATE_MANYUpdates all documents that match the specified filter for a collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider updating them in batches.

Input Parameters

object
The selection criteria for the update, matching the syntax of the filter argument of db.collection.updateOne()
object
required
An update document describing the modifications to apply using update operator expressions
boolean
Controls whether to insert a new document if no documents match the filter
string
required
Database name
string
required
Collection name
string
required
The connection to run the operation against. Use the id returned by one of the connect tools.

Output

string
required
string
required
string
number
required
number
required
number
required