Back to MCP Directory
Mongo
Model Context Protocol moderate risk

Mongo

This MCP server allows LLMs to interact with MongoDB databases, enabling querying, schema inspection, index management, and document operations via natural language.

Connections & Capabilities

Connects To

GitHubMongoDBDocker

Capabilities

readwriteadmin

Quickstart

Install

npx -y @smithery/cli install mongo-mcp --client claude

Config

{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": [
        "mongo-mcp",
        "mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin"
      ]
    }
  }
}

Exposed MCP Tools (8)

safe
find

Query documents in a MongoDB collection using specified filters and projections.

Read-only operation; retrieves data without modifying it.

safe
listCollections

List the available collections in the MongoDB database.

Read-only operation; retrieves metadata without modifying data.

moderate
insertOne

Insert a single document into a MongoDB collection.

Adds new data to the database, but only one document at a time.

high
updateOne

Update a single document in a MongoDB collection based on specified criteria.

Modifies existing data in the database, potentially altering important information.

critical
deleteOne

Delete a single document from a MongoDB collection based on specified criteria.

Removes data from the database, which can lead to data loss.

moderate
createIndex

Create a new index on a MongoDB collection to improve query performance.

Modifies the database schema, but does not directly affect data content.

high
dropIndex

Remove an existing index from a MongoDB collection.

Modifies the database schema and can impact query performance.

safe
indexes

List the indexes for a specific MongoDB collection.

Read-only operation; retrieves metadata without modifying data.

Safety Assessment

This MCP server provides a balance between functionality and risk. It is relatively safe for read-only operations and index management. However, the ability to perform document operations introduces a moderate risk, especially if the MongoDB instance is not properly secured or if prompts are not carefully vetted.

  • Requires explicit configuration with MongoDB connection string.
  • Provides tools for querying data, which can be relatively safe.
  • Offers index management tools, which can improve performance without directly modifying data.
  • Includes document operation tools, but these are explicit and require specific prompts.
  • Allows document operations (insert, update, delete), posing a risk of data modification.
  • No built-in RBAC or access controls beyond the MongoDB connection string.
  • Potential for data exfiltration if prompts are crafted maliciously.
  • If the MongoDB instance is exposed to the internet, it could be vulnerable to unauthorized access.
Mongo Review, Pricing & Alternatives (2026) | Flaex AI