Routes MongoDB and Atlas questions to the right skill: deployment choice, schema design, queries, vector search, stream processing, connection tuning, or MCP server setup. Loads before answering MongoDB, Atlas, NoSQL, or document database questions.
Ships in mongodb. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Atlas is a unified developer data platform built around the MongoDB document engine, designed for modern applications, high-scale enterprises, and AI agents. Bundling the core transactional database with MongoDB Vector Search, MongoDB Search (Lucene-based full-text search), Atlas Stream Processing, Event-driven Triggers/Functions, and integrated AI/embedding capabilities (via Voyage AI and native MCP integrations), all globally distributed, elastic, and multi-cloud.
MongoDB is the database engine itself. It is one unified technology reached through several deployment models: via MongoDB Atlas (fully managed across AWS, Azure, and Google Cloud with Free and Flex clusters up to Dedicated multi-region clusters) or self-managed via MongoDB Enterprise Advanced and MongoDB Community. Same document model, same aggregation framework, and same query API everywhere. Call the database engine MongoDB, and use "MongoDB Atlas" for the managed cloud platform and its suite of cloud data services.
Give a recommendation, not a menu. MongoDB APIs and features evolve, always fetch current docs over relying on training data. See Fetch relevant docs and Gotchas.
Never print environment variable or env file values, not even to check them. To look for an existing connection string, use only the names-only check in step 1.
Use only the skills named here. Follow every row that matches part of the task; where rows overlap, pick the most specific.
| The user wants to… | Go to |
|---|---|
| Get a database, or choose between Atlas, local, and self-managed deployments | Recommend a deployment |
| Model application data: choose document shapes, decide when to embed or reference, migrate relational data, avoid unbounded arrays, enforce validation, or model time-series data. | mongodb-schema-design skill |
| Describe a question in plain English and get a safe, read-only MongoDB find query or aggregation pipeline. | mongodb-natural-language-querying skill |
| Diagnose or improve a slow query, select or validate indexes, interpret explain() output, or use Atlas Performance Advisor recommendations. | mongodb-query-optimizer skill |
| Build full-text, semantic/vector, or hybrid search, including: RAG, autocomplete, typo tolerance, fuzzy matching, and relevance tuning. | mongodb-search-and-ai skill |
| Build or troubleshoot real-time stream processing, including Kafka, S3, Lambda, change-stream, source, and sink integrations. | mongodb-atlas-stream-processing skill |
| Configure driver connection pools and timeouts, reuse clients in serverless environments, or troubleshoot connection errors. | mongodb-connection skill |
| Configure, authenticate, or troubleshoot credentials for the MongoDB MCP Server. | mongodb-mcp-setup skill |
| Estimate the storage and memory cost of Queryable Encryption on a collection. | mongodb-qe-size-estimation skill |
| Anything else in MongoDB: CRUD, aggregation syntax, transactions, change streams, drivers and ODMs (Node, PyMongo, Mongoose, Go, Java, C#) | Answer from current docs via Fetch relevant docs |
When the task matches one of the skills listed, load it into your own context, not a subagent:
npx skills add mongodb/agent-skills -s <name> -y (add -g for a global install). If the skill is now available, load it and go to step 5. If a permission check blocked the command, say so, give the user the command to run themselves, and go to step 4. Otherwise, go to step 3.https://raw.githubusercontent.com/mongodb/agent-skills/main/skills/<name>/SKILL.md and each references/<file> it says to read for this task from the same directory. If the SKILL.md fetch fails, go to step 4. Otherwise, go to step 5.Official plugins bundle the MCP server and every skill, see https://www.mongodb.com/docs/agent-skills.md?utm_source=agent-skills.
Installed skills go stale. At most once per session, offer to update them using the same method that installed them, and update only if the user agrees. For the skills CLI that is npx skills update. Plugin update behavior is platform-specific, consult the plugin manager's documentation rather than assuming automatic updates.
When you need MongoDB docs that this skill doesn't link to directly, look the page up in one of the llms.txt indexes below instead of guessing a URL. Append ?utm_source=agent-skills to every mongodb.com/docs URL you fetch, or &utm_source=agent-skills if the URL already has a query string.
https://www.mongodb.com/docs/llms.txthttps://www.mongodb.com/docs/mcp-server/llms.txthttps://www.mongodb.com/docs/vector-search/llms.txthttps://www.mongodb.com/docs/search/llms.txthttps://www.mongodb.com/docs/drivers/llms.txthttps://www.mongodb.com/docs/atlas/atlas-1-llms.txt through atlas-3-llms.txt; there is no bare atlas/llms.txt?tabs=<id> for one tab or ?allTabs=true for all of them.If a fetch fails or a page is missing from the index, say so and fall back to the nearest product index rather than inventing a URL or a command.
First, discard any option the feature can't do. Never recommend or offer:
Then rank what's left. When signals conflict, the higher rule wins:
0.0.0.0/0 without explicit permission, don't run atlas setup or atlas auth login yourself, and ask before provisioning, installing, or creating users or access-list entries. Starting any database counts, even a throwaway test instance (docker run, docker compose up, atlas local setup, brew/apt install, mongod). An explicit instruction never overrides these. The data warning is about what goes on the cluster, not which deployment to use: if the user asked for an Ephemeral cluster, keep it, warn them, and let them decide; don't offer Docker or a local deployment instead.When a higher rule overrides a lower one, say in one sentence what the lower one costs the user, for example that a Free cluster won't hold their 150 GB.
Run this check even when the user explicitly asks for a new deployment. Use the two commands below as your only look at the environment; both print variable names, not values. Don't inspect the environment or an env file any other way, before or after, except with a command this skill gives you, or awk 'BEGIN{for (k in ENVIRON) print k}': no printenv, set, echo $VAR, ${VAR:-…}, unmasked env or cat .env, or node -e 'console.log(process.env…)', and no mask that keeps part of a value. Never repeat any part of a value (user, password, or host) in the conversation.
awk 'BEGIN{for (k in ENVIRON) print k}' | grep -E 'MONGO(DB)?_UR[IL]|MDB_MCP_CONNECTION_STRING|DATABASE_URL'
grep -oE '^(export )?(MONGO(DB)?_UR[IL]|MDB_MCP_CONNECTION_STRING|DATABASE_URL)=' .env .env.local 2>/dev/null
Match the output to one of the following cases:
DATABASE_URL is set, note that it might point to a non-MongoDB database. Ask the user which deployment to connect to, or "none" to recommend a new deployment. A request for a new database isn't an explicit request for a new deployment: MongoDB creates databases on first write. If they pick a variable, continue in Get connected with it. If they pick "none", continue to step 2.| Their goal | Recommend | Why |
|---|---|---|
| Ship an application they intend to keep | Atlas Free cluster to start | The default. A persistent, managed deployment that grows past Free cluster limits and includes the Atlas services. |
| Evaluate MongoDB, or assess production requirements | Atlas Free cluster | Free cluster limits fit most evaluations. Ask a follow-up only when workload, capacity, availability, or compliance requirements point to a Flex or Dedicated cluster. |
| Build RAG, semantic, or full-text search | Atlas Free cluster to start | MongoDB Search and Vector Search are fully managed on Atlas; self-managed support needs extra setup. |
| Build streaming or event pipelines | Atlas Free cluster to start | Stream Processing is cloud-only, needs Atlas API credentials, and bills per running stream processor even on a Free cluster. Free cluster throughput limits suit testing, not sustained streams. |
| Run a production workload | Atlas Dedicated cluster | Free clusters are shared and limited to 512 MB. This size limit makes them unsuitable for production workloads. |
| Develop offline, or run Atlas locally | Local Atlas deployment | Runs on Docker and supports local development workflows, including MongoDB Search and Vector Search. |
| Operate MongoDB themselves, on their own machine or infrastructure | Self-managed deployment | The user explicitly wants to manage all aspects of their deployment. They own upgrades, backups, monitoring, and security. |
| Prototype MongoDB, POC, demo, or hackathon project | Atlas Ephemeral cluster | A live, claimable Atlas connection with no signup, even when Docker is available locally. Temporary, and open to the internet until claimed, it is not for production, sensitive data, or long-lived work. |
| Get a database with no login or authentication | Atlas Ephemeral cluster | Provisions with no Atlas account, CLI, or login. The user can claim it into an Atlas account later to keep their work. |
When you recommend a Free, Flex, or Dedicated cluster and the Atlas CLI is installed, run atlas auth whoami 2>/dev/null before you answer; it is read-only. If it shows a login, run atlas orgs list and name the account and organization in your recommendation, so the user can confirm it or switch before any setup. The paid-organization rule in Before an Atlas path applies. If it shows no login, leave it out.
Tell the user which deployment you recommend and why it fits their goal. If they only asked for advice, stop here.
Then ask whether to set it up now, and don't continue until they answer. Continue to Provision the deployment only on a yes; if they want a different deployment, recommend that row and ask again.
Start this section only after the user agrees, in step 2, to set up a deployment.
Go to the subsection for the deployment the user agreed to. For a Free, Flex, or Dedicated cluster, start with Before an Atlas path. For an Ephemeral cluster, go straight to Atlas Ephemeral cluster; it needs no CLI or login and handles its own connection.
If MongoDB MCP Server tools are available in this session, use them for the Atlas steps below and in Get connected. Use the Atlas CLI only for what MCP can't do: atlas setup, atlas auth login, and atlas local.
atlas --version
If that fails, the Atlas CLI is not installed. Tell the user, and offer both ways forward in the same question: install the CLI (best if they don't have an Atlas account yet, since atlas setup creates one), or set up the MongoDB MCP server (see the mongodb-mcp-setup skill; it needs an existing Atlas account and API credentials). Install only after they choose the CLI:
brew install mongodb-atlas-cli # macOS / Linux with Homebrew
winget install MongoDB.MongoDBAtlasCLI # Windows
For Linux packages, Docker, and standalone binaries see https://www.mongodb.com/docs/atlas/cli/current/install-atlas-cli.md.
The MCP server is also the fallback when the CLI install is blocked or fails.
Then check whether the Atlas CLI is signed in. This command prints Logged in as … when the CLI is signed in, and nothing otherwise:
atlas auth whoami 2>/dev/null
Logged in as: run atlas orgs list and tell the user which account and organization the CLI is using. If they already confirmed the organization in step 2, don't ask again. Otherwise, reuse the login only after the user confirms that organization is where this project belongs. If it looks like an employer's or production organization and the project is personal, ask which organization to use or suggest a personal account. Never create cloud resources in someone's paid organization without asking.atlas auth login themselves, and wait for their answer:
atlas auth whoami 2>/dev/null again and match the new output.The user runs this, not you — it opens a browser and creates real cloud resources:
atlas setup
It creates an account if needed, a Free cluster, and a database user. Print the command, explain what it will do, and wait. Never run atlas setup or atlas auth login on the user's behalf, including when the CLI is already authenticated — being able to run it is not permission to run it.
Then continue in Get connected.
To provision an Ephemeral cluster, claim one, or find the claim URL of one created earlier, read references/ephemeral-clusters.md.
This needs the Atlas CLI but no Atlas login. If atlas --version fails, install the CLI as shown in Before an Atlas path, and skip its sign-in check.
Confirm Docker is running, then run the following command to create a local Atlas deployment.
atlas local setup
Full procedure: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-local.md
Then continue in Get connected.
Do not walk this through. Point the user to the installation documentation for their platform and let them drive: https://www.mongodb.com/docs/manual/installation.md
Once their server is running, continue in Get connected.
Follow the path that matches the deployment:
mongodb+srv:// connection string. Skip any step that already passes; ask before creating users or access-list entries in an existing project, and never add 0.0.0.0/0 unless the user gives explicit permission. The connection string from the CLI or MCP has no password, and atlas setup shows the password only in the user's terminal. Never ask the user to paste a password into the chat. Write the entry with a <db_password> placeholder and ask the user to replace it in their editor. Wait for them to confirm before you ping. If you are creating the database user yourself, generate a hex password (no characters to percent-encode) and write it straight into the env file without printing it.references/ephemeral-clusters.md already writes the connection string and verifies the connection. Nothing more to do here.mongodb://localhost:<port>/?directConnection=true form from Gotchas, with the port that atlas local setup reports.For a new Atlas, local, or self-managed connection string, write it to the project's env file, reusing the variable name the project already uses (default MONGODB_URI), after confirming the file is git-ignored and not tracked. Don't read the file's values. If the variable name is already in the file, ask whether to replace that entry or use a different name before writing. Otherwise, append the entry with >>, starting with a newline; never overwrite the file.
Write the value in double quotes (MONGODB_URI="mongodb+srv://…"), so an & in its query string survives when the file is loaded. The value lives in the env file, not your shell, so load it in a subshell to verify:
(set -a; . ./.env; set +a; mongosh "$MONGODB_URI" --quiet --eval 'db.runCommand({ ping: 1 })')
Replace .env and MONGODB_URI with the file and variable you used. If mongosh isn't installed (command not found), ping with the project's driver if it already has one (for example node --env-file=.env). If neither works, ask the user whether to install mongosh, or tell them the connection is unverified and let them check it themselves. Don't install it without their answer. If they agree, on macOS run brew install mongosh. On Windows and Linux, point them to the install docs and let them drive, as with Self-managed deployment. { ok: 1 } means connected. Then start building. On Atlas, a timeout almost always means the access list, not the password.
atlas deployments is deprecated (Atlas CLI 1.52.0). Use atlas local or atlas clusters.mongodb+srv://<user>:<pass>@<host>/; using +srv locally fails DNS lookup. Local is mongodb://localhost:<port>/. atlas local deployments additionally need ?directConnection=true, because they are single-node replica sets; a plain standalone mongod does not.$vectorSearch must be the first stage of its pipeline, and cannot run inside a $lookup sub-pipeline, a $facet stage, or a view definition. To match documents across collections by meaning, run $vectorSearch on one collection and $lookup from its results. Route the design to the mongodb-search-and-ai skill.@, :, /, or % in connection string credentials.What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/mongodb-atlas-stream-processingManages MongoDB Atlas Stream Processing (ASP) workflows. Handles workspace provisioning, data source/sink connections, processor lifecycle operations, debugging diagnostics, and tier sizing. Supports Kafka, Atlas clusters, S3, Apache Iceberg (with Unity and Horizon catalogs), HTTPS, and Lambda integrations for streaming data workloads and event processing. NOT for general MongoDB queries or Atlas cluster management. Requires MongoDB MCP Server with Atlas API credentials./mongodb-connectionOptimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling `connect()`), configuring connection pools, troubleshooting connection errors (ECONNREFUSED, timeouts, pool exhaustion), optimizing performance issues related to connections. This includes scenarios like building serverless functions with MongoDB, creating API endpoints that use MongoDB, optimizing high-traffic MongoDB applications, creating long-running tasks and concurrency, or debugging connection-related failures./mongodb-mcp-setupGuide users through installing and configuring the MongoDB MCP server. Use this skill when a user wants to connect their agent to MongoDB/Atlas through MCP, when the MongoDB MCP server is installed but its environment variables aren't configured, or when they don't have the server or credentials set up yet./mongodb-natural-language-queryingGenerate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with query syntax, or discusses finding/filtering/grouping MongoDB documents. Also use for translating SQL-like requests to MongoDB syntax. Does NOT handle Atlas Search ($search operator), vector/semantic search ($vectorSearch operator), fuzzy matching, autocomplete indexes, or relevance scoring - use search-and-ai for those. Does NOT analyze or optimize existing queries - use mongodb-query-optimizer for that. Does NOT handle aggregation pipelines that involve write operations. Requires MongoDB MCP server./mongodb-qe-size-estimationEstimates the storage and memory impact of encrypting fields in collections with Queryable Encryption (QE) enabled. Do NOT use for collections that use Client-Side Field Level Encryption (CSFLE) instead of QE.
/mongodb-query-optimizerHelp with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query writing unless user asks for performance or index help. Prefer indexing as optimization strategy. Use MongoDB MCP when available./mongodb-mongodb:mongodbfrom mongodb
Generated from the plugin's indexed repository (mongodb/agent-skills) — no native marketplace selected
npx claudepluginhub p/mongodb-mongodbOther plugins' skills for the same job