<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DBSQL MCP Server - how to specify compute cluster? in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150686#M5010</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P data-unlink="true"&gt;the&amp;nbsp;&lt;SPAN class=""&gt;DBSQL MCP Server&lt;/SPAN&gt;&amp;nbsp;is really cool, however, I am not sure how to connect it to a specific cluster, and I could not find any information in any documentation page. My MCP settings looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"databricks-sql-mcp": {
"type": "streamable-http",
"url": "https://{DATABRICKS_URL}.azuredatabricks.net/api/2.0/mcp/sql",
"headers": {
"Authorization": "Bearer {TOKEN}
},
"note": "Databricks SQL MCP"
}&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;I tried providing &lt;EM&gt;warehouse_id&lt;/EM&gt; query parameter or even prompting the model to use a specific compute cluster, but it did not help - the commands always run on a specific cluster, and I am not sure why this specific cluster was selected. Did anyone have the same problem and was able to solve that?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2026 12:28:27 GMT</pubDate>
    <dc:creator>rdruska</dc:creator>
    <dc:date>2026-03-12T12:28:27Z</dc:date>
    <item>
      <title>DBSQL MCP Server - how to specify compute cluster?</title>
      <link>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150686#M5010</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P data-unlink="true"&gt;the&amp;nbsp;&lt;SPAN class=""&gt;DBSQL MCP Server&lt;/SPAN&gt;&amp;nbsp;is really cool, however, I am not sure how to connect it to a specific cluster, and I could not find any information in any documentation page. My MCP settings looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"databricks-sql-mcp": {
"type": "streamable-http",
"url": "https://{DATABRICKS_URL}.azuredatabricks.net/api/2.0/mcp/sql",
"headers": {
"Authorization": "Bearer {TOKEN}
},
"note": "Databricks SQL MCP"
}&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;I tried providing &lt;EM&gt;warehouse_id&lt;/EM&gt; query parameter or even prompting the model to use a specific compute cluster, but it did not help - the commands always run on a specific cluster, and I am not sure why this specific cluster was selected. Did anyone have the same problem and was able to solve that?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 12:28:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150686#M5010</guid>
      <dc:creator>rdruska</dc:creator>
      <dc:date>2026-03-12T12:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: DBSQL MCP Server - how to specify compute cluster?</title>
      <link>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150703#M5012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/219542"&gt;@rdruska&lt;/a&gt;,&lt;/P&gt;
&lt;P class="wnfdnte" data-pm-slice="1 1 []"&gt;You are right. The behaviour is a bit subtle and not well-documented yet. Having checked internally, here is what I have found. As of today, the DBSQL MCP server will, b&lt;SPAN&gt;y default, p&lt;/SPAN&gt;ick a "random running" SQL warehouse from the set of warehouses that your token has access to.&amp;nbsp;&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;However, there is a workaround for this...&amp;nbsp;if you pass it via the MCP request’s _meta field, not via URL parameters or prompt text as you are currently doing.&amp;nbsp;&lt;/P&gt;
&lt;P class="wnfdnte"&gt;If you’re calling the endpoint directly, you can pin the warehouse like this in the JSON‑RPC request body... If you do so,&amp;nbsp;the DBSQL MCP server will use exactly the warehouse whose warehouse_id you provide.&lt;/P&gt;
&lt;PRE class="_1ibi0s3cl" dir="auto"&gt;&lt;CODE class="language-json"&gt;{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "tools/call",
  "params": {
    "name": "execute_sql",
    "arguments": {
      "query": "SELECT 1"
    },
    "_meta": {
      "warehouse_id": "&amp;lt;your-sql-warehouse-id&amp;gt;"
    }
  }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Does this help?&lt;/P&gt;
&lt;P&gt;Just so that you are aware, adding &lt;FONT color="#993300"&gt;?&lt;/FONT&gt;warehouse_id=... to the URL is not supported. The server ignores that. Also, many MCP clients (e.g. some IDE integrations) don’t yet expose a way to set _meta, so from those tools you currently can’t override the warehouse. You’ll see the default random running warehouse behaviour. Appreicate it is not ideal but this is how it woks as of today.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you share which MCP client you’re using (Cursor, Claude Code, VS Code extension, etc.), we can look at whether there’s a practical workaround (for example, calling MCP directly via HTTP or using a small proxy that injects _meta.warehouse_id for you).&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 14:30:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150703#M5012</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-12T14:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: DBSQL MCP Server - how to specify compute cluster?</title>
      <link>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150756#M5015</link>
      <description>&lt;P&gt;Hi, thanks a lot for your reply! I use Cursor, is there a workaround for implementing the `_meta` argument there?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2026 07:53:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150756#M5015</guid>
      <dc:creator>rdruska</dc:creator>
      <dc:date>2026-03-13T07:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: DBSQL MCP Server - how to specify compute cluster?</title>
      <link>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150771#M5018</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/219542"&gt;@rdruska&lt;/a&gt;,&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;Thanks for clarifying. Unfortunately, Cursor doesn’t expose a way to set the MCP _meta field, so there isn’t a clean, built‑in way to pass warehouse_id from mcp.json. The MCP spec supports _meta, and the DBSQL MCP server honors _meta.warehouse_id, but Cursor’s current UI/config doesn’t let you inject it per request, so the server falls back to "pick a random running warehouse you have access to."&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;If you only have one warehouse running (and others stopped) when you use Cursor, the DBSQL MCP server’s "random running warehouse" behaviour effectively becomes deterministic. This is the simplest option, though obviously not ideal if you normally keep multiple warehouses up.&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;Alternatively, if you are interested in explring advanced options, consider adding a small proxy MCP server that injects _meta. This basically means implementing a tiny MCP server (for example, as a Databricks App or a small service) that a&lt;SPAN&gt;ccepts MCP requests from Cursor and f&lt;/SPAN&gt;&lt;SPAN&gt;orwards them to &lt;/SPAN&gt;&lt;SPAN&gt;https://&amp;amp;lt;workspace-host&amp;amp;gt;/api/2.0/mcp/sql&lt;/SPAN&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;&lt;SPAN&gt;When doing so, you can inject&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;_meta argument&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;into the JSON‑RPC body. If you then p&lt;/SPAN&gt;&lt;SPAN&gt;oint cursor at this proxy MCP instead of the DBSQL MCP URL directly, you should be able to achieve what you are after. This approach may sound engineering-heavy, but it will give you more control over the warehouse you would like to use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Because this limitation is on the client side, the long‑term fix would need Cursor to support _meta in their MCP configuration. If this is affecting your org, I’d recommend opening a feature request with Cursor.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2026 09:48:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/150771#M5018</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-13T09:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: DBSQL MCP Server - how to specify compute cluster?</title>
      <link>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/156181#M5221</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/216690"&gt;@Ashwin_DSA&lt;/a&gt;&amp;nbsp;for your solution suggested here! we have a related situation. We have an AI-gateway that brokers connections to that externally-hosted Datbricks instance. As a result, we need a SQL warehouse to execute queries and can't alllocate warehouse cost from LLM users. Is there a proven workaround you could advise please?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 16:12:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/dbsql-mcp-server-how-to-specify-compute-cluster/m-p/156181#M5221</guid>
      <dc:creator>WendyW</dc:creator>
      <dc:date>2026-05-05T16:12:49Z</dc:date>
    </item>
  </channel>
</rss>

