Query collections, insert documents, and run aggregation pipelines on your MongoDB Atlas database — AI-native document database access.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"mongodb": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-mongodb",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the list_collections tool to list all collections in a mongodb database using $listcatalog (requires mongodb 6.0+)”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
Query collections, insert documents, and run aggregation pipelines on your MongoDB Atlas database from your AI agents.
MongoDB Atlas is the cloud-hosted version of MongoDB — the most popular document database, used by millions of developers to store flexible JSON-like documents at scale. This MCP server gives your AI agents full CRUD access plus aggregation pipeline support through the Atlas Data API: finding, inserting, updating, and deleting documents across any database and collection in your cluster — all through natural language.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-mongodb
| Tool | Description |
|---|---|
list_databases | List all databases in the Atlas cluster |
list_collections | List all collections in a database |
find_one | Find a single document matching a filter |
find | Find multiple documents with filter, sort, limit, skip, projection |
insert_one | Insert a single document into a collection |
insert_many | Insert multiple documents into a collection |
update_one | Update a single document matching a filter |
update_many | Update multiple documents matching a filter |
delete_one | Delete a single document matching a filter |
delete_many | Delete multiple documents matching a filter |
aggregate | Run an aggregation pipeline on a collection |
| Variable | Required | Description | How to Get |
|---|---|---|---|
MONGODB_APP_ID | Yes | Atlas Data API Application ID | cloud.mongodb.com → Your Project → App Services → select your app → copy the App ID from the top of the page |
MONGODB_API_KEY | Yes | Atlas Data API Key | Same project → App Services → Authentication → API Keys → create or copy an API key |
MONGODB_CLUSTER | Yes | Cluster name (e.g. "Cluster0") | Database tab → your cluster name is shown at the top of the cluster card |
MONGODB_APP_ID, MONGODB_API_KEY, and MONGODB_CLUSTER under Project → SecretsOnce added, every AI agent in your workspace can call MongoDB tools automatically — no per-user setup needed.
"List all collections in my 'myapp' database"
"Find all orders in the orders collection where status is 'pending', sorted by createdAt descending"
"Insert a new user document with name 'Alice' and email 'alice@example.com' into the users collection"
"Run an aggregation pipeline on the events collection to group by event type and count occurrences"
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-mongodb \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-MONGODB-APP-ID: your-app-id' \
-H 'X-Mcp-Secret-MONGODB-API-KEY: your-api-key' \
-H 'X-Mcp-Secret-MONGODB-CLUSTER: Cluster0' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"find","arguments":{"database":"myapp","collection":"users","filter":{},"limit":10}}}'
MIT
Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-mongodb
Sub-50ms globally · Zero cold start
@aerostack
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
by @aerostack
Turn your Airtable bases into an AI-queryable database — create, update, search, and analyze records with natural language.
by @aerostack
Pages, databases, blocks, search via Notion's official MCP
by @aerostack
Get, set, and manage keys, hashes, and lists in your Upstash Redis database — AI-native key-value store access.
by @aerostack
Query Postgres tables, manage storage buckets, and interact with your Supabase backend — AI-native database access.
by @aerostack
Execute SQL queries, manage tables, and interact with your Turso (LibSQL) edge database — AI-native SQLite at the edge.
by @aerostack
Query, put, update, delete, and scan items in Amazon DynamoDB tables — AI-native NoSQL database access for any agent.
Yes. The aggregate tool accepts a pipeline array with any valid MongoDB aggregation stages. Claude constructs the pipeline from natural-language instructions and returns the result set as JSON documents.
list_collections returns all collection names in the connected database. Claude can present options or match by name before running find, insert, or aggregate — preventing writes to the wrong collection.
Both. insert_one handles single documents; insert_many accepts an array and inserts them in a single network round-trip, which is significantly faster for batch ingestion of hundreds of records.
It uses a standard MongoDB connection string, so it works with Atlas clusters and self-hosted replica sets. Set the MONGODB_URI environment variable to your connection string before adding the MCP to your workflow.