Go-based MCP server for Azure Cosmos DB

Go-based MCP server for Azure Cosmos DB

mcp_cosmosdb_go•byabhirockzz

An MCP server built with the Azure SDK for Go and the MCP Go SDK that exposes tools for interacting with Azure Cosmos DB.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Lists databases and containers in a Cosmos DB account.
  • •Creates databases and containers, including partition key configuration.
  • •Adds and reads items, and executes SQL queries on containers with optional partition key scoping.
  • •Supports batch creation of multiple items using transactional batch operations and reading container metadata.

BEST FOR

  • •Developers who want an AI tool to perform CRUD operations on Azure Cosmos DB databases, containers, and items.
  • •Users of MCP-compatible tools like GitHub Copilot CLI, Visual Studio Code Agent Mode, or Claude Code that need Cosmos DB access.
  • •Learning how to combine the Azure Go SDK and MCP Go SDK to build AI tooling for Azure Cosmos DB.

ABOUT MCP_COSMOSDB_GO

Go-based MCP server for Azure Cosmos DB is cataloged as an MCP server attributed to abhirockzz. An MCP server built with the Azure SDK for Go and the MCP Go SDK that exposes tools for interacting with Azure Cosmos DB. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Go-based MCP server for Azure Cosmos DB are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which transports does the MCP server support?

It supports both Streamable HTTP and Stdio transports, and can run locally as an HTTP server or stdio process, or be deployed to a remote endpoint.

How does the server authenticate with Azure Cosmos DB?

It uses the DefaultAzureCredential from the Azure SDK for Go, supporting environment variables, managed identity, or Azure CLI login. The local emulator uses key-based authentication instead.

Is this intended to replace the Azure MCP Server or Azure Cosmos DB MCP Toolkit?

No. It is described as an experimental learning tool demonstrating how to combine the Azure Go SDK and MCP Go SDK, not a replacement for those projects.

Upstream README

View this exact version on GitHub

README.md · ff774e86f9ef · Fetched 2026-11-13 10:29:41 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Go based implementation of an MCP server for Azure Cosmos DB

This is a Go based implementation of an MCP server for Azure Cosmos DB using the Azure SDK for Go and the official MCP Go SDK.

It works with the Azure Cosmos DB service and the vNext emulator, and exposes the following tools for interacting with Azure Cosmos DB:

  1. List Databases: Retrieve a list of all databases in a Cosmos DB account.
  2. Create Database: Create a new database in the Cosmos DB account.
  3. List Containers: Retrieve a list of all containers in a specific database.
  4. Read Container Metadata: Fetch metadata or configuration details of a specific container.
  5. Create Container: Create a new container in a specified database with a defined partition key.
  6. Add Item to Container: Add a new item to a specified container in a database.
  7. Read Item: Read a specific item from a container using its ID and partition key.
  8. Execute Query: Execute a SQL query on a Cosmos DB container with optional partition key scoping.
  9. Batch Create Items: Add multiple items to a container using Transactional Batch operation.

⚠️ This project is not intended to replace the Azure MCP Server or Azure Cosmos DB MCP Toolkit. Rather, it serves as an experimental learning tool that demonstrates how to combine the Azure Go SDK and MCP Go SDK to build AI tooling for Azure Cosmos DB.

▶️ Here is a demo using GitHub Copilot CLI, but same would work with Agent Mode in Visual Studio Code, or any other MCP compatible tool (Claude Code, etc.):

MCP server demo

🚀 How to Run

To start with, clone the GitHub repo and build the binary:

git clone https://github.com/abhirockzz/mcp_cosmosdb_go
cd mcp_cosmosdb_go

go build -o mcp_azure_cosmosdb_go main.go

Note: The MCP server uses the DefaultAzureCredential implementation from the Azure SDK for Go to authenticate with Azure Cosmos DB. This means that you can authenticate using various methods, including environment variables, managed identity, or Azure CLI login, among others.

This ^ is not applicable to the local emulator since it uses a well known key-based authentication.

This MCP server supports both Streamable HTTP and Stdio transports. You can run the MCP server in two modes:

  • Locally on your machine as an HTTP server, or stdio process
  • Deployed to a remote endpoint (like Azure App Service, Azure Container Apps, etc.) as an HTTP(s) server

💻 Local mode

Thanks to Streamable HTTP support, you can easily run this MCP server as an HTTP server locally on your machine.

Login using Azure CLI (az login), or the Azure Developer CLI (azd auth login). Since the MCP server uses DefaultAzureCredential, it will authenticate as the identity logged in to the Azure CLI or the Azure Developer CLI.

The user principal (identity) you are logged in with should have permissions (control and data plane) to execute CRUD operations on database, container, and items.

🌐 HTTP server

Start the server:

export COSMOSDB_MCP_SERVER_MODE=http
./mcp_azure_cosmosdb_go

This will start the server on port 9090 by default. You can change the port by setting the PORT environment variable.

How you configure the MCP server will differ based on the MCP client/tool you use. For VS Code you can follow these instructions on how to configure this server using a mcp.json file.

Here is an example of the mcp.json configuration for the HTTP server:

{
  "servers": {
    "mcp_azure_cosmosdb_go_http": {
      "type": "http",
      "url": "http://localhost:9090"
    }
  }
  //other MCP servers...
}

Change the port if you have configured a different one.

🖥️ Stdio server

Here is an example of the mcp.json configuration for the stdio mode:

{
  "servers": {
    "mcp_azure_cosmosdb_go_stdio": {
      "type": "stdio",
      "command": "./mcp_azure_cosmosdb_go"
    }
  }
  //other MCP servers...
}

Once you have configured the MCP server in your tool, you can start using it to interact with Azure Cosmos DB (just like in the demo shown above). For other tools like Claude Code, Claude Desktop, etc., refer to their respective documentation on how to configure an MCP HTTP/stdio server.

Large Language Models (LLMs) are non-deterministic by nature and can make mistakes. Always validate the results and queries before making any decisions based on them.

For both the cases, if you want to use the vNext emulator, make sure its already running on your machine - docker run -p 8081:8081 -p 1234:1234 mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview

☁️ Remote endpoint

You can also deploy this MCP server to any cloud service (like Azure App Service, Azure Container Apps, etc.) and expose it as an HTTP(s) endpoint. The Azure service should support Managed Identity, and the MCP server will automatically pick up the credentials using the DefaultAzureCredential implementation.

⛔️ This execution mode is not recommended. Use this only for testing purposes. This is because, although MCP server can access Azure Cosmos DB securely using Managed Identity, it does not authenticate (or authorize) clients yet - anyone who can access the endpoint can execute operations on your Cosmos DB account.

🧪 Local dev and testing

Use MCP inspector - make mcp_inspector

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Go-based MCP server for Azure Cosmos DB from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp_cosmosdb_go)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage