MongoDB MCP Server
Inspect MongoDB collections, run queries, and manage data through MongoDB's official MCP server.
Overview
MongoDB's official MCP server exposes database, collection, and document operations to MCP clients. It can inspect schemas, run queries, and perform supported write operations. Connection strings often carry broad privileges, so use a dedicated database user, restrict network access, and start with read-only operations.
Capabilities
- List databases and collections
- Query documents
- Aggregation
- Index inspection
- Data operations
Connection profile
- Transports
- stdio
- Authentication
- MongoDB connection string; Atlas credentials
- License
- Apache-2.0
- Vendor
- MongoDB
- Repository
- github.com/mongodb-js/mongodb-mcp-server
Client format support is reviewed against official client documentation. It is not a claim that this specific server was tested with every client.
Configuration starting point
A documented preset is available for this server. It contains placeholders, not real credentials. Generate a client-correct file or review the raw values below.
npx -y mongodb-mcp-server
Security notes
- Use a database user with the minimum roles required for the task, not an admin connection string.
- Connection strings contain credentials; pass them through environment configuration and avoid committing them.
- Write-capable tools can alter or delete documents. Review the server's safety settings before connecting to production.
The catalog records source evidence, not a security audit. Review the server's permissions, recent releases, and the data it can access before connecting it to a real account.
Related failure modes
Sources & evidence
- github.com/mongodb-js/mongodb-mcp-serverRepository · checked Oct 23, 2026 · documented
MongoDB's official repository documents the MCP server, connection configuration, and available database tools.