Back to Tools
Databases API Key
mongodb logo

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

6 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.

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 Policies

For MongoDB, you can implement some of these policies:

Access when tools are listed for a user
  • Decide which tools an agent is allowed to see at all. A tool that is never listed cannot be called, whoever is asking.
Pre-execution before each tool call
  • 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.
Post-execution after the tool returns
  • 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 MongoDB operations as structured tools that an AI agent can call through the Model Context Protocol. With the configured credential, the agent can discover databases and collections, inspect collection structure, query documents, count matches, and run aggregation pipelines.

This is not a MongoDB first-party MCP server; Arcade hosts this integration from another provider. Arcade adds the runtime around it, including credential brokering, approval policies, response redaction, tool visibility controls, and access through MCP and tool APIs.

Arcade agents can discover databases and collections, inspect a collection's sampled schema, find documents, count documents matching a filter, and run aggregation pipelines. These six available actions are read-only; they do not insert, update, delete, or otherwise change MongoDB data.

The integration uses a shared MongoDB API key or secret configured once. That credential must have permission to reach the databases and collections your queries need; grant it read-only access when these actions are all you require.

No. Users do not connect separate MongoDB accounts through this integration. One shared API key or secret is configured once, brokered by Arcade, and used for calls made through the connected integration.

Yes. Contextual Access policies can require human approval before a MongoDB call, even though the available MongoDB actions are read-only. The call proceeds only after the policy's conditions have been satisfied.

Arcade proxies MongoDB API calls and does not persist your MongoDB content as part of normal tool execution. The configured credential is brokered and stored encrypted at rest, and the model never receives it.

Any framework or client that can reach 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 refreshes access while the configured credential remains valid. If the key is revoked, rotated, or can no longer be used, MongoDB calls stop until the credential is reconnected or updated.

MongoDB deployment, cluster, and account limits still apply to calls made through Arcade. No additional MongoDB-specific rate limit or per-call cap is specified here, so query size, execution time, and throughput remain subject to your MongoDB configuration.

Ready to actually ship your agent?

Connect your agent to MongoDB with a shared API key and approval controls for consequential actions.