Integrations
Enables direct interaction with MongoDB databases, including collection schema inspection, document querying and filtering, index management, and document operations (insertion, updating, deletion).
🗄️ 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)
Demo Video
https://github.com/user-attachments/assets/2389bf23-a10d-49f9-bca9-2b39a1ebe654
🚀 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
Installing via Smithery
To install MongoDB MCP Server for Claude Desktop automatically via Smithery:
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
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases, allowing them to query collections, inspect schemas, and manage data seamlessly through natural language.
Related MCP Servers
- -securityAlicense-qualityA 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.Last updated -34075TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides access to MongoDB databases. This server enables LLMs to inspect collection schemas and execute read-only queries.Last updated -8885191TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that enables LLMs to interact directly the documents that they have on-disk through agentic RAG and hybrid search in LanceDB. Ask LLMs questions about the dataset as a whole or about specific documents.Last updated -1231TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.Last updated -340TypeScriptMIT License