Skip to main content The #1 agentic semantic tool search: 91.6% first-try accuracy on S1 Search Bench Explore Tool Discovery
Live 60 Actions

MongoDB Atlas MCP Server
for AI Agents

Connect your AI agent to StackOne's MongoDB Atlas MCP server and give it 60 MCP tools out of the box. Auth, tool execution, and security all managed.

MongoDB Atlas logo
MongoDB Atlas MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

Coverage

60 Agent Actions

Create, read, update, and delete across MongoDB Atlas — and extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your MongoDB Atlas MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every MongoDB Atlas tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every MongoDB Atlas call.

Tools Discovery →

What is the MongoDB Atlas MCP Server?

A MongoDB Atlas MCP server lets AI agents read and write MongoDB Atlas data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's MongoDB Atlas MCP server ships with 60 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All MongoDB Atlas MCP Tools

Every action from MongoDB Atlas's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.

Alert Configurations

  • Create Alert Configuration

    Creates a new alert configuration (rule) in an Atlas project, defining the event that triggers an alert and where notifications are sent.

  • List Alert Configurations

    Lists all alert configurations (the rules defining alert triggers and notification targets) for the given Atlas project.

  • Get Alert Configuration

    Retrieves a single alert configuration (rule) from an Atlas project by its alert configuration ID.

  • Update Alert Configuration

    Replaces an existing alert configuration (rule) in an Atlas project by its ID, overwriting the trigger event, thresholds, matchers, and notification targets.

  • Delete Alert Configuration

    Permanently deletes an alert configuration (rule) from an Atlas project by its alert configuration ID.

Alerts

  • List Alerts

    Lists all fired alerts in one Atlas project (GET /groups/{groupId}/alerts). An alert fires when a monitored component crosses a threshold; filter by status (OPEN, TRACKING, CLOSED) to narrow results.

  • Get Alert

    Retrieves one fired alert by its ID within an Atlas project (GET /groups/{groupId}/alerts/{alertId}), including its status, trigger metric, and acknowledgement state.

API Keys

  • Create API Key

    Creates a new programmatic organization API key in a MongoDB Atlas organization (orgId), requiring a description and at least one role; returns the private key only once.

  • List API Keys

    Lists all programmatic organization API keys in a MongoDB Atlas organization (orgId), returning each key's ID, description, and assigned roles.

  • Get API Key

    Retrieves a single organization API key by its apiUserId within a MongoDB Atlas organization (orgId), returning its description and assigned roles.

  • Delete API Key

    Permanently deletes an organization API key (apiUserId) from a MongoDB Atlas organization (orgId), immediately revoking its programmatic access everywhere it is used.

Backup Snapshots

  • Create Backup Snapshot

    Takes one on-demand cloud backup SNAPSHOT of a cluster immediately (outside the scheduled backup policy), returning the new snapshot's ID and initial status.

  • List Backup Snapshots

    Lists all cloud backup SNAPSHOTS (point-in-time copies of stored data) for one cluster in a project, returning each snapshot's ID, creation time, status, size, and retention.

  • Get Backup Snapshot

    Retrieves one cloud backup SNAPSHOT by its snapshotId, returning its full metadata (creation time, status, size, retention, and replica-set details).

Backup Restore Jobs

  • Create Backup Restore Job

    Creates a backup RESTORE JOB that recovers a cluster's data from a snapshot, either restoring into a target cluster (automated/pointInTime) or producing a downloadable archive (download).

  • List Backup Restore Jobs

    Lists all cloud backup RESTORE JOBS for one cluster in a project, showing each recovery operation's status, delivery type, target cluster, and the snapshot it restores.

Organization Users

  • Create Organization User

    Invites a human user (new or existing MongoDB Cloud account) to join an organization with the given roles, creating a PENDING membership until the invitee accepts.

  • List Organization Users

    Lists the human MongoDB Cloud USERS (both active and pending-invitation) that belong to an organization, returning each user's ID, username/email, roles, teams, and membership status.

  • Get Organization User

    Retrieves one human MongoDB Cloud USER by userId within an organization, returning their username/email, org roles, team memberships, and membership status.

  • Update Organization User

    Updates one human MongoDB Cloud USER in an organization (active or still pending), changing their org roles and/or team memberships.

Clusters

  • Create Cluster

    Provisions a new database cluster in a project (groupId), with its topology, region, instance size, MongoDB version, and backup options defined in replicationSpecs. The call returns quickly with the cluster in a CREATING state before provisioning finishes.

  • List Clusters

    Lists all dedicated and Flex database clusters within a single project (groupId), returning each cluster's name, instance size, MongoDB version, state, region config, and connection strings.

  • Get Cluster

    Retrieves the full details of a single cluster by project (groupId) and clusterName, including its current state, instance size, MongoDB version, region/shard configuration, and connection strings.

  • Update Cluster

    Modifies an existing cluster identified by groupId and clusterName — for example to scale the instance size, change the MongoDB version, toggle backups, pause/resume, or adjust termination protection. Only the fields you supply are changed, and the change applies asynchronously.

  • Delete Cluster

    Permanently deletes a single cluster (by groupId and clusterName) and its data, leaving the parent project intact. Runs asynchronously and requires termination protection to be disabled first.

Custom Database Roles

  • Create Custom Database Role

    Creates a new custom database role in an Atlas project, defining its privilege actions and/or the built-in roles it inherits.

  • List Custom Database Roles

    Lists all custom database roles defined in the given Atlas project (groupId), including their granted privilege actions and inherited roles.

  • Get Custom Database Role

    Retrieves a single custom database role from an Atlas project by its role name, including its privilege actions and inherited roles.

  • Update Custom Database Role

    Updates an existing custom database role in an Atlas project (by role name), replacing its privilege actions and inherited roles.

  • Delete Custom Database Role

    Permanently deletes a custom database role from an Atlas project by its role name.

Database Users

  • Create Database User

    Creates a new database user (a data-plane credential) in an Atlas project with the given username, authentication database, and role-to-database pairings.

  • List Database Users

    Lists every database user in the given Atlas project (groupId), returning their username, authentication database, roles, and scopes.

  • Get Database User

    Retrieves a single database user from an Atlas project, identified by its authentication database and username.

  • Update Database User

    Updates an existing database user in an Atlas project (identified by authentication database + username), fully replacing its roles and scopes with the values sent.

  • Delete Database User

    Permanently deletes a database user from an Atlas project, identified by its authentication database and username.

Flex Clusters

  • Create Flex Cluster

    Creates a new MongoDB Atlas flex cluster in a project (groupId), requiring a cluster name and providerSettings (cloud provider and region).

  • List Flex Clusters

    Lists all MongoDB Atlas flex clusters in a project (groupId), returning each cluster's name, state, and connection details.

  • Get Flex Cluster

    Retrieves a single MongoDB Atlas flex cluster by its name within a project (groupId), returning its state, provider settings, and connection strings.

  • Delete Flex Cluster

    Permanently deletes a MongoDB Atlas flex cluster by name from a project (groupId), destroying the instance and its data; termination protection must be disabled first.

Organizations

  • Create Organization

    Creates a new MongoDB Atlas organization and links it under the calling credential's existing (paying) organization, returning the new orgId. Requires a name; optionally provisions an owner and a fresh API key or service account for the new org.

  • List Organizations

    Lists every MongoDB Atlas organization the authenticated Service Account or API Key can access, returning each organization's id (orgId), name, and status. Optionally filter by a name prefix.

  • Get Organization

    Retrieves the details of a single MongoDB Atlas organization by its orgId, including name, status, and account-level settings.

  • Update Organization

    Updates a MongoDB Atlas organization identified by orgId — primarily its human-readable name and its default-alert-creation behavior — and returns the updated organization.

IP Access List Entries

  • Create IP Access List Entries

    Adds one or more IP access list entries to a project so clients from those sources can connect to its clusters, taking an `entries` ARRAY where each item specifies exactly one source.

  • List IP Access List Entries

    Lists all IP access list entries for a project — the IP addresses, CIDR blocks, and AWS security groups from which Atlas permits client connections to the project's clusters.

IP Access List Entrys

  • Get IP Access List Entry

    Retrieves one IP access list entry from a project by its entry value (an IP address, CIDR block, or AWS security group ID), returning its comment, timestamps, and any temporary-expiry date.

  • Delete IP Access List Entry

    Removes one IP access list entry from a project by its entry value, revoking cluster network access from that IP address, CIDR block, or AWS security group.

Projects

  • Create Project

    Creates a new MongoDB Atlas project (a.k.a. "group") inside an existing organization and returns it with its newly assigned groupId. Requires name and orgId; the project starts empty (no clusters).

  • List Projects

    Lists every MongoDB Atlas project (called a "group" in the API) that the authenticated Service Account or API Key can access, across all organizations, returning each project's id (groupId), name, orgId, cluster count, and creation date.

  • Get Project

    Retrieves the full details of a single MongoDB Atlas project (a.k.a. "group") by its groupId, including name, orgId, cluster count, creation date, tags, and alert settings.

  • Update Project

    Updates a project's mutable settings by groupId — its human-readable name, its tags, and whether default alerts are auto-created — and returns the updated project. Only the fields you supply are changed.

  • Delete Project

    Permanently deletes an entire MongoDB Atlas project (group) by groupId, along with everything it contains. Succeeds only if the project has no Online Archives on its clusters.

Teams

  • Create Team

    Creates a new team in a MongoDB Atlas organization (orgId), requiring a name and an initial list of member usernames.

  • List Teams

    Lists all teams in a MongoDB Atlas organization (identified by orgId), returning each team's ID, name, and member count.

  • Get Team

    Retrieves a single MongoDB Atlas team by its teamId within the given organization (orgId), returning the team's name and details.

  • Delete Team

    Permanently deletes a MongoDB Atlas team (teamId) from an organization (orgId), immediately revoking the project access it granted its members.

Other (4)

  • List Project Events

    Lists audit-log events scoped to one Atlas project (GET /groups/{groupId}/events) — database, billing, and security activities or status changes; filterable by eventType, cluster, and date range.

  • List Organization Events

    Lists audit-log events scoped to one Atlas organization (GET /orgs/{orgId}/events) — org-wide database, billing, and security activities or status changes; filterable by eventType and date range.

  • List Organization Projects

    Lists all projects (groups) that belong to one specific organization (orgId), returning each project's groupId, name, and cluster count. Optionally filter by a project name prefix.

  • Acknowledge Alert

    Acknowledges (silences) one open alert in an Atlas project (PATCH /groups/{groupId}/alerts/{alertId}), suppressing further notifications until the acknowledgedUntil timestamp, or un-acknowledges it.

Set Up Your MongoDB Atlas MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to MongoDB Atlas in under 10 lines of code.

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

Check More Data Infrastructure MCP Servers

Fivetran

156+ actions

Supabase

129+ actions

New Relic

126+ actions

Render

98+ actions

Grafana

89+ actions

Sentry

85+ actions

Snowflake

80+ actions

MongoDB Atlas MCP Server FAQ

Does StackOne have a MongoDB Atlas MCP server?
Yes. StackOne offers a hosted MongoDB Atlas MCP server with 60 pre-built actions, and every action is tested and QA'd by StackOne. Connect it to Claude, Cursor, and any other MCP client, or to any agent framework through the AI Action SDK. It ships with managed agent authentication, prompt injection defense, and tool discovery with server-side execution that preserve your agent's context window and keep reasoning performance.
MongoDB Atlas MCP server vs direct API integration — what's the difference?
A MongoDB Atlas MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software — backend code calling MongoDB Atlas. A MongoDB Atlas MCP server is for AI agents — MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI — discovering and calling MongoDB Atlas at runtime. StackOne provides both.
How does MongoDB Atlas authentication work for AI agents?
MongoDB Atlas authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK — you get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own MongoDB Atlas account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are MongoDB Atlas MCP tools vulnerable to prompt injection?
Yes — MongoDB Atlas MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content — documents, messages, tickets, records, or free-text fields — is a potential vector. StackOne Defender scans every tool response before it enters the agent's context — regex patterns in ~1ms, then a MiniLM classifier in ~4ms. 88.7% accuracy, CPU-only.
What is the context bloat of a MongoDB Atlas agent and how do I avoid it?
Context bloat happens when MongoDB Atlas tool schemas and API responses eat your MongoDB Atlas agent's memory, preventing it from reasoning effectively. A single MongoDB Atlas query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery and Code Mode reduce context bloat — loading only relevant tools per query and keeping raw responses out of the agent's context.
Can I limit which actions my MongoDB Atlas agent can access?
Yes — you can limit which actions your MongoDB Atlas agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my MongoDB Atlas MCP server?
Yes — you can create custom agent actions for your MongoDB Atlas MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research MongoDB Atlas's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a MongoDB Atlas MCP server?
Skip a MongoDB Atlas MCP server if your integration is purely software-to-software — direct MongoDB Atlas API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call MongoDB Atlas actions at runtime.
What AI frameworks and AI clients does the StackOne MongoDB Atlas MCP server support?
The StackOne MongoDB Atlas MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.