๐๏ธ MongoDB MCP Server for LLMS
@1RB
About ๐๏ธ MongoDB MCP Server for LLMS
MCP server that provide tools to LLMs such as claude in cursor to interact with MongoDB
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mongo-mcp-1rb": {
"command": "node",
"args": [
"--version",
"#",
"Should",
"show",
"v18.0.0",
"or",
"higher"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is ๐๏ธ MongoDB MCP Server for LLMS?
An MCP server that enables LLMs to interact directly with MongoDB databases through natural language. It allows querying collections, inspecting schemas, and managing data seamlessly, targeting developers using MCP clients like Claude Desktop or Cursor.ai.
How to use ๐๏ธ MongoDB MCP Server for LLMS?
Configure your MCP client with the command npx mongo-mcp <connection-string> (or node dist/index.js for local development). Alternatively, install via Smithery using npx -y @smithery/cli install mongo-mcp --client claude. Ensure Node.js 18+ and a running MongoDB instance (local or remote) are available.
Key features of ๐๏ธ MongoDB MCP Server for LLMS
- Collection schema inspection
- Document querying with filtering and projection
- Index creation, listing, and removal
- Insert, update, and delete document operations
- Secure database access through connection strings
- Comprehensive error handling and validation
Use cases of ๐๏ธ MongoDB MCP Server for LLMS
- Query and analyze MongoDB data through conversational AI
- Inspect database schemas and indexes without direct shell access
- Perform CRUD operations on documents via natural language
- Manage indexes and optimize query performance with LLM guidance
FAQ from ๐๏ธ MongoDB MCP Server for LLMS
What are the prerequisites?
Node.js v18 or higher, a MongoDB instance (local or remote), and an MCP client such as Claude Desktop or Cursor.ai.
How do I connect to a MongoDB database?
Provide the MongoDB connection string as a command argument, for example: npx mongo-mcp mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin.
What security practices should I follow?
Create a dedicated MongoDB user with minimal permissions, never use admin credentials, enable access logging, set appropriate read/write permissions on collections, and consider IP allowโlisting.
How can I troubleshoot connection errors?
Verify the connection string, ensure the MongoDB server is running and reachable, and check network permissions. For authentication issues, confirm the username, password, and authSource parameter.
What tools does the server expose?
Query tools: listCollections, find, insertOne, updateOne, deleteOne. Index tools: createIndex, dropIndex, indexes. All follow the MCP specification with Zodโvalid
More Databases MCP servers
MotherDuck's DuckDB MCP Server
motherduckdbLocal MCP server for DuckDB and MotherDuck
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
Elasticsearch/OpenSearch MCP Server
cr7258A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction.
Comments