For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Get Started with the MongoDB MCP Server

Important

The feature described on this page is not currently supported on Atlas Infinite clusters during public preview. For the features supported in public preview, see Public Preview Availability.

In this guide, you learn how to get started with the MongoDB MCP Server by configuring and using it in your AI client.

Before you begin, review MongoDB MCP Server Prerequisites for Running Atlas Tools to ensure you meet all the requirements to configure the MongoDB MCP Server.

Tip

Select your desired AI Client from the AI Client dropdown below for setup instructions.

Claude Code supports the following setup methods:

  • Plugin for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the plugin.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Plugin for Local MCP: This option allows you to connect to your local MongoDB cluster using the plugin.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

Claude Desktop & Web support the following setup methods:

  • Connector for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the connector.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

ChatGPT Desktop & Web support the following setup method:

  • Plugin for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the plugin.

Note

ChatGPT does not support Self-Managed MongoDB.

Important

An organization owner must enable the AI Clients setting before members can connect with a plugin. To learn how to enable AI client connections, see Enable AI Clients.

To set up the MongoDB Atlas plugin in ChatGPT Desktop or Web, follow these steps:

1
2

Go to Settings → Plugins → Browse directory.

Search for MongoDB Atlas, select it, and click Install plugin.

3

Click Connect to MongoDB Atlas and complete the guided Atlas OAuth flow.

4

Click Authorize.

Cursor supports the following setup methods:

  • Plugin for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the plugin.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Plugin for Local MCP: This option allows you to connect to your local MongoDB cluster using the plugin.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

Codex supports the following setup methods:

  • Plugin for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the plugin.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

Devin AI supports the following setup methods:

  • Plugin for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the plugin.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.

Note

Devin AI does not support Self-Managed MongoDB.

Grok Build supports the following setup methods:

  • Plugin for MongoDB Atlas (Managed MCP Server) (Recommended): This option allows you to connect to your MongoDB Atlas cluster using the plugin.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Plugin for Local MCP: This option allows you to connect to your local MongoDB cluster using the plugin.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

The fx CLI supports the following setup methods:

  • MongoDB Atlas Managed MCP Server (User Delegation) (Recommended): This option allows you to connect to your MongoDB Atlas cluster by authorizing your AI client to act with your Atlas identity.
  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

You can use any other AI client with the following setup methods:

  • Manual Setup for MongoDB Atlas Managed MCP Server: This option allows you to connect to your MongoDB Atlas cluster after you set up Atlas access using the Atlas CLI or Atlas API.
  • Manual Setup for Local MCP: This option allows you to connect to your local MongoDB cluster after you manually set up the Local MCP environment.

To set up the Local MCP, ensure you have Node.js installed using version 22.12.0 or later.

To examine your Node.js version, run the following command:

node --version

You can use the Local MCP with local Atlas deployments. To do so, you must install Docker. For an introduction to local Atlas deployments, see Create a Local Atlas Deployment.

For a list of the tools available for the MongoDB MCP Server, see Supported Tools.

For examples of how to use the MongoDB MCP Server, see MongoDB MCP Server Usage Examples.

Rate this page