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. - ๐ Collection schema inspection - ๐ Document querying and filtering - ๐ Index management - ๐ Document operations (insert, update, delete) To get started, find your mongodb connection url and add this confi
Add this skill
npx mdskills install QuantGeekDev/mongo-mcpWell-documented MongoDB MCP server with useful database tools and clear setup instructions
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.
https://github.com/user-attachments/assets/2389bf23-a10d-49f9-bca9-2b39a1ebe654
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
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"mongo-mcp",
"mongodb://:@:/?authSource=admin"
]
}
}
}
To install MongoDB MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mongo-mcp --client claude
If you don't have a mongo db server to connect to and want to create a sample sandbox, follow these steps
docker-compose up -d
npm run seed
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
{
"mcpServers": {
"mongodb": {
"command": "node",
"args": [
"dist/index.js",
"mongodb://root:example@localhost:27017/test?authSource=admin"
]
}
}
}
The seed script creates three collections with sample data:
Try these prompts with Claude to explore the functionality:
"What collections are available in the database?"
"Show me the schema for the users collection"
"Find all users in San Francisco"
"Find all electronics products that are in stock and cost less than $1000"
"Show me all orders from the user john@example.com"
"List the products with ratings above 4.5"
"What indexes exist on the users collection?"
"Create an index on the products collection for the 'category' field"
"List all indexes across all collections"
"Insert a new product with name 'Gaming Laptop' in the products collection"
"Update the status of order with ID X to 'shipped'"
"Find and delete all products that are out of stock"
The server provides these tools for database interaction:
find: Query documents with filtering and projectionlistCollections: List available collectionsinsertOne: Insert a single documentupdateOne: Update a single documentdeleteOne: Delete a single documentcreateIndex: Create a new indexdropIndex: Remove an indexindexes: List indexes for a collectionThis project is licensed under the MIT License - see the LICENSE file for details.
Install via CLI
npx mdskills install QuantGeekDev/mongo-mcpMongoDB MCP Server for LLMS is a free, open-source AI agent skill. 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. - ๐ Collection schema inspection - ๐ Document querying and filtering - ๐ Index management - ๐ Document operations (insert, update, delete) To get started, find your mongodb connection url and add this confi
Install MongoDB MCP Server for LLMS with a single command:
npx mdskills install QuantGeekDev/mongo-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
MongoDB MCP Server for LLMS works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.