Back to MCP Servers

MongoDB Server

Query, aggregate, and manage MongoDB databases with schema inspection and natural language operations

databasemongodbnosqlcommunity

Installation

npm install -g @mongodb-js/mcp-server-mongodb

Configuration

{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": ["-y", "@mongodb-js/mcp-server-mongodb"],
      "env": {
        "MONGODB_URI": "mongodb://localhost:27017/your-database"
      }
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes
View source on GitHub