{"id":12056,"date":"2026-03-17T10:03:09","date_gmt":"2026-03-17T17:03:09","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=12056"},"modified":"2026-03-19T08:55:09","modified_gmt":"2026-03-19T15:55:09","slug":"introducing-the-azure-cosmos-db-plugin-for-cursor","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/introducing-the-azure-cosmos-db-plugin-for-cursor\/","title":{"rendered":"Introducing the Azure Cosmos DB Plugin for Cursor"},"content":{"rendered":"<p>We&#8217;re excited to announce the <a href=\"https:\/\/cursor.com\/marketplace\/azure-cosmos-db\">Cursor plugin for Azure Cosmos DB<\/a> bringing AI-powered database expertise, best practices guidance, and live database connectivity directly into your coding workflow.<\/p>\n<p>Whether you&#8217;re designing a new data model, optimizing queries, or building a RAG application with vector search, the Cursor plugin gives your AI assistant deep knowledge of Azure Cosmos DB so you can write better code, faster.<\/p>\n<p><center><iframe src=\"\/\/www.youtube.com\/embed\/iOW55XE109M\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><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><strong>What&#8217;s in the Plugin<\/strong><\/h2>\n<p>The Azure Cosmos DB plugin bundles three capabilities:<\/p>\n<table style=\"width: 98.7926%;\" width=\"569\">\n<thead>\n<tr>\n<td style=\"width: 18.8277%;\"><strong>Component<\/strong><\/td>\n<td style=\"width: 53.8188%;\"><strong>What it does<\/strong><\/td>\n<td style=\"width: 160.775%;\"><strong>Setup required?<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 18.8277%;\"><strong>Rules<\/strong><\/td>\n<td style=\"width: 53.8188%;\"><strong>10 best-practice rule sets that guide the AI when writing Cosmos DB code<\/strong><\/td>\n<td style=\"width: 160.775%;\"><strong>None works immediately<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 18.8277%;\"><strong>MCP Server<\/strong><\/td>\n<td style=\"width: 53.8188%;\">Live connection to your Cosmos DB account for querying data, discovering schemas, and running vector searches<\/td>\n<td style=\"width: 160.775%;\">Requires deployed MCP Toolkit<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 18.8277%;\"><strong>Saved Prompt<\/strong><\/td>\n<td style=\"width: 53.8188%;\">A one-click prompt to regenerate rules when upstream guidance updates<\/td>\n<td style=\"width: 160.775%;\">None<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Finding and Installing the Plugin<\/strong><\/p>\n<p><strong>From the Cursor Marketplace<\/strong><\/p>\n<ol>\n<li>Open\u00a0<strong>Cursor<\/strong>\u00a0and go to the\u00a0<strong>Marketplace<\/strong>\u00a0panel<\/li>\n<li>Search for\u00a0<strong>&#8220;Azure Cosmos DB&#8221;<\/strong><\/li>\n<li>Click\u00a0<strong>Install<\/strong><\/li>\n<\/ol>\n<p><figure id=\"attachment_12058\" aria-labelledby=\"figcaption_attachment_12058\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/cursor-market-place.png\"><img decoding=\"async\" class=\"wp-image-12058 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/cursor-market-place.png\" alt=\"Cursor editor marketplace showing the Azure Cosmos DB plugin available for installation, with search results highlighting access to Azure Cosmos DB accounts within the IDE.\" width=\"1248\" height=\"720\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/cursor-market-place.png 1248w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/cursor-market-place-300x173.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/cursor-market-place-1024x591.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/cursor-market-place-768x443.png 768w\" sizes=\"(max-width: 1248px) 100vw, 1248px\" \/><\/a><figcaption id=\"figcaption_attachment_12058\" class=\"wp-caption-text\">Install azure cosmosdb plugin from the cursor marketplace<\/figcaption><\/figure><\/p>\n<p>That&#8217;s it. The rules are active immediately no configuration needed.<\/p>\n<h2><strong>From a Direct Link<\/strong><\/h2>\n<p>You can also install by visiting\u00a0<a href=\"https:\/\/cursor.com\/marketplace\">cursor.com\/marketplace<\/a>\u00a0and searching for &#8220;Azure Cosmos DB&#8221;, or by sharing the plugin link with your team.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/Cursor-market-place-recently.png\"><img decoding=\"async\" class=\"alignnone wp-image-12059 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/Cursor-market-place-recently.png\" alt=\"Cursor marketplace webpage showing recently added plugins, including Azure Cosmos DB, Svelte, Postman, Cisco ThousandEyes, Datadog, and Firetiger, with navigation options for browsing and managing plugins.\" width=\"1248\" height=\"427\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/Cursor-market-place-recently.png 1248w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/Cursor-market-place-recently-300x103.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/Cursor-market-place-recently-1024x350.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/03\/Cursor-market-place-recently-768x263.png 768w\" sizes=\"(max-width: 1248px) 100vw, 1248px\" \/><\/a><\/p>\n<h3><strong>For Teams and Enterprise<\/strong><\/h3>\n<p>Admins on Teams or Enterprise plans can add the plugin to a\u00a0<strong>Team Marketplace<\/strong>\u00a0for centralized distribution:<\/p>\n<ol>\n<li>Go to\u00a0<strong>Dashboard \u2192 Settings \u2192 Plugins \u2192 Team Marketplaces<\/strong><\/li>\n<li>Click\u00a0<strong>Import<\/strong>\u00a0and paste the plugin repository URL<\/li>\n<li>Set the plugin as\u00a0<strong>Required<\/strong>\u00a0(auto-install for everyone) or\u00a0<strong>Optional<\/strong>\u00a0(developer&#8217;s choice)<\/li>\n<\/ol>\n<h3><strong>Using Rules \u2014 Zero-Setup Best Practices<\/strong><\/h3>\n<p>The plugin includes\u00a0<strong>10 curated rule sets<\/strong>\u00a0covering the most important aspects of working with Azure Cosmos DB. These rules are sourced from the\u00a0<a href=\"https:\/\/github.com\/AzureCosmosDB\/cosmosdb-agent-kit\">Azure Cosmos DB Agent Kit<\/a>\u00a0and encode the same guidance that our engineering team recommends.<\/p>\n<p><strong>What the Rules Cover<\/strong><\/p>\n<ul>\n<li><strong>Data Modeling<\/strong>\u00a0\u2014 Document design, embedding vs. referencing, denormalization, type discriminators, size limits, and schema evolution<\/li>\n<li><strong>Partition Key Design<\/strong>\u00a0\u2014 High-cardinality selection, query alignment, avoiding hot partitions, hierarchical partition keys, and synthetic keys<\/li>\n<li><strong>Query Optimization<\/strong>\u00a0\u2014 Eliminating cross-partition queries, avoiding full scans, using projections, parameterized queries, and continuation-token pagination<\/li>\n<li><strong>SDK Best Practices<\/strong>\u00a0\u2014 Singleton client pattern, Direct connection mode, retry handling, diagnostics logging, async patterns, ETags for concurrency, and availability strategies<\/li>\n<li><strong>Indexing Strategies<\/strong>\u00a0\u2014 Composite indexes for ORDER BY, excluding unused paths, spatial indexes, and choosing the right index type<\/li>\n<li><strong>Throughput &amp; Scaling<\/strong>\u00a0\u2014 Autoscale vs. provisioned vs. serverless, right-sizing throughput, container vs. database throughput, and burst capacity<\/li>\n<li><strong>Global Distribution<\/strong>\u00a0\u2014 Multi-region writes, consistency levels, automatic failover, conflict resolution, and zone redundancy<\/li>\n<li><strong>Monitoring &amp; Diagnostics<\/strong>\u00a0\u2014 Tracking RU consumption, P99 latency, throttling alerts, diagnostic logging, and Azure Monitor integration<\/li>\n<li><strong>Design Patterns<\/strong>\u00a0\u2014 Change feed materialized views, ranking patterns, multi-tenant architectures, and event sourcing<\/li>\n<li><strong>Vector Search<\/strong>\u00a0\u2014 Feature enablement, embedding policies, vector index configuration, VectorDistance queries, and repository patterns<\/li>\n<\/ul>\n<h3><strong>How Rules Work in Practice<\/strong><\/h3>\n<p>Once installed, Cursor&#8217;s AI agent automatically draws on these rules when you&#8217;re working with Cosmos DB code. You don&#8217;t need to do anything \u2014 just ask questions in chat or let the agent assist while you code.<\/p>\n<h3><strong>Try these prompts:<\/strong><\/h3>\n<p><span style=\"font-family: terminal, monaco, monospace;\">What partition key should I use for a multi-tenant SaaS app?<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Review my Cosmos DB data model for this e-commerce application<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Optimize this query \u2014 it&#8217;s consuming too many RUs<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Should I embed order items in the order document or store them separately?<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">The AI will respond with specific, actionable guidance grounded in Cosmos DB best practices \u2014 not generic database advice.<\/span><\/p>\n<h3><strong>Managing Rules<\/strong><\/h3>\n<p>You can control how each rule behaves from\u00a0<strong>Cursor Settings \u2192 Rules<\/strong>:<\/p>\n<ul>\n<li><strong>Always<\/strong>\u00a0\u2014 Rule applies to every conversation<\/li>\n<li><strong>Agent Decides<\/strong>\u00a0\u2014 The AI activates the rule when it&#8217;s relevant (default)<\/li>\n<li><strong>Manual<\/strong>\u00a0\u2014 Only used when you explicitly invoke it<\/li>\n<\/ul>\n<h3><strong>Using MCP \u2014 Live Database Connectivity<\/strong><\/h3>\n<p>The\u00a0<a href=\"https:\/\/github.com\/AzureCosmosDB\/MCPToolKit\"><strong>Model Context Protocol (MCP) Toolkit for Azure Cosmos DB <\/strong><\/a>connects Cursor to your actual Azure Cosmos DB account, enabling the AI to query real data, explore schemas, and search documents directly from chat.<\/p>\n<p><strong>Available MCP Tools<\/strong><\/p>\n<table width=\"569\">\n<thead>\n<tr>\n<td><strong>Tool<\/strong><\/td>\n<td><strong>What it does<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>list_databases<\/strong><\/td>\n<td><strong>List all databases in your Cosmos DB account<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>list_collections<\/strong><\/td>\n<td>List all containers in a database<\/td>\n<\/tr>\n<tr>\n<td><strong>get_approximate_schema<\/strong><\/td>\n<td>Sample documents to infer container schema<\/td>\n<\/tr>\n<tr>\n<td><strong>get_recent_documents<\/strong><\/td>\n<td>Retrieve the N most recent documents<\/td>\n<\/tr>\n<tr>\n<td><strong>find_document_by_id<\/strong><\/td>\n<td>Look up a specific document by its ID<\/td>\n<\/tr>\n<tr>\n<td><strong>text_search<\/strong><\/td>\n<td>Search documents where a property contains a phrase<\/td>\n<\/tr>\n<tr>\n<td><strong>vector_search<\/strong><\/td>\n<td>Run semantic similarity searches using Azure OpenAI embeddings<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><strong>Setting Up the MCP Server<\/strong><\/h3>\n<p>The MCP tools require a deployed instance of the\u00a0<a href=\"https:\/\/github.com\/AzureCosmosDB\/MCPToolKit\">Azure Cosmos DB MCP Toolkit<\/a>. Here&#8217;s how to get it running:<\/p>\n<h4><strong>Step 1: Deploy the MCP Toolkit<\/strong><\/h4>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">git clone https:\/\/github.com\/AzureCosmosDB\/MCPToolKit.git\r\ncd MCPToolKit\r\nazd up<\/code><\/pre>\n<p>Or use the\u00a0<strong>Deploy to Azure<\/strong>\u00a0button in the\u00a0<a href=\"https:\/\/github.com\/AzureCosmosDB\/MCPToolKit#quick-start\">MCPToolKit README<\/a>.<\/p>\n<h4><strong>Step 2: Set Environment Variables<\/strong><\/h4>\n<p>After deployment, set two environment variables that the plugin uses to connect:<\/p>\n<p># The URL of your deployed MCP Toolkit (from deployment-info.json)<\/p>\n<p><strong style=\"font-size: 16px;\"><em>Note:<\/em><\/strong><em style=\"font-size: 16px;\">\u00a0JWT tokens expire after approximately one hour. Re-run the command above to refresh.<\/em><\/p>\n<h4><strong>Step 3: Restart Cursor and Verify<\/strong><\/h4>\n<p>After setting the environment variables, restart Cursor. Then open a chat and try:<\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">List all databases in my Cosmos DB account<\/span><\/p>\n<p>You should see the AI call the\u00a0<strong>list_databases<\/strong>\u00a0tool and return your actual database names.<\/p>\n<h4><strong>Managing the MCP Server<\/strong><\/h4>\n<p>Toggle the MCP server on or off from\u00a0<strong>Cursor Settings \u2192 Features \u2192 Model Context Protocol<\/strong>. When disabled, the server won&#8217;t load and the tools won&#8217;t appear in chat. The rules continue to work independently.<\/p>\n<h4><strong>Example MCP Workflows<\/strong><\/h4>\n<p>Once connected, you can have conversations like:<\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Show me the schema of the users container in the mydb database<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Get the latest 10 documents from the orders container<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Search for documents where the name contains &#8220;Azure&#8221;<\/span><\/p>\n<p><span style=\"font-family: terminal, monaco, monospace;\">Find the document with id &#8220;user-001&#8221; in the users container<\/span><\/p>\n<p>The AI will invoke the appropriate MCP tool, retrieve real data from your account, and use it to answer your question \u2014 all without leaving the editor.<\/p>\n<h4><strong>Rules + MCP Together<\/strong><\/h4>\n<p>The real power comes from combining rules and MCP. When you ask the AI to review a data model, it can:<\/p>\n<ol>\n<li><strong>Query your actual schema<\/strong>\u00a0using\u00a0<strong>get_approximate_schema<\/strong><\/li>\n<li><strong>Analyze it against best practices<\/strong>\u00a0using the data-modeling and partition-key rules<\/li>\n<li><strong>Give you specific recommendations<\/strong>\u00a0grounded in both your real data and Cosmos DB expertise<\/li>\n<\/ol>\n<p>For example:<\/p>\n<p>Look at the schema of my orders container and suggest improvements for partition key design and query performance<\/p>\n<p>The AI will fetch your container&#8217;s schema via MCP, then apply partition key, query optimization, and indexing rules to provide tailored recommendations.<\/p>\n<h2><strong>Getting Started<\/strong><\/h2>\n<ol>\n<li><strong>Install the plugin<\/strong>\u00a0from the Cursor Marketplace \u2014 search for &#8220;Azure Cosmos DB&#8221;<\/li>\n<li><strong>Start using rules immediately<\/strong>\u00a0\u2014 ask Cosmos DB questions in chat<\/li>\n<li><strong>Optionally deploy the MCP Toolkit<\/strong>\u00a0for live database connectivity<\/li>\n<li><strong>Explore the\u00a0<\/strong><a href=\"https:\/\/github.com\/AzureCosmosDB\/cosmosdb-cursor-plugin\">plugin repository<\/a>\u00a0for full documentation<\/li>\n<\/ol>\n<h2><strong>Resources<\/strong><\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/AzureCosmosDB\/cosmosdb-cursor-plugin\">Plugin Repository<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AzureCosmosDB\/MCPToolKit\">Azure Cosmos DB MCP Toolkit<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AzureCosmosDB\/cosmosdb-agent-kit\">Azure Cosmos DB Agent Kit<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/\">Azure Cosmos DB Documentation<\/a><\/li>\n<li><a href=\"https:\/\/cursor.com\/docs\/plugins\">Cursor Plugin Documentation<\/a><\/li>\n<\/ul>\n<p>We&#8217;d love to hear your feedback. Try the plugin and let us know how it works for your Cosmos DB projects \u00a0file issues or contribute on\u00a0<a href=\"https:\/\/github.com\/AzureCosmosDB\/cosmosdb-cursor-plugin\">GitHub<\/a>.<\/p>\n<h2><strong>About Azure Cosmos DB<\/strong><\/h2>\n<p>Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL and MongoDB applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.<\/p>\n<p>To stay in the loop on Azure Cosmos DB updates, follow us on\u00a0<a href=\"https:\/\/twitter.com\/AzureCosmosDB\">X<\/a>,\u00a0<a href=\"https:\/\/aka.ms\/AzureCosmosDBYouTube\">YouTube<\/a>, and\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\">LinkedIn<\/a>.\u00a0 Join the discussion with other developers on the\u00a0<a href=\"https:\/\/discord.gg\/pczdC2SU\">#nosql channel on the Microsoft Open Source Discord<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re excited to announce the Cursor plugin for Azure Cosmos DB bringing AI-powered database expertise, best practices guidance, and live database connectivity directly into your coding workflow. Whether you&#8217;re designing a new data model, optimizing queries, or building a RAG application with vector search, the Cursor plugin gives your AI assistant deep knowledge of Azure [&hellip;]<\/p>\n","protected":false},"author":80443,"featured_media":12057,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1610,1980],"tags":[1236,1984,1864,2009,2010],"class_list":["post-12056","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-azure-cosmos-db","tag-ai","tag-ai-agents","tag-azurecosmosdb","tag-cursor","tag-tools"],"acf":[],"blog_post_summary":"<p>We&#8217;re excited to announce the Cursor plugin for Azure Cosmos DB bringing AI-powered database expertise, best practices guidance, and live database connectivity directly into your coding workflow. Whether you&#8217;re designing a new data model, optimizing queries, or building a RAG application with vector search, the Cursor plugin gives your AI assistant deep knowledge of Azure [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/12056","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=12056"}],"version-history":[{"count":3,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/12056\/revisions"}],"predecessor-version":[{"id":12065,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/12056\/revisions\/12065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/12057"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=12056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=12056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=12056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}