MongoDB

by nickiiitu

Not rated
GitHub

About

Interact with MongoDB databases using natural language to query collections, inspect schemas, and manage data.

Details

Author
nickiiitu
Categories
Database, Other

Setup

Install MongoDB in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/nickiiitu/MongoDB-Model-Context-Protocol-MCP-

Follow the installation instructions in the repository README, then restart your MCP client.

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 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" ] } } }

- Node.js 18+
- npx
- Docker and Docker Compose (for local sandbox testing only)
- MCP Client (Claude Desktop App for example)

If you don't have a mongo db server to connect to and want to create a sample sandbox, follow these steps

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:

- Personal info (name, email, age)
- Nested address with coordinates
- Arrays of interests
- Membership dates

- Product details (name, SKU, category)
- Nested specifications
- Price and inventory info
- Tags and ratings

- Order details with items
- User references
- Shipping and payment info
- Status tracking

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 projection
- listCollections: List available collections
- insertOne: Insert a single document
- updateOne: Update a single document
- deleteOne: Delete a single document

- createIndex: Create a new index
- dropIndex: Remove an index
- indexes: List indexes for a collection

- MCP Reviews:https://mcpreview.com/mcp-servers/nickiiitu/MongoDB-Model-Context-Protocol-MCP-

This project is licensed under the MIT License - see theLICENSEfile for details.

Interact with MongoDB databases using natural language. Query collections, inspect schemas, and manage data.

Provides read-only access to MongoDB databases through standardized MCP tools and resources.

An AI-powered gateway for managing over 40 data sources like Alibaba Cloud and mainstream databases, featuring NL2SQL, code generation, and data migration.

Query Apple Health data using natural language and SQL.

Interact with AskTable SaaS or local deployments to query data sources using natural language.

Interact with CrateDB using natural language for Text-to-SQL queries and documentation retrieval.

MCP servers that give AI clients safe, structured access to SQL databases. One installable package per database engine. Every package exposes the same minimal two-tool surface, execute_sql and search_objects, with guardrails on by default: read-only mode, row caps, and statement timeouts.

Enables AI assistants to query data from DataFocus using natural language.

Provides read-only access to Apache Iceberg tables via Apache Impala, allowing LLMs to inspect schemas and execute queries.

Data intelligence platform - query your database in natural language, build dashboards, and set up automated alerts that monitor your metrics 24/7.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.