MCP.so
Sign In

🗄️ 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

Category

Databases

Runtime

node

Transports

stdio

Publisher

1RB

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

Comments

More Databases MCP servers