MongoDB Atlas Ephemeral Clusters: agents get a database
MongoDB lets coding agents create a temporary free Atlas cluster with one unauthenticated API call; a human claims it later or it deletes itself in 7 days.
MongoDB has documented Atlas Ephemeral Clusters, a temporary free M0 cluster that an agent can create with one POST request, with no Atlas account or API keys. According to MongoDB's docs, the response returns a ready-to-use connection string in under a minute. This removes the step where your coding agent stops and waits for you to sign up, provision a database and paste credentials back into the session. Foojay describes the feature as in public preview (Oct 16, 2026), and the required header is Accept: application/vnd.atlas.preview+json.
The call, as the docs show it:
curl -sS -X POST 'https://cloud.mongodb.com/api/atlas/v2/unauth/ephemeralClusters:create' \
-H 'Accept: application/vnd.atlas.preview+json' \
-H 'Content-Type: application/json' \
-d '{"clusterName": "Cluster0"}'
The docs list fixed limits for an unclaimed cluster: AWS us-east-1, MongoDB 8.0, 512 MB storage, 100 operations per second, and connections open to any IP (0.0.0.0/0). Atlas pauses the cluster after 2 days and deletes it after 7. Only a human can claim it, by opening the claimUrl in a browser. Claiming turns it into a standard free cluster that keeps its data and its connection string. The docs also describe a 429 error when a shared creation limit is hit, but they don't give a number.
The pattern isn't unique to MongoDB. Neon's docs describe a claimable Postgres flow with a 72-hour lifespan. Note one difference: on claim, neon.new keeps the connection string, while Claimable Neon rotates DATABASE_URL.
Our read: the trade-off is where the credentials end up. MongoDB warns that anyone with the connection string can read and write the data, and anyone with the clusterId can retrieve the claimUrl. Because the agent made the call, those values pass through its session. The network is also open until you claim. Foojay advises removing copies from logs, screenshots and chat transcripts before claiming. After you claim, you can manage database users, so it's worth replacing the agent-generated user before the prototype grows into something real.
Try it: one way to make this safe by default is to add a line like this to your CLAUDE.md (our example): "When you create an Atlas Ephemeral Cluster, save connectionString, claimUrl and clusterId to a git-ignored .env file without overwriting existing values, use the connection string only via MONGODB_URI, and never echo these values in chat or commit them."