MCP SERVER PROFILE · Database
Database

MongoDB MCP Server

MongoDB-maintained database and Atlas MCP integration.

GitHub stars0
Setup options1
Documented tools54
Maintained bymongodb-js

Overview

MongoDB-maintained database and Atlas MCP integration.

mongodbdatabaseatlas

Installation & configuration 1 documented option

Choose the configuration documented for your client. Replace placeholders with your own values, and review the maintainer documentation before connecting.

MongoDB read-only via npx

Compatible stdio MCP client

{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server@latest",
        "--readOnly"
      ],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}

Requires Node.js 22.13+ and a reachable MongoDB instance. Read-only mode enabled.

Read maintainer installation documentation ↗

Before you install

  • Node.js 22.13 or later, or Docker for container-based installation.
  • A MongoDB connection string or MongoDB Atlas service account credentials.
  • Atlas management tools require suitable Atlas API permissions.
  • Use the read-only option when database modification is unnecessary.
  • Store connection strings and credentials in environment variables and grant minimum required permissions.

Documented tools 54

Capabilities provided in the listing metadata. Check upstream documentation for current availability and parameters.

aggregate

Run an aggregation pipeline against a MongoDB collection.

aggregate-db

Run an aggregation pipeline at the database level.

collection-indexes

Describe indexes for a collection.

collection-schema

Inspect the inferred schema of a collection.

collection-storage-size

Retrieve collection storage size information.

connect

Establish a connection to a MongoDB instance.

count

Count documents in a collection with an optional filter.

create-collection

Create a collection in a database.

create-index

Create an index for a collection.

db-stats

Retrieve database statistics.

delete-many

Delete documents matching a filter.

disconnect

Close a MongoDB connection.

drop-collection

Delete a collection or view and its indexes.

drop-database

Delete a database.

drop-index

Remove a collection index.

explain

Inspect query execution plans and statistics.

export

Export query or aggregation results in EJSON format.

find

Find documents matching a query.

insert-many

Insert multiple documents into a collection.

list-collections

List collections in a database.

list-connections

List active MongoDB connections.

list-databases

List databases accessible through a connection.

mongodb-logs

Retrieve recent MongoDB server log events.

rename-collection

Rename a collection.

update-many

Update documents matching a filter.

atlas-list-orgs

List MongoDB Atlas organizations.

atlas-list-projects

List Atlas projects.

atlas-create-project

Create an Atlas project.

atlas-list-clusters

List Atlas clusters.

atlas-inspect-cluster

Inspect an Atlas cluster.

atlas-create-free-cluster

Create a free Atlas cluster.

atlas-connect-cluster

Connect to an Atlas cluster using configured credentials.

atlas-get-regions

List supported Atlas cloud regions.

atlas-upgrade-cluster

Upgrade or scale an Atlas cluster.

atlas-create-cluster

Create a dedicated Atlas cluster.

atlas-pause-resume-cluster

Pause or resume an eligible Atlas cluster.

atlas-inspect-access-list

Inspect Atlas network access rules.

atlas-create-access-list

Configure Atlas network access rules.

atlas-list-db-users

List Atlas database users.

atlas-create-db-user

Create an Atlas database user.

atlas-list-alerts

List Atlas project alerts.

atlas-get-performance-advisor

Retrieve performance recommendations and slow query insights.

atlas-load-sample-dataset

Load an Atlas sample dataset.

remote-atlas-connect

Connect to Atlas through the managed remote MCP server.

atlas-streams-discover

Discover Atlas Stream Processing resources.

atlas-streams-build

Create Atlas Stream Processing resources.

atlas-streams-manage

Manage Atlas Stream Processing resources.

atlas-streams-teardown

Delete Atlas Stream Processing resources.

atlas-local-list-deployments

List local Atlas deployments.

atlas-local-create-deployment

Create a local Atlas deployment.

atlas-local-connect-deployment

Connect to a local Atlas deployment.

atlas-local-delete-deployment

Delete a local Atlas deployment.

list-knowledge-sources

List MongoDB Assistant knowledge sources.

search-knowledge

Search official MongoDB knowledge and documentation.

Listed on FreeMCP badge

Maintaining this MCP server? Add this optional badge to your GitHub README so visitors can find its FreeMCP listing. Listing is not a security certification or independent verification.

MCP — Listed on FreeMCP

[![Listed on FreeMCP](https://freemcp.in/badges/listed.svg)](https://freemcp.in/servers/mongodb-mcp)

Security & permissions

  • Prefer read-only access and narrowly scoped database credentials.

See the installation and security guide for a setup checklist.

Buy me a beer