MongoDB Atlas MCP server for AI agents

Live

SERVICE ACCOUNT

DATABASE OPERATIONS

Developer Tools

MongoDB Atlas gives your agent database operations across your Atlas organizations: check clusters, alerts, and slow queries, read Performance Advisor index suggestions, take backup snapshots, manage database users and IP access lists, and create search indexes.

  • One service account: you connect MongoDB Atlas once, and Scalekit authenticates every call.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
MongoDB Atlas
agent · Acme Q3
Run
Are any Atlas alerts open on the production project?
S
mongodb_alerts_list
139ms
Database agent
2 alerts are open on Production. Disk usage on prod-cluster-0 is at 86%, and replication lag on one secondary passed 30 seconds.
Sources: Atlas project, 2 open alerts
mongodb
2 alerts
18:29
Message Claude...

Tools your database agent reaches for on MongoDB Atlas, scoped before every call.

CALL ANY TOOL
82 tools for database operations in MongoDB Atlas: list and update clusters, read alerts, metrics, and slow queries, get Performance Advisor index suggestions, take snapshots and restore backups, manage database users, roles, and IP access lists, and build search indexes.
mongodb_access_list_entries_list
List access list entries
List the entries in an Atlas project's IP access list, which controls which clients may connect to its clusters. Returns each entry's ipAddress or cidrBlock or awsSecurityGroup, comment, and deleteAfterDate. Use this to see which addresses can connect. Use mongodb_access_list_entry_get for one entry. Requires a project id from mongodb_projects_list.
Parameters
Name
Type
Required
Description
group_id
string
Required
Unique 24-hexadecimal id of the Atlas project (Atlas calls it groupId). Get it from mongodb_projects_list. Example: 32b6e34b3d91647abb20e7b8
items_per_page
integer
Optional
Number of items per page, from 1 to 500. Atlas defaults to 100. Example: 100
page_num
integer
Optional
Page number to return, starting at 1. Atlas defaults to 1. Example: 1
mongodb_access_list_entry_delete
Delete access list entry
mongodb_alert_acknowledge
Alert acknowledge
mongodb_alert_config_get
Get alert config
mongodb_alert_configs_list
List alert configs
mongodb_backup_restore_job_create
Create backup restore job
mongodb_backup_restore_job_get
Get backup restore job
mongodb_backup_snapshots_list
List backup snapshots
mongodb_cluster_advanced_config_get
Get cluster advanced config
mongodb_cluster_delete
Delete cluster
mongodb_cluster_update
Update cluster
mongodb_clusters_list
List clusters
mongodb_custom_role_create
Create custom role
mongodb_custom_role_get
Get custom role
mongodb_custom_roles_list
List custom roles
mongodb_database_user_delete
Delete database user
mongodb_flex_cluster_create
Create flex cluster
mongodb_flex_cluster_get
Get flex cluster
mongodb_flex_cluster_update
Update flex cluster
mongodb_flex_clusters_list
List flex clusters
mongodb_online_archive_get
Get online archive
mongodb_organization_events_list
List organization events
mongodb_organizations_list
List organizations
mongodb_process_measurements_get
Get process measurements
mongodb_processes_list
List processes
mongodb_project_get
Get project
mongodb_projects_list
List projects
mongodb_schema_advice_get
Get schema advice
mongodb_search_index_create
Create search index
mongodb_slow_queries_list
List slow queries

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// MongoDB Atlas tools available to this agent
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mongodb"], toolNames: [
    "mongodb_clusters_list",
    "mongodb_alerts_list",
    "mongodb_suggested_indexes_list"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Check open alerts on the Production project and suggest index fixes" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mongodb"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Check open alerts on the Production project and suggest index fixes" }],
  tools,
});

// Execute the tool call with the vaulted MongoDB Atlas service account credentials
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mongodb"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Check open alerts on the Production project and suggest index fixes" }],
  tools,
});

// Tool call runs with the vaulted MongoDB Atlas service account credentials
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mongodb"] }, pageSize: 100,
});

const agent = new Agent({
  name: "database_agent",
  model: "gemini-2.5-pro",
  instruction: "MongoDB Atlas tools available to this agent",
  tools,
});

await agent.run("Check open alerts on the Production project and suggest index fixes");
Try these prompts
Copy any prompt into your agent. Each maps directly to a MongoDB Atlas tool. Click to copy, paste into your agent, done.
Clusters and alerts
Copy the prompt
Copied
List the clusters in every Atlas project we can access.
Copy the prompt
Copied
Show open alerts on the Production project.
Copy the prompt
Copied
Acknowledge the disk usage alert until tomorrow at 9am.
Performance
Copy the prompt
Copied
Which indexes does Performance Advisor suggest for prod-cluster-0?
Copy the prompt
Copied
Show slow queries on the primary from the last hour.
Copy the prompt
Copied
Get CPU and connection metrics for the primary over the last 24 hours.
Backups and access
Copy the prompt
Copied
Take an on-demand backup snapshot of prod-cluster-0.
Copy the prompt
Copied
Add 203.0.113.10 to the Production project's IP access list.
Copy the prompt
Copied
Create a read-only database user for the analytics service.
SEE HOW AUTH WORKS
You connect MongoDB Atlas once with a service account, and Scalekit authenticates every call. Service account credentials stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
MongoDB Atlas
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
MongoDB Atlas
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
MongoDB Atlas
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
MongoDB Atlas
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same auth pattern across other database and developer connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Engineering Teams
Engineering standup agent
Pulls commits from GitHub and GitLab, tracks issue movement in Jira, and posts a per-engineer standup brief to Slack. Each engineer's activity is read on their own delegated OAuth.
Test other agents
See the same auth pattern across other database and developer connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
ENGINEERING
Engineering standup agent
Pull commits from GitHub and GitLab, track Jira issue movement, and post a per-engineer standup brief to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Service account secrets stay out of agent code
Pasting a MongoDB Atlas service account secret into agent code puts it one log line away from a leak. Scalekit keeps the service account credentials in its vault, authenticates each call at request time, and records which agent run made it.
// secret in code
env → prompt, logs

// scalekit
vault → call ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
MongoDB Atlas today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent use a shared service account for MongoDB Atlas?
Yes. You connect MongoDB Atlas once with a service account, and Scalekit authenticates every call. The agent reaches the Atlas organizations and projects that service account can access, and audit logs record every action the agent takes.
Where are the MongoDB Atlas service account credentials stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in MongoDB Atlas?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the cluster, alert, and Performance Advisor read tools without mongodb_cluster_delete or mongodb_project_delete, which permanently remove clusters and projects. Scalekit also enforces scope checks before every API call.
What happens when MongoDB Atlas access is turned off?
Disable the connection in the Scalekit dashboard and the next tool call fails closed with a clear error. Other tenants are unaffected, and the change is logged.
Does the agent query the documents in my collections?
No. The tools manage Atlas itself: clusters, backups, alerts, metrics, database users, IP access lists, and search and regular indexes. mongodb_process_databases_list and mongodb_process_database_measurements_get return database names and storage metrics, not documents.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""mongodb"": {
""url"": ""https://mcp.scalekit.com/mongodb"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.mongodb]
url = ""https://mcp.scalekit.com/mongodb""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""mongodb"": {
""url"": ""https://mcp.scalekit.com/mongodb"",
""type"": ""http""
}
}
}