MCP server for Azure Cosmos DB
by abhirockzz
This is a sample implementation of a MCP server for Cosmos DB built using its Go SDK. It exposes tools for interacting with Azure Cosmos DB, such as listing databases and containers, reading metadata, creating containers, adding items, reading items, and executing queries.
Last updated: N/A
What is MCP server for Azure Cosmos DB?
This is an MCP (Model Context Protocol) server for Azure Cosmos DB, implemented using the Go SDK. It provides a standardized interface for interacting with Cosmos DB resources.
How to use MCP server for Azure Cosmos DB?
To use the server, clone the repository, build the Go application, and configure the MCP server with your Cosmos DB credentials (either using Azure CLI login or by setting the COSMOSDB_ACCOUNT_KEY environment variable). Then, use an MCP-compatible tool like VS Code Insiders in Agent Mode or Claude Desktop to interact with the server.
Key features of MCP server for Azure Cosmos DB
List Databases
List Containers
Read Container Metadata
Create Container
Add Item to Container
Read Item
Execute Query
Use cases of MCP server for Azure Cosmos DB
Managing Cosmos DB resources through a standardized interface.
Automating database operations using MCP-compatible tools.
Integrating Cosmos DB with other systems via the MCP protocol.
Simplifying Cosmos DB administration tasks.
FAQ from MCP server for Azure Cosmos DB
What is MCP?
What is MCP?
MCP stands for Model Context Protocol, a protocol for communication between tools and services.
What Azure RBAC permissions are required?
What Azure RBAC permissions are required?
The user principal needs control and data plane permissions to execute CRUD operations on databases, containers, and items.
How do I authenticate?
How do I authenticate?
You can authenticate using local Azure CLI credentials or by setting the COSMOSDB_ACCOUNT_KEY environment variable.
What tools can I use with this MCP server?
What tools can I use with this MCP server?
You can use any MCP-compatible tool, such as VS Code Insiders in Agent Mode or Claude Desktop.
How can I test the server locally?
How can I test the server locally?
You can use the MCP inspector tool: npx @modelcontextprotocol/inspector ./mcp_azure_cosmosdb