Enables querying and managing MongoDB databases, including collection schema inspection, document operations (querying, filtering, inserting, updating, deleting), and index management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MongoDB MCP Server for LLMsfind all users in San Francisco"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
šļø MongoDB MCP Server for LLMS
A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.
⨠Features
š Collection schema inspection
š Document querying and filtering
š Index management
š Document operations (insert, update, delete)
Related MCP server: MongoDB
š Quick Start
To get started, find your mongodb connection url and add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Prerequisites
Node.js 18+
npx
Docker and Docker Compose (for local sandbox testing only)
MCP Client (Claude Desktop App for example)
Test Sandbox Setup
If you don't have a mongo db server to connect to and want to create a sample sandbox, follow these steps
Start MongoDB using Docker Compose:
Seed the database with test data:
Configure Claude Desktop
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Local Development Mode:
Test Sandbox Data Structure
The seed script creates three collections with sample data:
Users
Personal info (name, email, age)
Nested address with coordinates
Arrays of interests
Membership dates
Products
Product details (name, SKU, category)
Nested specifications
Price and inventory info
Tags and ratings
Orders
Order details with items
User references
Shipping and payment info
Status tracking
šÆ Example Prompts
Try these prompts with Claude to explore the functionality:
Basic Operations
Advanced Queries
Index Management
Document Operations
š Available Tools
The server provides these tools for database interaction:
Query Tools
find: Query documents with filtering and projectionlistCollections: List available collectionsinsertOne: Insert a single documentupdateOne: Update a single documentdeleteOne: Delete a single document
Index Tools
createIndex: Create a new indexdropIndex: Remove an indexindexes: List indexes for a collection
CertifiedBy:-
MCP Reviews: https://mcpreview.com/mcp-servers/nickiiitu/MongoDB-Model-Context-Protocol-MCP-
š License
This project is licensed under the MIT License - see the LICENSE file for details.