> For the complete documentation index, see [llms.txt](https://docs.natoma.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.natoma.ai/apps/mongodb.md).

# MongoDB

**Type:** Community

**Source Type:** Repository

**Source:** [GitHub](https://github.com/mongodb-js/mongodb-mcp-server)

**Description:** Provides Claude with direct access to MongoDB databases for querying, analyzing, and managing document-based data. Enables natural language database operations including collection queries, document aggregation, schema analysis, index management, and database statistics retrieval through MongoDB's native Node.js driver.

**Configuration Parameters:**

* **MongoDB Connection String** \* - MongoDB connection URI (e.g., mongodb://localhost:27017 or mongodb+srv://cluster.mongodb.net)
* **Database Name** - Default database to connect to (optional)
* **MongoDB Options** - Additional connection options in JSON format (optional)

**Setup Steps:**

1. Ensure you have a MongoDB instance running (local, Atlas, or hosted)
2. For MongoDB Atlas:
   * Log in to <https://cloud.mongodb.com>
   * Navigate to your cluster and click "Connect"
   * Choose "Connect your application"
   * Copy the connection string
   * Replace `<password>` with your database user password
3. For local MongoDB:
   * Use connection string: `mongodb://localhost:27017`
4. Create a database user with appropriate permissions if needed
5. Whitelist IP addresses in MongoDB Atlas if using cloud deployment
6. Provide the connection string to Natoma
