MongoDB MCP Tools for AI Agents
Let an agent discover databases and collections, inspect schemas, find and count documents, and run aggregation pipelines.
Available Tools
10 tools available in this integration
Mongodb.AggregateDocuments Execute a MongoDB aggregation pipeline on a collection.
Mongodb.CountDocuments Count documents in a MongoDB collection matching the given filter.
Mongodb.DiscoverCollections Discover all the collections in the MongoDB database.
Mongodb.DiscoverDatabases Discover all the databases in the MongoDB instance.
Mongodb.FindDocuments Find documents in a MongoDB collection.
Mongodb.GetCollectionSchema Get the schema/structure of a MongoDB collection by sampling documents.
Mongodb.ListCollections Discover all the collections in the MongoDB database.
Mongodb.ListDatabases Discover all the databases in the MongoDB instance.
Mongodb.ListFields Get the schema/structure of a MongoDB collection by sampling documents.
Mongodb.QueryDocuments Find documents in a MongoDB collection.
Why agent-optimized tools matter
Built for intent, not API schemas
Ask the agent to "inspect the orders collection and summarize failed payments." Arcade picks the right MongoDB tools without guessing collection names or building aggregation syntax.
Up to 100x fewer tokens
MongoDB discovery and query results give the agent targeted database, collection, schema, and document data, so it can narrow the search before loading records or aggregation results into the model.
Complete the workflow end to end
Discover databases, inspect collections, sample schemas, query documents, and aggregate results through one toolkit designed around the complete database exploration task.
Make actions predictable and controlled
Arcade tools return structured results and useful errors across users and runs. Teams can apply scope restrictions, redaction, and approval policies so agents follow the same controls every time.
Securing MongoDB
The more capabilities agents get, the more useful they are. However, more capabilities bring more risks of undesired effects such as data loss and exfiltration.
This is why Arcade provides you with contextual rules that dictate how and when a tool is allowed to run. Arcade’s contextual access lets you govern tool visibility and behavior at every stage of execution and control who can see a tool, what inputs are allowed, and what comes back.
Learn about Contextual Access PoliciesFor MongoDB, you can implement some of these policies:
- Decide which tools an agent is allowed to see at all. A tool that is never listed cannot be called, whoever is asking.
- Inspect the inputs a call is about to run with, and block it or send it for human approval when they fall outside what the agent should do unsupervised.
- Redact password, token, API key, payment-card, and Social Security number fields from Mongodb.FindDocuments results before they reach the model.
- Strip customer email addresses, phone numbers, and access credentials from Mongodb.AggregateDocuments results so aggregation output cannot expose personal or secret data.
- Redact sampled values and field descriptions containing passwords, tokens, API keys, or other credentials from Mongodb.GetCollectionSchema results before the model sees the collection structure.
How to use MongoDB with your agent
Choose your MCP client and follow the setup to connect an agent to MongoDB through Arcade.
Your questions, answered
A MongoDB MCP server exposes database operations as structured tools that an AI agent can call through the Model Context Protocol. With the appropriate database credential, the agent can discover databases and collections, inspect sampled schemas, find documents, count matches, and run aggregation pipelines.
Arcade exposes MongoDB operations through its MCP gateway and adds credential brokering, encrypted credential storage, approval and redaction policies, and access from supported agent clients. The integration uses a shared API key or secret configured once rather than asking each agent to manage a MongoDB connection.
Arcade agents can discover databases and collections, inspect collection structure by sampling documents, find or count documents matching a filter, and run aggregation pipelines. All ten available actions are read-only; agents cannot insert, update, delete, or otherwise change MongoDB data.
Arcade uses the shared MongoDB API key or secret configured for the integration. That credential must have read access to the databases and collections the agent needs; because every available action is read-only, write permissions are not required.
No. MongoDB access uses one shared API key or secret configured once for the integration, not a separate account connection for each user. Arcade brokers the credential to make calls, and the model never receives it.
There are no consequential write actions in this MongoDB integration because every available action only reads or analyzes data. You can still apply a Contextual Access policy to require approval before a query or aggregation runs, redact fields from responses, or hide access from an agent entirely; the call proceeds only after the policy is satisfied.
Arcade proxies MongoDB API calls and does not persist your database content as part of normal tool execution. The shared credential is brokered and stored encrypted at rest, and the model never receives it.
Any framework or client that can connect to Arcade's MCP gateway or tool APIs works, including LangChain, OpenAI Agents, CrewAI, Claude Desktop, Claude Code, Cursor, Visual Studio Code, Microsoft Copilot Studio, and GitHub Copilot.
Arcade can continue using the shared credential while it remains valid. If the key or secret is revoked, rotated, expires, or can no longer be used, MongoDB calls stop until the integration credential is updated.
MongoDB's deployment, connection, query, aggregation, and account limits still apply to calls made through Arcade. Arcade does not change those database-side quotas; configure the shared credential and deployment to support the query volume and result sizes your agent needs.