How do I connect to Azure CosmosDB?
Set the `OCONNSTRING` environment variable to your CosmosDB connection string (including AccountEndpoint and AccountKey) and set `COSMOS_DATABASE_ID` to your database name.
@hendrickcastro
Basic information
A comprehensive **Model Context Protocol (MCP)** server for **Azure CosmosDB** database operations. This server provides 8 powerful tools for document database analysis, container discovery, and data querying through the MCP protocol.
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-cosmosdb": {
"command": "npx",
"args": [
"-y",
"hendrickcastro/MCPCosmosDB"
],
"env": {
"OCONNSTRING": "AccountEndpoint=https://your-cosmos-account.documents.azure.com:443/;AccountKey=your-account-key-here;",
"COSMOS_DATABASE_ID": "your-database-name"
}
}
}
}Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Mcp Cosmosdb Sql is a comprehensive Model Context Protocol (MCP) server for Azure CosmosDB database operations. It provides eight tools for document database analysis, container discovery, and data querying through the MCP protocol, targeting developers using MCP-compatible clients like Claude Desktop or Cursor IDE.
Install and configure by adding the server to your MCP client’s JSON configuration (e.g., claude_desktop_config.json) with the command npx -y hendrickcastro/MCPCosmosDB and environment variables OCONNSTRING and COSMOS_DATABASE_ID. Alternatively, clone the repository, run npm install && npm run build, and point the client to dist/server.js. Invoke any of the eight tools via the client’s MCP interface.
Set the `OCONNSTRING` environment variable to your CosmosDB connection string (including AccountEndpoint and AccountKey) and set `COSMOS_DATABASE_ID` to your database name.
Eight tools: `mcp_list_databases`, `mcp_list_containers`, `mcp_container_info`, `mcp_container_stats`, `mcp_execute_query`, `mcp_get_documents`, `mcp_get_document_by_id`, and `mcp_analyze_schema`.
Set `enable_cross_partition: true` in your query parameters, or increase the `COSMOS_ENABLE_CROSS_PARTITION_QUERY` environment variable.
Yes. Use the default emulator connection string (`AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/…`) and ensure the emulator is running on port 8081.
Set optional environment variables: `COSMOS_MAX_RETRY_ATTEMPTS` (default 9) and `COSMOS_MAX_RETRY_WAIT_TIME` in milliseconds (default 30000).

Access millions of official legal and regulatory source documents from 155+ jurisdictions via MCP. Lawstronaut supports AI agents with structured legal research, legal data, laws, regulations, cases, guidance, official s
The official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Comments