{
 "kind": "api",
 "slug": "mongodb",
 "path": "apis/mongodb/",
 "name": "MongoDB Atlas",
 "logo": "https://agentgid.com/media/avatars/mongodb.png",
 "maker": "MongoDB",
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Databases and backends",
   "apis/backend-db/"
  ]
 ],
 "lead": "A hosted database for app data.",
 "chips": [
  {
   "label": "Databases and backends",
   "path": "apis/backend-db/"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Connect my Node.js server to MongoDB Atlas with mongodb 7.8.0: read MONGODB_URI from .env, create one MongoClient for the whole app, add insert and find functions for the orders collection, and never send the connection string to the browser."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://www.mongodb.com"
  },
  {
   "label": "Pricing",
   "href": "https://www.mongodb.com/pricing"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/mongodb/node-mongodb-native"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free credits",
   "status": "cond",
   "sub": "One-time or needs a card",
   "quote": "Free $0/hour Explore Atlas Free forever For learning and exploring MongoDB in a cloud environment. 512MB of storage Shared RAM Shared vCPU Flex $0.011/hour Build a Prototype Up to $30/month",
   "note": "Free tier: 512MB storage, shared RAM and vCPU, up to 100 ops/second. As reported on the official pricing page, checked Oct 9, 2026.",
   "src": "https://www.mongodb.com/pricing"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": null,
   "quote": "\"license\":\"Apache-2.0\"",
   "note": "Allowed as a paying or free-tier Atlas customer under MongoDB's cloud terms; the drivers are Apache-2.0. Data: Opt-out, for data put into Atlas AI features only; the opt-out needs a payment method on file.",
   "src": "https://registry.npmjs.org/mongodb/latest"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key, server only",
   "status": "info",
   "sub": "Env var none fixed by the driver; MONGODB_URI is the common choice in your own .env",
   "quote": "After completing these steps, you have a connection string that contains your database username and password.",
   "note": "Connection string with a database user name and password (SCRAM); X.509 certificates and AWS IAM are also supported. The Atlas admin side uses service accounts or API keys.",
   "src": "https://www.mongodb.com/docs/drivers/node/current/get-started.md"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "info",
   "sub": "llms.txt · SDK",
   "quote": "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.",
   "note": " Our agent check: 3 of 6 (Nov 13, 2026).",
   "src": "https://www.mongodb.com/docs/mcp-server/overview.md"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 9, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What MongoDB Atlas does",
   "parts": [
    {
     "t": "prose",
     "text": "MongoDB Atlas is a database that MongoDB runs for you in the cloud. Your app stores records such as users, orders or chat messages as flexible documents, and finds them again with simple queries. There is a free cluster for learning and small projects; your server connects with an official code library and a connection address, not a web request per action."
    },
    {
     "t": "list",
     "items": [
      "MongoDB Atlas is one of 29 APIs in the Databases and backends category on AgentGid.",
      "Its cheapest paid plan ($9 a month) is the 5th cheapest of the 18 here with a monthly plan.",
      "It is one of 26 that can be started for free.",
      "8 of them ship an official MCP server; MongoDB Atlas does not.",
      "Its official SDK is the 1st most downloaded in the category (40.9M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Store users and orders for a web app",
       "text": "Keep sign-ups, profiles and orders in one hosted database that your server reads and writes, without running a database machine yourself.",
       "idea": false
      },
      {
       "title": "Look up one record by a field",
       "text": "Find a product, article or movie by its title or another field and show it on a page.",
       "idea": false
      },
      {
       "title": "Search by meaning for an AI assistant",
       "text": "Let a chatbot find the help articles or notes closest in meaning to a question, stored next to your other data.",
       "idea": false
      },
      {
       "title": "Let an AI assistant query your data",
       "text": "Connect Claude, VS Code or another AI tool to your database so you can ask questions about your data in plain words.",
       "idea": false
      },
      {
       "title": "Chat history for a support bot",
       "text": "Save each conversation as one document with its messages, so the bot can reload the thread when the customer returns.",
       "idea": true
      },
      {
       "title": "Product catalog with varied fields",
       "text": "Keep products whose details differ, like sizes for shoes and voltage for lamps, in one collection without changing a table layout.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "MongoDB Atlas popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "39.3M",
       "l": "SDK downloads a week",
       "d": "+15.9% on the 4-week average",
       "up": true
      },
      {
       "n": "606",
       "l": "public agent repos use its SDK"
      },
      {
       "n": "10.2K",
       "l": "GitHub stars, mongodb/node-mongodb-native"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "512MB storage, shared RAM and vCPU, up to 100 ops/second"
      },
      {
       "l": "Cheapest plan",
       "v": "$9 a month"
      },
      {
       "l": "Usage price",
       "v": "$0.08/hour for M10 dedicated cluster (starts at $56.94/month)"
      },
      {
       "l": "Plans",
       "v": "Added automatically: its SDK was in 107 of the public agent repos we sampled when it was added; integrations in CrewAI, LangChain, LlamaIndex. Prices read from the official pricing page."
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "1 hour of a Flex cluster (capped at $30 a month)",
       "$0.011"
      ],
      [
       "1 hour of the smallest dedicated cluster (from $56.94 a month)",
       "$0.08"
      ],
      [
       "1 hour of the free cluster",
       "$0"
      ]
     ]
    },
    {
     "t": "more",
     "items": [
      {
       "title": "Price history",
       "items": [
        "A year of the pricing page in the Internet Archive (13 months): the lowest monthly figure went from $9 (2025-10) to $9 (2026-10)."
       ]
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 9, 2026. Prices change: confirm before you buy.",
     "link": "mongodb.com/pricing",
     "href": "https://www.mongodb.com/pricing"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free",
       "v": "100 read and write operations per second",
       "src": "https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/"
      },
      {
       "l": "Free",
       "v": "0.5 GB of data",
       "src": "https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/"
      },
      {
       "l": "Free",
       "v": "10 GB in and 10 GB out per rolling seven days",
       "src": "https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/"
      },
      {
       "l": "Free",
       "v": "At most 500 connections; 100 databases and 500 collections",
       "src": "https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "mongodb.com/docs/atlas/reference/free-shared-limitations",
     "href": "https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "Connection string with a database user name and password (SCRAM); X.509 certificates and AWS IAM are also supported. The Atlas admin side uses service accounts or API keys."
      },
      {
       "l": "Environment variable",
       "v": "none fixed by the driver; MONGODB_URI is the common choice in your own .env",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "No, keep it on your server",
       "status": "no"
      },
      {
       "l": "Card at sign-up",
       "v": "No"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Create a MongoDB Atlas account, a free cluster and a database user, and load the sample data if you want to follow the docs. Read MONGODB_URI from .env on the server (kept out of git).",
      "Add your server's IP address to the project's IP access list in Network Access. Retry the connection; MongoServerSelectionError should go away.",
      "Decide whether MongoDB may use data you put into its AI features; the opt-out is in account settings and needs a payment method. Nothing in code; note the choice in the project README."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "Atlas is a paid cloud service with a free tier; using it in a commercial app is normal and is covered by MongoDB's cloud terms. The official drivers are open source under the Apache 2.0 license."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "With conditions",
       "status": "cond",
       "sub": "Allowed as a paying or free-tier Atlas customer under MongoDB's cloud terms; the drivers are Apache-2.0.",
       "quote": "\"license\":\"Apache-2.0\"",
       "src": "https://registry.npmjs.org/mongodb/latest"
      },
      {
       "l": "To train your own AI",
       "v": "No",
       "status": "no",
       "sub": "You may not use Atlas AI features to develop or train an AI model.",
       "quote": "You will not use the AI Features to develop or train any AI model.",
       "src": "https://www.mongodb.com/legal/terms-and-conditions/cloud"
      },
      {
       "l": "inside-app-bundle",
       "v": "With conditions",
       "status": "cond",
       "sub": "Shipping the Apache-2.0 driver in your server app is allowed with its license notice; the database itself stays in Atlas.",
       "quote": "\"license\":\"Apache-2.0\"",
       "src": "https://registry.npmjs.org/mongodb/latest"
      },
      {
       "l": "Trains on what you send",
       "v": "Opt-out, for data put into Atlas AI features only; the opt-out needs a payment method on file.",
       "quote": "You own any data that you input into AI Features, and we will not use that data to train any model if you opt out.",
       "src": "https://www.mongodb.com/legal/terms-and-conditions/cloud"
      },
      {
       "l": "Where data is stored",
       "v": "You choose the cloud provider (AWS, Google Cloud, Azure) and region for each cluster.",
       "quote": "The choice of cloud provider and region affects network latency for clients accessing your cluster and the cost of running the cluster.",
       "src": "https://www.mongodb.com/docs/atlas/cloud-providers-regions.md"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "MongoServerSelectionError",
       "v": "The driver cannot reach the cluster, often because your IP is not on the access list or a firewall blocks port 27017.",
       "sub": "Add your server's IP in Network Access and check the firewall; for ECONNREFUSED on Node 17+ try family 4."
      },
      {
       "l": "MongoServerError: bad auth : authentication failed",
       "v": "Wrong user name or password, or special characters not encoded in the connection string.",
       "sub": "Check the user in Atlas Database Access and percent-encode the password."
      },
      {
       "l": "WriteError (duplicate _id)",
       "v": "You inserted a document with an _id that already exists.",
       "sub": "Let the driver generate _id values, or check for an existing document first."
      },
      {
       "l": "timed out while checking out a connection from connection pool",
       "v": "All connections in the pool are busy or the network is slow.",
       "sub": "Reuse one client, raise maxPoolSize carefully, or set connectTimeoutMS above your network latency."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "3 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page no, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "MongoDB MCP Server (local, or Atlas Managed MCP Server)",
       "sub": "npx mongodb-mcp-server@latest setup"
      },
      {
       "l": "npm",
       "v": "npm install mongodb",
       "code": true
      },
      {
       "l": "PyPI",
       "v": "pip install pymongo",
       "code": true
      }
     ]
    },
    {
     "t": "h3",
     "text": "Instructions in its docs to check first"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "The docs say",
       "v": "“npx mongodb-mcp-server@latest setup”",
       "sub": "Ask the person first; it runs an unpinned package and writes a config with database credentials. Pin a version and turn on read-only mode."
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "MongoDB Atlas",
       "me": true,
       "facts": [
        "from $0.08/hour",
        "Free tier"
       ]
      },
      {
       "name": "Neon",
       "why": "Pick Neon when you prefer a managed Postgres database with tables and SQL instead of documents.",
       "path": "apis/neon/",
       "facts": [
        "from $0.023 per GB-month Object",
        "Free tier",
        "Official MCP"
       ]
      },
      {
       "name": "Firebase",
       "why": "Pick Firebase when you want database, sign-in, hosting and serverless functions from one backend platform.",
       "path": "apis/firebase/",
       "facts": [
        "from $0.1/GB storage",
        "Free tier"
       ]
      },
      {
       "name": "Turso",
       "why": "Pick Turso when you want many small SQLite-compatible databases, for example one per user or per agent.",
       "path": "apis/turso/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      }
     ],
     "more": "All databases and backends APIs",
     "more_path": "apis/backend-db/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Connect my Node.js server to MongoDB Atlas with mongodb 7.8.0: read MONGODB_URI from .env, create one MongoClient for the whole app, add insert and find functions for the orders collection, and never send the connection string to the browser."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Create a free Atlas cluster, load the sample data and create a database user; save the user name and password somewhere safe.",
       "code": null,
       "src": "https://www.mongodb.com/docs/drivers/node/current/get-started.md"
      },
      {
       "text": "Install the official Node.js driver.",
       "code": "npm install mongodb@7.8",
       "src": "https://www.mongodb.com/docs/drivers/node/current/get-started.md"
      },
      {
       "text": "Copy the connection string from the Atlas Connect dialog, put in the password, and run a first query.",
       "code": "import { MongoClient } from 'mongodb';\nconst client = new MongoClient(uri);\nconst movie = await client.db('sample_mflix').collection('movies')\n  .findOne({ title: 'Back to the Future' });",
       "src": "https://www.mongodb.com/docs/drivers/node/current/get-started.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "import { MongoClient } from 'mongodb';\nasync function runGetStarted() {\n  const uri = '<connection string>';\n  const client = new MongoClient(uri);\n  try {\n    const movies = client.db('sample_mflix').collection('movies');\n    const movie = await movies.findOne({ title: 'Back to the Future' });\n    console.log(movie);\n  } finally {\n    await client.close();\n  }\n}\nrunGetStarted().catch(console.dir);",
       "intro": "Atlas has no plain web endpoint for data (the Data API ended); this is the driver quick start, comments trimmed."
      },
      {
       "tab": "Response",
       "code": "{\n  _id: ...,\n  plot: 'A young man is accidentally sent 30 years into the past...',\n  genres: [ 'Adventure', 'Comedy', 'Sci-Fi' ],\n  ...\n  title: 'Back to the Future',\n  ...\n}"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Calling the Atlas Data API (data/v1/action/insertOne with an apiKey header) from old tutorials.",
       "fix": "Use the official driver (mongodb for Node.js, pymongo for Python) from your server.",
       "why": "The Data API has reached end of life."
      },
      {
       "dont": "Following the guide's \"Node.js v16.20.1 or later\" and installing mongodb 7.8 on Node 16 or 18.",
       "fix": "Use Node.js 20.19 or newer for mongodb 7.x.",
       "why": "The 7.8.0 package declares Node >=20.19.0 in its engines field."
      },
      {
       "dont": "Pasting a password with @, :, / or ? straight into the connection string.",
       "fix": "Percent-encode the user name and password, for example with encodeURIComponent.",
       "why": "Unencoded special characters break the address and give \"bad auth\" errors."
      },
      {
       "dont": "Adding 0.0.0.0/0 to the access list to make a connection error go away.",
       "fix": "Add only your server's addresses, or a private connection on paid tiers.",
       "why": "0.0.0.0/0 lets anyone on the internet try to connect."
      },
      {
       "dont": "Creating a new MongoClient for every request in a busy server.",
       "fix": "Create one client when the app starts and reuse it; tune maxPoolSize if needed.",
       "why": "Each client opens its own pool of connections (default 100), and the free tier allows at most 500 connections."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Do I need a credit card for the free cluster?",
       "a": "No. The driver guide says the free Atlas deployment needs no credit card.",
       "evidence": {
        "url": "https://www.mongodb.com/docs/drivers/node/current/get-started.md",
        "quote": "You can create your own free (no credit card required) MongoDB Atlas deployment by following the steps in this guide."
       }
      },
      {
       "q": "Can my web page talk to Atlas directly with a plain web request?",
       "a": "Not anymore. The Data API that allowed it has reached end of life; use an official driver on your server.",
       "evidence": {
        "url": "https://www.mongodb.com/docs/atlas/app-services/data-api.md",
        "quote": "The Data API has reached its end-of-life status and is no longer actively supported by MongoDB."
       }
      },
      {
       "q": "What happens if my free cluster gets busy?",
       "a": "Above 100 operations per second Atlas slows the cluster down and queues the extra work.",
       "evidence": {
        "url": "https://www.mongodb.com/docs/atlas/reference/free-shared-limitations/",
        "quote": "Atlas handles clusters that exceed the operations per second rate limit as follows"
       }
      },
      {
       "q": "Where is my data stored?",
       "a": "In the cloud provider and region you pick when creating the cluster, on AWS, Google Cloud or Microsoft Azure.",
       "evidence": {
        "url": "https://www.mongodb.com/docs/atlas/cloud-providers-regions.md",
        "quote": "The region refers to the physical location of your MongoDB cluster."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "MongoDB"
  ],
  [
   "Category",
   "Databases and backends"
  ],
  [
   "Price",
   "from $0.08/hour"
  ],
  [
   "Plans from",
   "$9/mo"
  ],
  [
   "Official SDK",
   "npm mongodb, PyPI pymongo"
  ],
  [
   "Latest SDK",
   "7.8.0 on npm"
  ],
  [
   "Agent check",
   "3 of 6"
  ],
  [
   "Pricing checked",
   "Oct 9, 2026"
  ]
 ],
 "good": [
  "The free cluster has 512 MB of storage and allows 100 reads and writes per second; above that Atlas slows it down.",
  "Atlas pauses a free cluster after 30 days with no connections; export your data if you stop using it.",
  "Only addresses on your project's access list can connect. Allowing every address works but exposes the database."
 ],
 "checked_line": "Read by AgentGid from 22 official pages, card checked Nov 10, 2026; usage numbers update daily."
}