by mongodb-js
A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
# Add to your Claude Code skills
git clone https://github.com/mongodb-js/mongodb-mcp-serverGuides for using mcp servers skills like mongodb-mcp-server.
Last scanned: 5/2/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-02T06:10:31.679Z",
"semgrepRan": false,
"npmAuditRan": false,
"pipAuditRan": true
}mongodb-mcp-server is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by mongodb-js. A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters. It has 1,106 GitHub stars.
Yes. mongodb-mcp-server passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/mongodb-js/mongodb-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
mongodb-mcp-server is primarily written in TypeScript. It is open-source under mongodb-js on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mongodb-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
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:
npx -y mongodb-mcp-server@latest setup
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.
npx skills add https://github.com/mongodb/agent-skills --skill mongodb-mcp-setup
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.
{
"mcpServers": {
"MongoDB": {
"command": "npx",
"args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}
NOTE: The connection string can be configured to connect to any MongoDB cluster, whether it's a local instance or an Atlas cluster.
When workin