{"id":11208,"date":"2025-11-18T08:00:16","date_gmt":"2025-11-18T16:00:16","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=11208"},"modified":"2025-11-14T09:15:31","modified_gmt":"2025-11-14T17:15:31","slug":"introducing-the-azure-cosmos-db-mcp-toolkit-empowering-ai-agents-with-azure-cosmos-db-intelligence","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/introducing-the-azure-cosmos-db-mcp-toolkit-empowering-ai-agents-with-azure-cosmos-db-intelligence\/","title":{"rendered":"Introducing the Azure Cosmos DB MCP Toolkit: Empowering AI Agents with Azure Cosmos DB Intelligence"},"content":{"rendered":"<p>We&#8217;re excited to announce the <strong>Azure Cosmos DB MCP Toolkit<\/strong> in public preview. This open-source implementation of the Model Context Protocol (MCP) gives AI agents and LLMs direct, secure access to Azure Cosmos DB. The toolkit bridges intelligent applications and globally distributed databases, enabling AI agents to query, search, and understand data autonomously.<\/p>\n<p>The MCP Toolkit seamlessly integrates with <strong>Microsoft Foundry<\/strong>, a platform for building intelligent agents, AI workflows, and deploying AI models at scale. Developers can experiment, orchestrate, and manage AI applications from development to production.<\/p>\n<p><center><iframe title=\"Introducing the #AzureCosmosDB #MCP Toolkit (Public Preview) | AI Agents Meet Your Data #AI\" src=\"https:\/\/www.youtube.com\/embed\/DpnYQuEZIRI\" width=\"934\" height=\"526\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/center><\/p>\n<h2>What is the Model Context Protocol (MCP)?<\/h2>\n<p>The <strong>Model Context Protocol (MCP)<\/strong> is an open standard that enables AI applications to securely connect to external data sources and tools. Think of it as a universal adapter that lets AI models &#8220;see&#8221; and &#8220;use&#8221; databases, APIs, and services without hard-coded integrations.<\/p>\n<ul>\n<li>AI agents can discover available data sources<\/li>\n<li>Models can execute database operations through standardized tools<\/li>\n<li>Security is enforced at the protocol level<\/li>\n<li>Context flows seamlessly between your app, the AI model, and your data<\/li>\n<\/ul>\n<h2>Introducing the Azure Cosmos DB MCP Toolkit<\/h2>\n<p>The Azure Cosmos DB MCP Toolkit exposes Cosmos DB through MCP and provides 7 essential tools:<\/p>\n<ul>\n<li><strong>list_databases<\/strong> \u2013 Discover all databases in your Cosmos DB account<\/li>\n<li><strong>list_collections<\/strong> \u2013 Explore containers within a database<\/li>\n<li><strong>get_recent_documents<\/strong> \u2013 Retrieve the most recent documents (sorted by timestamp)<\/li>\n<li><strong>find_document_by_id<\/strong> \u2013 Look up specific documents by ID<\/li>\n<li><strong>text_search<\/strong> \u2013 Search documents by property values using CONTAINS<\/li>\n<li><strong>vector_search<\/strong> \u2013 Perform semantic search using vector embeddings<\/li>\n<li><strong>get_approximate_schema<\/strong> \u2013 Sample and infer the schema of a container<\/li>\n<\/ul>\n<h3>Enterprise-Ready Security<\/h3>\n<ul>\n<li>Microsoft Entra ID Authentication (OAuth 2.0)<\/li>\n<li>Role-Based Access Control (RBAC) with custom app roles<\/li>\n<li>Managed Identity Support for password-less access<\/li>\n<li>CORS configuration for secure web applications<\/li>\n<\/ul>\n<h2>Why Use the Azure Cosmos DB MCP Toolkit?<\/h2>\n<ul>\n<li><strong>Accelerate Development:<\/strong> Build AI agents in hours, not weeks, with pre-built MCP tools.<\/li>\n<li><strong>Highly Elastic:<\/strong> Cosmos DB automatically scales to meet workload demand.<\/li>\n<li><strong>Serverless at Low Cost:<\/strong> Build PoCs affordably with Azure Cosmos DB Serverless.<\/li>\n<li><strong>Security with RBAC:<\/strong> Enterprise-grade authentication with Microsoft Entra ID, RBAC, and managed identities.<\/li>\n<li><strong>Global Scale:<\/strong> Query data anywhere with single-digit millisecond latency.<\/li>\n<li><strong>Intelligent Search:<\/strong> Vector search enables RAG scenarios for semantic understanding.<\/li>\n<li><strong>Developer Friendly:<\/strong> Interactive web UI, logging, and integration with LangChain, Semantic Kernel, and other AI frameworks.<\/li>\n<\/ul>\n<h2>Getting Started<\/h2>\n<p>Follow the <a href=\"#\">Quick Start Guide \u2192<\/a> to deploy in minutes.<\/p>\n<h2>Real-World Use Cases<\/h2>\n<h3>1. AI-Powered Customer Support<\/h3>\n<p><strong>Scenario:<\/strong> Customer asks &#8220;What&#8217;s the status of my recent order?&#8221;<\/p>\n<p><strong>Agent Action:<\/strong><\/p>\n<ul>\n<li>Use <strong>find_document_by_id<\/strong> to retrieve order by customer ID<\/li>\n<li>Analyze order status and shipping information<\/li>\n<li>Provide personalized response with tracking details<\/li>\n<\/ul>\n<h3>2. Semantic Knowledge Base Search<\/h3>\n<p><strong>Scenario:<\/strong> User asks, &#8220;What are the troubleshooting steps for a premium subscription quota limit?&#8221;<\/p>\n<p><strong>Agent Action:<\/strong><\/p>\n<ul>\n<li>Use <strong>vector_search<\/strong> to find relevant documentation<\/li>\n<li>Retrieve top 3 semantically similar articles<\/li>\n<li>Synthesize answers from multiple sources<\/li>\n<\/ul>\n<h3>3. Data Exploration and Analytics<\/h3>\n<p><strong>Scenario:<\/strong> Business analyst asks &#8220;Show me the latest user signups&#8221;<\/p>\n<p><strong>Agent Action:<\/strong><\/p>\n<ul>\n<li>Use <strong>list_collections<\/strong> to find user data container<\/li>\n<li>Use <strong>get_recent_documents<\/strong> to sample recent signups<\/li>\n<li>Use <strong>text_search<\/strong> to filter by specific criteria<\/li>\n<li>Generate insights and visualizations<\/li>\n<\/ul>\n<h2>Key Features<\/h2>\n<h3>Vector Search for RAG<\/h3>\n<p>Build agents that understand context, not just keywords. <strong>vector_search<\/strong> automatically generates embeddings and finds semantically similar documents for knowledge bases, recommendation engines, and question-answering systems.<\/p>\n<h3>Schema Discovery<\/h3>\n<p><strong>get_approximate_schema<\/strong> samples documents and infers schemas automatically to help AI agents understand data without manual documentation.<\/p>\n<h3>Microsoft Foundry Integration<\/h3>\n<p>The MCP Toolkit integrates with <a href=\"https:\/\/aka.ms\/foundryagenttoolignite25\">Microsoft Foundry<\/a> to leverage Azure OpenAI embeddings for semantic search. LLM reasoning combines with Cosmos DB\u2019s global scale and low latency. Steps:<\/p>\n<ol>\n<li>Navigate to your Foundry project<\/li>\n<li>Go to Build \u2192 Create agent<\/li>\n<li>Select + Add in the tools section<\/li>\n<li>Select Catalog tab<\/li>\n<li>Choose Azure Cosmos DB and click Create<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/11\/Image.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-11227\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/11\/Image.png\" alt=\"Microsoft Foundry\" width=\"916\" height=\"524\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/11\/Image.png 916w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/11\/Image-300x172.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/11\/Image-768x439.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/a><\/p>\n<h3>Extending the Toolkit<\/h3>\n<p>Extend the <strong>CosmosDbToolsService<\/strong> class to add custom tools. Submit pull requests via our <a href=\"https:\/\/github.com\/AzureCosmosDB\/MCPToolKit?tab=readme-ov-file#contributing\">contribution guidelines<\/a>.<\/p>\n<h2>Learn More<\/h2>\n<ul>\n<li>Explore additional resources: <a href=\"#\">Full Documentation <\/a><\/li>\n<li>Star the Repo \u2192 <a href=\"https:\/\/github.com\/AzureCosmosDB\/MCPToolKit\">GitHub Repo<\/a><\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>The MCP Toolkit eliminates complexity in connecting AI agents to Cosmos DB. Focus on building intelligent applications, not integration code. Ideal for support bots, RAG knowledge bases, and data exploration agents.<\/p>\n<h3>About Azure Cosmos DB<\/h3>\n<p>Azure Cosmos DB is a fully managed, serverless NoSQL and vector database for modern app development, including AI applications. With SLA-backed speed and dynamic scalability, it supports high-performance distributed computing. To stay in the loop on Azure Cosmos DB updates, follow us on\u00a0<a href=\"https:\/\/twitter.com\/AzureCosmosDB\" target=\"_blank\" rel=\"noopener\">X<\/a>,\u00a0<a href=\"https:\/\/aka.ms\/AzureCosmosDBYouTube\" target=\"_blank\" rel=\"noopener\">YouTube<\/a>, and\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\" target=\"_blank\" rel=\"noopener\">LinkedIn<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re excited to announce the Azure Cosmos DB MCP Toolkit in public preview. This open-source implementation of the Model Context Protocol (MCP) gives AI agents and LLMs direct, secure access to Azure Cosmos DB. The toolkit bridges intelligent applications and globally distributed databases, enabling AI agents to query, search, and understand data autonomously. The MCP [&hellip;]<\/p>\n","protected":false},"author":80443,"featured_media":11318,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1610],"tags":[1236,499,1965,1872],"class_list":["post-11208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","tag-ai","tag-azure-cosmos-db","tag-mcp","tag-nosql"],"acf":[],"blog_post_summary":"<p>We&#8217;re excited to announce the Azure Cosmos DB MCP Toolkit in public preview. This open-source implementation of the Model Context Protocol (MCP) gives AI agents and LLMs direct, secure access to Azure Cosmos DB. The toolkit bridges intelligent applications and globally distributed databases, enabling AI agents to query, search, and understand data autonomously. The MCP [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/11208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/80443"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=11208"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/11208\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/11318"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=11208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=11208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=11208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}