database
MongoDB Atlas MCP, CLI, and Lua Integration for AI Agents
MongoDB Atlas integration docs for AI agents: MCP gateway setup, MongoDB Atlas CLI commands, Lua API reference, credentials, and function schemas.
9 functions 5 read 4 write API key auth
MongoDB Atlas for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
mongodb- route_slug
mongodb- package
mongodb- auth_strategy
api_keyAPI key- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. MongoDB Atlas CLIHeadless setup and direct function calls. MongoDB Atlas MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
MongoDB Atlas MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for MongoDB Atlas.
Claude Code MongoDB Atlas MCP setup for Claude Code. Cursor MongoDB Atlas MCP setup for Cursor. Codex MongoDB Atlas MCP setup for Codex. OpenAI Agents MongoDB Atlas MCP setup for OpenAI Agents SDK. Claude Agent SDK MongoDB Atlas MCP setup for Claude Agent SDK. Vercel AI SDK MongoDB Atlas MCP setup for Vercel AI SDK. LangChain MongoDB Atlas MCP setup for LangChain. LangGraph MongoDB Atlas MCP setup for LangGraph. CrewAI MongoDB Atlas MCP setup for CrewAI. MCP clients MongoDB Atlas MCP setup for Generic MCP Clients.
MongoDB Atlas CLI Matrix
Use these pages for direct MongoDB Atlas CLI workflows in scripts, CI, cron, and agent wrappers.
CI MongoDB Atlas CLI for CI. Cron Jobs MongoDB Atlas CLI for cron jobs. Shell Scripts MongoDB Atlas CLI for shell scripts. Headless Automation MongoDB Atlas CLI for headless automation. Coding Agents MongoDB Atlas CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
mongodb.mongodb_find | Read read | 7 | Query documents from a MongoDB Atlas collection. Supports filtering, projection, sorting, pagination (limit/skip). Returns an array of matching documents. |
mongodb.mongodb_find_one | Read read | 4 | Find a single document in a MongoDB Atlas collection. Returns the first matching document or null if no match is found. |
mongodb.mongodb_insert_one | Write write | 3 | Insert a single document into a MongoDB Atlas collection. Returns the inserted document ID. |
mongodb.mongodb_insert_many | Write write | 3 | Insert multiple documents into a MongoDB Atlas collection in a single operation. Returns the inserted document IDs. |
mongodb.mongodb_update_one | Write write | 4 | Update a single document in a MongoDB Atlas collection. Uses a filter to match the document and an update operations object (e.g., {"$set": {"field": "value"}}). |
mongodb.mongodb_delete_one | Write write | 3 | Delete a single document from a MongoDB Atlas collection. Uses a filter to match the document to delete. |
mongodb.mongodb_aggregate | Read read | 3 | Run an aggregation pipeline on a MongoDB Atlas collection. Supports all pipeline stages ($match, $group, $sort, $project, $limit, $lookup, etc.). |
mongodb.mongodb_list_collections | Read read | 1 | List all collections in a MongoDB Atlas database. Useful for discovering what data is available before running queries. |
mongodb.mongodb_get_current_user | Read read | 0 | Verify connectivity to MongoDB Atlas and get current user/session information. Useful for testing that credentials are working. |