M

MongoDB MCP Server

Verified

Connect AI agents to MongoDB for document queries and collection management.

open-source 75/100 Databases & Data database mongodb nosql documents aggregation

A Model Context Protocol server for MongoDB. Enables AI agents to query MongoDB collections, inspect database schemas, perform aggregations, and manage documents.

Supports find, aggregate, insert, update, and delete operations across collections. Includes schema inference for document collections.

Install

npx -y @modelcontextprotocol/server-mongodb mongodb://localhost:27017/mydb

MCP Client Config

{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mongodb",
        "mongodb://localhost:27017/mydb"
      ]
    }
  }
}

Capabilities

Tools

findaggregateinsert_oneupdate_onedelete_onelist_collections

Compatible With

Claude Desktop Claude Code Cursor Windsurf

Metrics

18,500

GitHub Stars

12,000

Installs

900

Weekly

6

Open Issues