calendar Last updated: 20 November 2026
How to connect MongoDB to ChatGPT
How to's

How to Connect MongoDB to ChatGPT (2 Steps, No Code)

Try It Free

Connect your data in 1 min. Free forever plan

Got insights from this post? Give it a boost by sharing with others!

To connect MongoDB to ChatGPT, add your MongoDB collection to Windsor.ai with your database details, then install the Windsor.ai plugin in ChatGPT. You can then ask about the collection in plain language, and ChatGPT answers from the data Windsor.ai returns. You don’t write queries or run mongoexport first.

MongoDB also has its own plugin in ChatGPT, called MongoDB Atlas, for databases hosted on MongoDB Atlas.

🚀 Connect MongoDB to ChatGPT with Windsor.ai. Start free → onboard.windsor.ai/app/mongodb

Once the collection is connected, you can ask questions such as:

  • How many orders in my orders collection had each status this month?
  • How many signups did my users collection get in each of the last four weeks?
  • Which event types grew in my events collection in the last 7 days compared with the 7 days before?
  • What is my blended ROAS this month, using order revenue from MongoDB and spend from Google Ads and Meta Ads?

Questions that cover more than 30 days, or that combine MongoDB with Google Ads and Meta Ads after the first 30 days, need a paid plan.

Watch: add Windsor.ai to ChatGPT

Ways to connect MongoDB to ChatGPT

MongoDB data reaches ChatGPT through MongoDB’s own Atlas plugin, a third-party plugin such as Windsor.ai, a JSON or CSV export, or your own code.

  • MongoDB Atlas plugin: MongoDB announced its plugin in ChatGPT in August 2026 (MongoDB press release), and it is in ChatGPT’s plugin directory as MongoDB Atlas (checked 20 November 2026). It works with databases on MongoDB Atlas only, not with self-managed MongoDB.

    The plugin’s listing describes read and write tools, from queries and aggregations to inserting, updating and deleting documents and managing Atlas clusters and database users. AI client access is off by default for existing Atlas organizations, so an organization owner may need to turn it on and choose Read, Read and write, or Disabled. In Read mode the plugin can find, aggregate and count documents, list collections and inspect their schema (MongoDB docs). It fits developers and data teams who work on Atlas and want ChatGPT to query any collection they can access.

    MongoDB Atlas plugin page in ChatGPT
  • Windsor.ai plugin: install it from ChatGPT’s plugin directory and sign in. You add each MongoDB collection in Windsor.ai once, with your host, port, user, password, database and collection name. MongoDB is read-only through Windsor.ai (write actions list). You can also connect Google Ads, GA4, Meta Ads and the rest of Windsor.ai’s 350+ sources to the same plugin and ask about them in one chat. It fits marketing and business teams who want answers from a few collections next to their ad and analytics data.

  • Other third-party connectors: other services also connect MongoDB to ChatGPT, for example CData Connect AI, which turns your ChatGPT questions into SQL queries on your MongoDB data. Compare the access they ask for (read-only or not), the other sources they carry and the price before you choose.
  • Export: export the documents to a JSON or CSV file with mongoexport or MongoDB Compass, then upload the file to a chat. It fits one question about a fixed set of documents. The file does not update, and a new question about other documents needs a new export.
  • Your own code: build your own connection, for example a GPT Action that calls your own API, which queries MongoDB, or your own MCP server. It gives full control but needs engineering work and upkeep.

Steps to connect MongoDB to ChatGPT with Windsor.ai

Connecting MongoDB to ChatGPT with Windsor.ai takes two steps. First add your MongoDB collection to Windsor.ai, then add the Windsor.ai plugin in ChatGPT.

Windsor.ai’s documentation has the ChatGPT setup too: how to add Windsor.ai to ChatGPT. For a short overview with more prompt ideas, see the MongoDB to ChatGPT integration page.

Prerequisites

  • A dedicated database user with read access. Create a MongoDB user for Windsor.ai with the built-in read role on the target database. You can create the user in that database or in the admin database. Windsor.ai reads only what that user can see.
  • Your connection details: host (including the protocol), port (not needed with a mongodb+srv:// host), user, password, database and collection name.
  • Network access for Windsor.ai. If your database limits access by IP address (on Atlas, the IP access list), allow Windsor.ai’s IP address. The connect screen shows it (94.130.231.239 on 20 November 2026).
  • A ChatGPT account. The Windsor.ai plugin is in ChatGPT’s plugin directory.
  • A Windsor.ai account. The free forever plan needs no credit card and covers one data source, one account and 30 days of history. For the first 30 days you can connect up to 10 sources. To keep MongoDB and your ad or analytics sources connected after that, paid plans start at 19 USD a month for 3 sources (Basic) or 99 USD a month for 7 (Standard), billed annually (pricing).

Step 1. Add your MongoDB collection to Windsor.ai

  1. Open onboard.windsor.ai/app/mongodb and sign in to Windsor.ai, or create a free account.
  2. If your database limits access by IP, allow Windsor.ai’s IP address, 94.130.231.239, to reach it. The connect screen shows the address under “Instructions to grant access”.
  3. On the connect screen, fill in:
    • Host: your database server, including the protocol. The form’s example is mongodb+srv://cluster.mongodb.net/.
    • Port: with a mongodb+srv:// host, leave Port empty. An SRV host finds the cluster’s servers and ports through DNS, and MongoDB’s SRV format takes one host and no port (MongoDB connection string docs). With a mongodb:// host, enter its port. The form’s example is 27017. If the form does not save without a port, use Atlas’s standard mongodb:// host instead of the SRV one, with port 27017.
    • User and Password: the database user from the prerequisites.
    • Database and Collection: the collection you want ChatGPT to read.
  4. Select Add Account. The connection appears in the list under the form.

Each connection covers one collection. To let ChatGPT read another collection from the same database, fill in the form again with its name. Collections in one database count as one account on your plan.

Windsor.ai form to connect a MongoDB collection with host, port, user, password, database and collection

Step 2. Add the Windsor.ai plugin in ChatGPT

  1. In ChatGPT, select Plugins in the sidebar and search for Windsor.ai, or open the Windsor.ai plugin page.
  2. Select Install plugin (if it is already installed, you see Try in chat) and sign in with the same Windsor.ai account you used in step 1.
  3. In a chat, pick Windsor.ai from the + menu or type @Windsor.ai, then ask your first question.
Windsor.ai plugin page in ChatGPT

Start with a question that confirms the connection and shows the fields ChatGPT can use:

@Windsor.ai Which fields can you read from my MongoDB collection through Windsor.ai?

The answer should list the fields of your collection. On other databases, Windsor.ai also adds a few fields of its own, such as today’s date.

How to ask about MongoDB collections in ChatGPT

Prompts about MongoDB work best when they name the collection, the date field and the fields you mean.

  • Name the date field. A collection can have several dates (createdAt, paidAt, updatedAt). Write “using createdAt as the date” in the prompt. Windsor.ai filters by date only when the request names a date field.
  • Give the period. On the free forever plan, a date-based question can reach back 30 days at most. A quarter, 12 months or year over year needs a paid plan.
  • Say what a field means. ChatGPT gets the field names and values but not what a field includes. If total includes tax or refunds in your documents, say so in the prompt.
  • Ask about nested fields directly. Nested documents and arrays in your collection can be queried directly in ChatGPT through Windsor.ai. Name the field you mean, for example the city in a customer’s address.
  • Start small on large collections. Filter by a field or a date, limit how many documents you ask for, or ask for counts and a summary first. A large scan can time out (see “Large collections” below).

Prompts to try with MongoDB data in ChatGPT

Replace the collection and field names with your own in these MongoDB prompts. ChatGPT adds up the data Windsor.ai returns. In our Snowflake and Google Sheets tests on 19 November 2026, ChatGPT added the rows correctly when the prompt told it to use code. We have not run this test on MongoDB, so check a total against your own query the first time you use a collection.

Orders by status

@Windsor.ai From my orders collection, count the orders and add up the total field by status for orders created in the last 30 days, using createdAt as the date. Do the sums with code.

Signups per week

@Windsor.ai From my users collection, count signups for the last 28 days, using createdAt as the date, split into four 7-day periods, and flag any period more than 30% below the average. Do the counts with code.

Week-over-week change by event type

@Windsor.ai From my events collection, compare the number of events by type for the last 7 days against the 7 days before, using timestamp as the date. Sort by the largest increase.

Data quality check

@Windsor.ai From my orders collection, count the documents per day for the last 30 days, using createdAt as the date, and list the days with no documents or fewer than half the daily average. Do the counts with code.

Blending MongoDB with other sources in ChatGPT

MongoDB often holds data that ad platforms do not have, such as orders and signups from your own app. With MongoDB and an ad source connected to the same Windsor.ai account, ChatGPT can put them side by side in one answer. ChatGPT matches them on a shared field, such as the date or the campaign name.

@Windsor.ai For the last 30 days, take daily revenue from my MongoDB orders collection, using createdAt as the date, and daily spend from Google Ads and Meta Ads. Show total spend, total revenue and blended ROAS (revenue divided by total spend) per day. Do the sums with code.

Keeping MongoDB and two ad sources connected after the first 30 days needs the Basic plan (3 sources) or higher. Related guides: how to connect Google Ads to ChatGPT, how to connect GA4 to ChatGPT and, for other databases, how to connect PostgreSQL to ChatGPT and how to connect BigQuery to ChatGPT.

How the Windsor.ai plugin works with MongoDB and ChatGPT

When you ask a question, ChatGPT asks the Windsor.ai plugin for the collection, fields, date range and filters it needs. Windsor.ai reads the collection in MongoDB and returns the data, and ChatGPT answers from the result, as text, a table or a summary. ChatGPT does not send queries to your database.

  • Read only: ChatGPT cannot insert, update or delete documents through the Windsor.ai plugin, because Windsor.ai has no write actions for MongoDB (write actions list).
  • Cache: Windsor.ai keeps query results for 6 hours. If a collection changed in the last few hours, the same question can return the earlier result.
  • Access: Windsor.ai reads only the collections you add in step 1, with the privileges of the database user you entered. You enter the password in Windsor.ai, not in the chat. The password stays with Windsor.ai, and ChatGPT never gets it or a direct connection to your database. To end the access, remove the connection in Windsor.ai, or drop the database user.
  • Large collections: there is no MongoDB-specific document limit, but a request that runs longer than about 3 minutes can time out. A short period or a filter on a field such as status keeps a request small.

If something does not work

  • The connection fails: check the host, port, database name, user and password, and that your firewall or Atlas IP access list allows Windsor.ai’s IP address.
  • ChatGPT says it cannot find MongoDB: check that you signed in to the same Windsor.ai account in ChatGPT and in step 1, and that the MongoDB connection shows in the list under the form on the MongoDB connect screen in Windsor.ai.
  • ChatGPT returns no documents: check that the database user can read the collection, that the period in your prompt has data in the date field you named, and, on the free forever plan, that the period is within the last 30 days.
  • Numbers differ from your own query: check that the prompt and your query use the same date field, period and filters, that the prompt asked ChatGPT to do the sums with code, and that the collection did not change within the 6-hour cache window.

Conclusion

The Windsor.ai plugin gives ChatGPT read access to your MongoDB collections in two steps, and you can add Google Ads, GA4 or Meta Ads to the same chat for blended reports. If your database is on MongoDB Atlas and you want ChatGPT to query any collection your Atlas user can access, MongoDB’s Atlas plugin is another route.

For the same setup in another assistant, see the MongoDB to Claude integration page. Other ChatGPT sources are on the ChatGPT integrations hub.

🚀 Connect MongoDB to ChatGPT with Windsor.ai. Free forever plan, no credit card → onboard.windsor.ai/app/mongodb

FAQs

Do I need to write code or queries to ask ChatGPT about MongoDB data?

No. You ask in plain language and name the collection and fields you mean. Windsor.ai reads the documents, and ChatGPT writes the answer. Knowing your collection and field names helps more than knowing the MongoDB query language.

Tired of juggling fragmented data? Get started with Windsor.ai today to create a single source of truth

Let us help you automate data integration and AI-driven insights, so you can focus on what matters, growth strategy.
g logo
fb logo
big query data
youtube logo
power logo
looker logo