A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Model Context Protocol server for interacting with MongoDB Databases and MongoDB Atlas.
MongoDB MCP Server comes bundled with the official MongoDB plugins for AI agents. The following plugins are available:
mongodb-atlas β connects to the MongoDB-hosted Atlas MCP server over OAuth. This does not require you to run anything locally, and is the recommended way to connect to MongoDB Atlas from your AI agent:
β§βX / Ctrl+Shift+X), search for @agentPlugins, and install mongodb-atlas./plugins and install mongodb-atlas.copilot plugin install mongodb-atlas./marketplace in Grok Build and install mongodb-atlas.mongodb β runs the MongoDB MCP server locally and connects to any self-managed deployment:
codex plugin marketplace add mongodb/agent-skills, then open /plugins and install mongodb.copilot plugin install mongodb./marketplace in Grok Build and install mongodb.You can manually set up the local MCP server by running the following command:
This will guide you through an interactive setup process, including configuring your MongoDB connection string or Atlas API credentials.
For more advanced setup options, see the Manual Setup section below.
You can add and use the MongoDB MCP Server setup skill to configure your local MCP server using an AI agent.
See Manual Setup for instructions on how to manually configure the MongoDB MCP Server.
[!NOTE] Node 20.x support is deprecated and will be removed in a future release. Please upgrade to Node 22.13 or later. See https://nodejs.org/en/blog/migrations/v20-to-v22 for migration details.
Node.js
node -v.A MongoDB connection string or Atlas API credentials.
π Security Recommendation 1: When using Atlas API credentials, be sure to assign only the minimum required permissions to your service account. See Atlas API Permissions for details.
π Security Recommendation 2: For enhanced security, we strongly recommend using environment variables to pass sensitive configuration such as connection strings and API credentials instead of command line arguments. Command line arguments can be visible in process lists and logged in various system locations, potentially exposing your secrets. Environment variables provide a more secure way to handle sensitive information.
Most MCP clients require a configuration file to be created or modified to add the MCP server.
Note: The configuration file syntax can be different across clients. Please refer to the following links for the latest expected syntax:
Default Safety Notice: All examples below include
--readOnlyby default to ensure safe, read-only access to your data. Remove--readOnlyif you need to enable write operations.
You can pass your connection string via environment variables, make sure to use a valid username and password.
NOTE: The connection string can be configured to connect to any MongoDB cluster, whether it's a local instance or an Atlas cluster.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mongodb-mcp-server)<a href="https://allmcps.com/mcp/mongodb-mcp-server"><img src="https://allmcps.com/api/badge/mongodb-mcp-server?style=directory" alt="Mongodb MCP Server on AllMCPs" /></a>