Docs Menu
Docs Home
/
MongoDB MCP Server

MongoDB MCP Server Overview

The MongoDB MCP Server allows you to easily interact with your MongoDB data and deployments from AI clients in natural language.

You can use the MongoDB MCP Server with any MongoDB deployment, including MongoDB Atlas, MongoDB Community Edition, and MongoDB Enterprise Advanced.

This page describes key concepts and use cases. If you're already familiar with MCP, you can get started.

Model Context Protocol (MCP) is an open standard developed by Anthropic to standardize how LLMs connect to and interact with external resources and services. MCP consists of a client-server architecture with the following key components:

  • MCP Host: Application or environment where you want to use MCP, such as a chat interface or IDE. For example, Claude Desktop or VS Code.

  • MCP Clients: Components within the host that handle connections to MCP servers. For a list of clients that support MCP, see MCP Clients.

  • MCP Servers: Programs that expose specific capabilities to the client. For example, the MongoDB MCP Server.

    The primary way that MCP servers expose capabilities to clients is through tools. Tools are pre-defined, executable functions that enable LLMs to perform specific actions, such as interacting with external data sources like MongoDB.

To learn more, see MCP documentation.

The MongoDB MCP Server is our official MCP server implementation that gives your AI client a set of tools that can be used to interact with your MongoDB data and deployments. These tools include various administrative actions, such as managing cluster resources, as well as database operations like querying and indexing.

Diagram of the MongoDB MCP Server workflow with tools

The MongoDB MCP Server allows you to interact with your MongoDB data and deployments using natural language, streamlining developer workflows and making it easier to perform complex tasks from AI interfaces. For example, the MongoDB MCP Server enables the following use cases:

Use case
Description
Prompt example

Data exploration

Learn and explain your database schema and relationships.

Show the schema of the 'users' collection and explain the purpose of each field.

Database operations

Create, read, update, and delete data in your MongoDB collections.

Find all users from the past week and update their orders to 'shipped'.

Database Management

Perform administrative tasks to manage your clusters, database users, and more.

Create a new database user for my Atlas cluster with read-only access.

Code generation

Describe the data you need, then generate relevant MongoDB queries and application code.

Review the schema for the 'users' collection, then generate a Python script that deletes profiles older than 2 years.

For a list of the specific tools available in the MongoDB MCP Server, see MongoDB MCP Server Tools.

To configure the MongoDB MCP Server and learn how to use it, see the following resources:

Quickly get started with the MongoDB MCP Server.

View the prerequisites for configuring the MongoDB MCP Server.

View all available configuration and connection options.

View all available tools in the MongoDB MCP Server.

Test example prompts to use with the MongoDB MCP Server.

View the MongoDB MCP server source code and contributing guidelines.

Back

What is the MongoDB MCP Server?

On this page