BASE

MongoDB MCP Server

MongoDB MCP Server

MCP tools for developers · Free

The official MongoDB MCP server for queries, schemas, indexes, and managing Atlas or a self-managed deployment through a coding agent.

Also known as: mongodb-js/mongodb-mcp-server

Resource illustration: MongoDB MCP Server

Open resource ↗

What you can use for free

You can use the code under the stated license; servers, APIs, and compute must be provided separately.

Paid features and costs

Atlas and AI have separate pricing; Apache applies to the connector code.

Access and limitations

You can use the code under the stated license; servers, APIs, and compute must be provided separately. Atlas and AI have separate pricing; Apache applies to the connector code.

Use cases

  • Choose an Atlas or self-managed connection and enable appropriate restrictions.
  • Inspect the collections, then check a query and explain without changing production.

Example workflow

A possible workflow; this is not a report of hands-on testing.

The official MongoDB MCP server for queries, schemas, indexes, and managing Atlas or a self-managed deployment through a coding agent.

Before you start

  • A MongoDB deployment, a test database, and scoped credentials.

Steps

  1. Choose an Atlas or self-managed connection and enable appropriate restrictions.
  2. Inspect the collections, then check a query and explain without changing production.
  3. Compare the result with the workflow's goal; after changing the project, run its standard checks.

Check your result

  • The database and scope are correct; check the query plan and access permissions.
  • Check connection permissions and dependency terms; confirm external service costs if the workflow requires them.

Choosing MongoDB MCP Server

Choose an Atlas or self-managed connection and enable appropriate restrictions.

Choose this when

  • Choose an Atlas or self-managed connection and enable appropriate restrictions.
  • Inspect the collections, then check a query and explain without changing production.

Requirements

  • For local Node execution: Node.js 22.13+ and MongoDB access; the Docker option has separate instructions.

Things to consider

  • Costs and limits of free use: Atlas and AI have separate pricing; Apache applies to the connector code.
  • Terms of use: Apache-2.0 for this repository; connected services, models, and data have separate terms.
  • The CLI is intended for one user in a localhost/private environment; it has no built-in authentication or isolation for multiple users.

Frequently asked questions

What can you use for free in MongoDB MCP Server?

You can use the code under the stated license; servers, APIs, and compute must be provided separately.

What additional costs might arise with MongoDB MCP Server?

Atlas and AI have separate pricing; Apache applies to the connector code.

What terms of use matter for MongoDB MCP Server?

Apache-2.0 for this repository; connected services, models, and data have separate terms.

How do you get started with MongoDB MCP Server?

Choose an Atlas or self-managed connection and enable appropriate restrictions. Inspect the collections, then check a query and explain without changing production. Compare the result with the workflow's goal; after changing the project, run its standard checks.

How do I connect MongoDB MCP for analysis without changing the database?

The readOnly flag registers reading, connection, and metadata tools, disabling create/update/delete. It is enabled in the examples, but the default setting is false. The server exposes schemas and indexes and runs queries and explain; Node execution requires 22.13+ and a connection string or Atlas Service Account.

License

Apache-2.0 for this repository; connected services, models, and data have separate terms.

Apache 2.0 — permissive license with patent terms

You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.

License terms

Technologies and topics

  • MongoDB MCP Server
  • mongodb-js
  • MCP

Sources

Other resources