BLUENEXUS INTEGRATIONSCONNECTION GUIDE

MongoDB in Claude, ChatGPT and MCP: what each can do, and how to connect

MongoDB has two official MCP servers. The Atlas MCP server is hosted by MongoDB and works as a plugin in Claude and ChatGPT. The local MCP server runs on your computer and works with any MongoDB, including self-managed. Connected, the AI can query collections, run aggregations, infer schemas, list and explain indexes, and, if you let it, change data. This guide covers both, what limits them, how to connect, and what changes when a backend team shares a database.

MCP (Model Context Protocol) is an open standard for plugging AI assistants into other apps. Claude and ChatGPT are a great fit for one person's questions. BlueNexus is for when the database is shared work.

ON YOUR OWN Claude

For a developer or analyst asking about one database.

Query and exploreYes, with MongoDB's Atlas plugin or local server
ChangesDepends on the access mode and your role
SetupAn Atlas owner turns it on, then you sign in
Self-managed MongoDBThrough the local server
ON YOUR OWN ChatGPT

For someone who works in ChatGPT, on Atlas.

Query and exploreYes, with the MongoDB Atlas plugin
ChangesDepends on the access mode and your role
SetupInstall the plugin and sign in to Atlas
Self-managed MongoDBNot supported
WITH YOUR TEAM BlueNexus

For a backend team sharing a database with data and on-call.

Query and exploreYes: collections, queries and schemas
ChangesAfter a person approves
SetupAdd a connector and follow the steps
Self-managed MongoDBAny MongoDB database

Two servers, and which to use

  • Atlas MCP server, hosted. No install. An Organization Owner turns on AI access for the organization, sets it to Read or Read and write, and each person signs in with their own Atlas account. It works only with Atlas clusters.
  • Local MCP server. Runs on your computer with a connection string, and works with Atlas, Community and Enterprise. You choose read-only, which tools to turn off, and whether to reject queries that scan a whole collection.

Three things are worth knowing:

  • On Atlas, it acts as you. The AI gets the stricter of your Atlas role and the organization's access mode. There are no per-project or per-cluster limits for AI clients.
  • Read tools can write. An aggregation pipeline with $out or $merge writes data, even though aggregation counts as a read. Read mode or a read-only role stops it.
  • Confirmations depend on the app. The local server asks before dropping or bulk-deleting, but only in AI apps that support those prompts.

What MongoDB's MCP servers let an AI do

Query dataFind documents, count them and run aggregation pipelines.
Read schemasInfer a collection's fields and types, and list its indexes.
Check performanceExplain a query's plan, and on Atlas, read Performance Advisor's suggestions.
Change dataInsert, update, delete, and create or drop indexes, if allowed.
Works with
MongoDB's hosted Atlas MCP server, generally available since August 2026MongoDB's local MCP server for Atlas, Community and EnterpriseClaude, ChatGPT, Claude Code and Cursor
Keep in mind
  • Atlas AI access is usually off until an owner turns it on
  • On Atlas, the AI can't go beyond your Atlas role or the access mode
  • Some pipelines write, even from read tools
  • ChatGPT doesn't support self-managed MongoDB

Connect MongoDB to Claude or ChatGPT

On Atlas, both start with an owner turning on AI access.

Connect MongoDB to Claude

10 min

A good fit if your database runs on Atlas.

  1. 1An Atlas Organization Owner turns on AI access under Org Settings, then App Connections, and picks Read as the access mode.
  2. 2In Claude, open Customize, then Connectors, and find MongoDB Atlas.
  3. 3Click Connect and sign in to Atlas.
  4. 4Ask a question first, like which fields the orders collection has.

For self-managed MongoDB, run MongoDB's local MCP server in Claude Desktop or Claude Code, with --readOnly and a read-only database user.

Connect MongoDB to ChatGPT

10 min

A good fit if your database runs on Atlas.

  1. 1An Atlas Organization Owner turns on AI access, as for Claude.
  2. 2In ChatGPT, open Plugins, find MongoDB Atlas and install it.
  3. 3Sign in to Atlas.
  4. 4Ask which collections hold orders.

MongoDB's docs say ChatGPT doesn't support self-managed MongoDB. Use Atlas, or a tool that runs the local server.

For developers

The local server runs with npx on Node 22.13 or later. Put the connection string in MDB_MCP_CONNECTION_STRING, not in a prompt, so the model never sees it. --readOnly registers only read tools, --disabledTools removes tools or whole categories, and --indexCheck rejects queries that would scan a collection. Atlas tools need a service account, and MongoDB advises project roles, not Organization Owner.

Who can do what

  • A user of its own. MongoDB recommends a dedicated database user with the built-in read role, and never credentials with write access, for production.
  • Read mode on Atlas. Set the organization's AI access mode to Read unless people need changes.
  • Keep it off the primary. Send heavy AI reads to a secondary or an analytics node, and set time limits.
  • Text in documents is untrusted. A support note or product description can contain instructions. Keep secrets out of reach.

When it doesn't work

  • The plugin can't connect. AI access is off for the Atlas organization. An owner turns it on.
  • ChatGPT can't reach your database. It's self-managed. Use Atlas, or the local server in another app.
  • A query is rejected. --indexCheck blocked a collection scan. Add an index, or narrow the query.
  • Atlas tools return errors. The service account doesn't have that permission. The server doesn't hide tools it can't use.

With a team: MongoDB in BlueNexus

In Claude or ChatGPT, each person connects with their own access. That suits one developer. In a growing company, backend engineers change the schema, analysts build dashboards on it, and on-call needs to know which queries will scan a collection before they ship.

BlueNexus is a shared AI workspace where people and AI agents work in the same projects, channels and tasks. The BlueNexus MongoDB connector, our own integration, has 18 tools, 12 that read and 6 that act, for searching collections, querying data and exploring schemas in any MongoDB database. Every change, and every post, waits for a person in Needs you.

Open Add a connector, search for MongoDB, click Connect and follow the steps.

Illustration of the BlueNexus app with example data.

At Sparrowhawk, a 45-person grocery delivery app in Nashville, Drew, the data analyst, asks the schema agent how many orders this week used a promo code, by city. The plan waits in Needs you.

The agent noticed promo codes are stored under two field names, and counted both. Fixing the field stays with the backend team.

Illustration of the BlueNexus app with example data.

For schemas, see how to find schema drift in MongoDB. For releases, see a MongoDB index review before every release.

Which way fits you

If you're on Atlas, ask an owner to turn on AI access in Read mode, then add MongoDB Atlas to Claude or ChatGPT. If you run MongoDB yourself, use the local server with --readOnly and a read-only user.

If the database is shared work, across backend, data and on-call, you'll get more from one shared space than from several private chats. That's what BlueNexus is built for, and you can sign up for BlueNexus to bring your team in.

Questions people ask about MongoDB and AI

Does MongoDB have an official MCP server?

Yes, two. The hosted Atlas MCP server, generally available since August 2026, works as a plugin in Claude and ChatGPT. The local MCP server, generally available since September 2025, runs on your computer and works with Atlas, Community and Enterprise.

How do I connect Claude to MongoDB?

On Atlas, an Organization Owner turns on AI access, then you add MongoDB Atlas in Claude's connectors and sign in. For self-managed MongoDB, run the local MCP server in Claude Desktop or Claude Code.

Can ChatGPT connect to MongoDB?

Yes, on Atlas, through the MongoDB Atlas plugin. MongoDB's docs say ChatGPT doesn't support self-managed MongoDB.

Can Claude delete data in MongoDB?

It depends. On Atlas, an owner sets the access mode to Read or Read and write, and the AI can't go beyond your role. Locally, start the server with --readOnly and use a read-only database user.

Is the MongoDB MCP server safe for production?

MongoDB recommends read-only access for production, a dedicated user with the read role, credentials in environment variables and private networking. Aggregation pipelines with $out or $merge write data, so the read role matters more than read-only tools.

Subscribe to our blog

Product insights, AI and product thinking delivered to your inbox.