{
  "name": "io.github.mongodb-js/mongodb-mcp-server",
  "description": "The official MongoDB MCP connects an AI agent to a MongoDB cluster — list databases, inspect collection schemas, run aggregations, and execute find/count queries. Supports Atlas, self-hosted MongoDB, and connection-string-based auth. The server ships read-only and write-capable modes; the safe default is read-only for any agent-driven conversation.",
  "status": "active",
  "version": "latest",
  "_meta": {
    "com.top-mcps/lastVerified": "2026-05-27",
    "com.top-mcps/score": {
      "value": 89,
      "rubricVersion": "2026-04",
      "lastComputed": "2026-06-02T13:16:41.641Z",
      "methodology": "https://top-mcps.com/about/methodology"
    },
    "com.top-mcps/stats": {
      "fetchedAt": "2026-06-02T11:55:52.290Z",
      "githubStars": 1038,
      "lastCommitAt": "2026-05-26T14:54:28Z",
      "npmWeeklyDownloads": 66428
    }
  },
  "repository": {
    "url": "https://github.com/mongodb-js/mongodb-mcp-server",
    "source": "github"
  },
  "author": {
    "name": "MongoDB"
  },
  "packages": [
    {
      "registryType": "npm",
      "registryBaseUrl": "https://registry.npmjs.org",
      "identifier": "mongodb-mcp-server",
      "version": "latest",
      "transport": {
        "type": "stdio"
      },
      "runtimeArguments": [
        {
          "type": "positional",
          "value": "--connectionString=\"mongodb+srv://user:pass@cluster.mongodb.net\""
        }
      ],
      "environmentVariables": [
        {
          "name": "MDB_CONNECTION_STRING",
          "description": "MDB_CONNECTION_STRING — required credential for MongoDB.",
          "isRequired": true,
          "isSecret": true
        }
      ]
    }
  ],
  "capabilities": {
    "tools": [
      {
        "name": "list_databases",
        "description": "List databases on the cluster.",
        "sideEffect": "read"
      },
      {
        "name": "list_collections",
        "description": "List collections within a database.",
        "sideEffect": "read",
        "args": [
          {
            "name": "database",
            "type": "string",
            "required": true
          }
        ]
      },
      {
        "name": "find",
        "description": "Run a find query against a collection.",
        "sideEffect": "read",
        "args": [
          {
            "name": "collection",
            "type": "string",
            "required": true
          },
          {
            "name": "filter",
            "type": "object",
            "required": false
          }
        ]
      },
      {
        "name": "aggregate",
        "description": "Run an aggregation pipeline.",
        "sideEffect": "read",
        "args": [
          {
            "name": "collection",
            "type": "string",
            "required": true
          },
          {
            "name": "pipeline",
            "type": "array",
            "required": true
          }
        ]
      }
    ],
    "security": {
      "scope": "read-only",
      "sandbox": "Connects via standard MongoDB driver to the connection string in MDB_CONNECTION_STRING. Read-only mode disables write tools at the MCP layer; combine with a database user scoped to the smallest namespace your workflow needs.",
      "gotchas": [
        "Read-only is enforced at the tool level, not the MongoDB role. Always pair MCP read-only mode with a read-only database user.",
        "Schema inference samples N documents; rare fields may be missing from the inferred schema.",
        "The Atlas Admin tools require a separate Atlas API key — do not reuse the connection-string password for admin scope."
      ]
    }
  },
  "_links": {
    "html": "https://top-mcps.com/mcp/mongodb",
    "markdown": "https://top-mcps.com/mcp/mongodb.md",
    "methodology": "https://top-mcps.com/about/methodology"
  }
}
