DEV Community

curatedmcp for CuratedMCP

Posted on • Originally published at curatedmcp.com

MongoDB MCP: Give Your AI Agent Direct Access to Your MongoDB Clusters

Install guide and config at curatedmcp.com

MongoDB MCP: Give Your AI Agent Direct Access to Your MongoDB Clusters

MongoDB just released an official MCP server, and it's a game-changer for developers who want their AI agents to actually work with NoSQL data instead of just talking about it.

What It Does

MongoDB MCP lets Claude, Cursor, and other AI agents query, inspect, and modify MongoDB Atlas clusters and local instances directly. Instead of asking an AI to write MongoDB queries and hoping they're correct, the agent can now execute queries, explore your schema in real time, and handle document operations autonomously.

The server supports the full CRUD lifecycle: query documents with filters and aggregations, inspect collections and indexes, create and update records, and manage cluster configuration. You also get performance monitoring, slow query detection, Atlas search integration, and change stream support — everything a developer needs to orchestrate database workflows through natural language.

This is especially powerful for exploratory work. Ask your AI to "find all documents where status is 'pending' and createdAt is older than 30 days" and it executes the actual query, sees the results, and can act on them. No more back-and-forth copy-pasting.

How to Install

Install via npm:

npx -y @mongodb/mcp
Enter fullscreen mode Exit fullscreen mode

Then add to your Claude Desktop config file (claude_desktop_config.json):

{
  "mcpServers": {
    "mongodb-mcp": {
      "command": "npx -y @mongodb/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

You'll need MongoDB connection credentials (Atlas connection string or local instance details). Full setup instructions are in the MongoDB MCP docs.

Real-World Use Cases

  • Data migration and cleanup: Ask Claude to find and transform legacy documents across collections, then execute the updates. No manual scripting required.
  • Schema exploration for feature development: Query your actual data patterns, discover edge cases in your schema, and get AI suggestions for indexing improvements based on real access patterns.
  • Debugging production issues: Have your AI agent query slow logs, inspect problematic documents, and suggest fixes — all without leaving your chat interface.

It's free and officially maintained by MongoDB, so you're not relying on a community fork.


Full install guides for Claude Desktop, Cursor, Windsurf, and more at CuratedMCP.

Top comments (0)