Connect to AI
Databases API Key

MongoDB Atlas REST API

Document database with flexible schemas and JSON storage

MongoDB Atlas is a multi-cloud database service that provides a flexible document data model with JSON-like documents. Developers use it for applications requiring flexible schemas, horizontal scaling, and complex data structures. The Atlas Data API enables HTTP access to MongoDB collections without database drivers.

Base URL https://data.mongodb-api.com/app/{app-id}/endpoint/data/v1

API Endpoints

MethodEndpointDescription
POST/action/findOneFind a single document in a collection matching the specified filter
POST/action/findFind multiple documents in a collection with optional filtering, sorting, and projection
POST/action/insertOneInsert a single document into a collection and return the inserted ID
POST/action/insertManyInsert multiple documents into a collection in a single operation
POST/action/updateOneUpdate a single document matching the filter with the specified update operations
POST/action/updateManyUpdate all documents matching the filter with the specified update operations
POST/action/deleteOneDelete a single document from a collection that matches the specified filter
POST/action/deleteManyDelete all documents from a collection that match the specified filter
POST/action/aggregateRun an aggregation pipeline to transform and analyze documents in a collection
GET/clustersList all MongoDB clusters in your Atlas organization
GET/clusters/{cluster-name}Get detailed information about a specific MongoDB cluster
POST/clustersCreate a new MongoDB cluster with specified configuration
GET/databasesList all databases in a MongoDB cluster
GET/databases/{database}/collectionsList all collections in a specific database
POST/action/replaceOneReplace a single document in a collection with a new document

Code Examples

curl -X POST 'https://data.mongodb-api.com/app/data-abcde/endpoint/data/v1/action/findOne' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY' \
  -d '{
    "dataSource": "Cluster0",
    "database": "sample_mflix",
    "collection": "movies",
    "filter": { "title": "The Shawshank Redemption" }
  }'

Use MongoDB Atlas from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for MongoDB Atlas. Paste your MongoDB Atlas API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls MongoDB Atlas directly with your credentials — no local install, works on mobile.

mongodb_find_documents Query MongoDB collections using natural language filters and return matching documents with automatic schema detection
mongodb_insert_data Insert documents into MongoDB collections from structured data or AI-generated content with validation
mongodb_aggregate_analytics Run complex aggregation pipelines to analyze data, compute statistics, and generate insights from MongoDB collections
mongodb_update_records Update documents in MongoDB based on conditions with support for atomic operations and field modifications
mongodb_schema_analyzer Analyze collection schemas, detect data patterns, and suggest optimal indexes for query performance

Connect in 60 seconds

Paste your MongoDB Atlas key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect MongoDB Atlas to your AI →

Related APIs