Interact with MongoDB databases using natural language to query collections, inspect schemas, and manage data.
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.
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://<username>:<password>@<host>:<port>/<database>?authSource=admin"
]
}
}
}
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.
Interface with Biomart, a biological data query tool, using the pybiomart Python package.
A read-only MCP server for CSV files from CData, requiring an external JDBC driver for connection.
A runtime-configurable MCP server that turns a Supabase project into an AI-compatible tool interface.
Interact with Microsoft SQL Server (MSSQL) databases. List tables, read data, and execute SQL queries with controlled access.
Interact with Neon Postgres databases using natural language to manage projects, branches, queries, and migrations via the Neon API.
Enables AI assistants to query, read, and move data on DICOM servers such as PACS and VNA for medical imaging.
An MCP server for read-only interaction with the Nimiq blockchain.
Access medical knowledge-bases and drug information from eka.care. Requires API credentials.
Query a Neo4j graph database containing a knowledge graph of German family businesses.
An Elasticsearch server focused on security and threat analysis. Requires a valid Elasticsearch license (trial, platinum, or enterprise) for connection.