Deploy MCP Server
Database Bearer Token

Azure Cosmos DB REST API

Globally distributed, multi-model database service REST API

Azure Cosmos DB is Microsoft's globally distributed, multi-model database service designed for mission-critical applications. The REST API provides programmatic access to manage databases, containers, documents, and perform CRUD operations across multiple consistency models. Developers use it to build highly responsive, always-on applications with automatic scaling and multi-region replication.

Base URL https://{account-name}.documents.azure.com

API Endpoints

MethodEndpointDescription
GET/dbsList all databases in the Cosmos DB account
POST/dbsCreate a new database
GET/dbs/{db-id}Get details of a specific database
DELETE/dbs/{db-id}Delete a database
GET/dbs/{db-id}/collsList all containers in a database
POST/dbs/{db-id}/collsCreate a new container with partition key configuration
GET/dbs/{db-id}/colls/{coll-id}Get container properties and metadata
DELETE/dbs/{db-id}/colls/{coll-id}Delete a container
GET/dbs/{db-id}/colls/{coll-id}/docsQuery documents in a container
POST/dbs/{db-id}/colls/{coll-id}/docsCreate a new document in a container
GET/dbs/{db-id}/colls/{coll-id}/docs/{doc-id}Retrieve a specific document by ID and partition key
PUT/dbs/{db-id}/colls/{coll-id}/docs/{doc-id}Replace an existing document
PATCH/dbs/{db-id}/colls/{coll-id}/docs/{doc-id}Partially update a document with patch operations
DELETE/dbs/{db-id}/colls/{coll-id}/docs/{doc-id}Delete a document from a container
POST/dbs/{db-id}/colls/{coll-id}/sprocs/{sproc-id}Execute a stored procedure

Code Examples

curl -X GET \
  'https://mycosmosaccount.documents.azure.com/dbs' \
  -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc...' \
  -H 'x-ms-date: Thu, 27 Apr 2024 00:00:00 GMT' \
  -H 'x-ms-version: 2018-12-31' \
  -H 'Content-Type: application/json'

Connect Azure Cosmos DB to AI

Deploy a Azure Cosmos DB MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Azure Cosmos DB through these tools:

cosmos_query_documents Execute SQL-like queries across Cosmos DB containers with support for cross-partition queries and aggregations
cosmos_create_document Create new documents in Cosmos DB containers with automatic partition key assignment and indexing
cosmos_update_document Update existing documents using PATCH operations for efficient partial updates without full document replacement
cosmos_manage_containers Create, configure, and manage Cosmos DB containers including partition key strategies and throughput settings
cosmos_execute_sproc Execute stored procedures for server-side transaction processing and complex business logic within Cosmos DB

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy Azure Cosmos DB MCP Server →

Related APIs