Databricks
Databricks connects to CARTO as an MCP service – a Unity Catalog securable accessed through the Unity AI Gateway.
The Unity AI Gateway provides governance controls for MCP connections, including permissions, tool selection, rate limits, usage tracking, and auditing.
Requirements
Before you start, you need:
A Unity Catalog-enabled Databricks workspace in a region that supports Model Serving.
CREATE CONNECTIONon the target schema. Metastore admin access is not required.Your CARTO MCP Server URL.
Credentials for the CARTO MCP Server:
OAuth (U2M): recommended for access to the full CARTO tool surface.
Bearer token: sing a CARTO API Access Token for the read-and-discovery subset.
Install
The MCP server is registered through the Databricks UI or REST API. There is no CREATE MCP SERVICE SQL command.
1. Create a CARTO SPA OAuth Client
If you're using create a SPA OAuth Client in CARTO under Developers > Credentials > SPA OAuth Clients.
Configure the client as confidential so that it has a Client Secret.
Keep the Client ID and Client Secret. You'll enter these when configuring the Databricks MCP service.
Before creating the connection, add the Databricks workspace callback URL to the client's Allowed Callback URLs:
The callback is workspace-specific, so each Databricks workspace requires its own entry.
2. Create the MCP Service
In Databricks, go to:
AI Gateway > MCPs
Select:
+ MCP > Connect an existing MCP server

Configure the MCP service:
Select a Catalog and Schema.
Use the actual catalog and schema where you want to register the MCP service. The form may prefill
mainanddefault, which may not exist in your workspace.Enter a Name, for example:
Enter your CARTO MCP Server URL.
Select an Authentication method.
OAuth (U2M)
Use OAuth (U2M) for the full CARTO tool surface.
Enter:
Client ID: your CARTO SPA OAuth Client ID.
Client Secret: your CARTO SPA OAuth Client Secret.
Authorization endpoint:
https://auth.carto.com/authorizeToken endpoint:
https://auth.carto.com/oauth/token
Make sure the Databricks workspace callback URL has been added to the CARTO client's Allowed Callback URLs before connecting.

Bearer token
Use Bearer token for the read-and-discovery path.
Enter your CARTO API Access Token. Databricks proxies the MCP calls, so the token is not exposed to end users.
The available capabilities depend on the APIs included in the token. The read-and-discovery subset includes browsing connections, running SQL, and searching the Data Observatory.

Don't select Dynamic Client Registration. CARTO does not use DCR. Use OAuth (U2M) or Bearer token.

3. Load and configure the tools
Select Create & load tools.
Databricks discovers the tools exposed by the CARTO MCP server and displays them with Read-only or Destructive badges.
Under Advanced, you can filter the tools using globs, for example:
Use the filter to expose only the CARTO tools required by your application.

4. Create the MCP Service
Create the service.
Once provisioning is complete, the MCP service status changes to Active.

Governance
Databricks lets you go beyond a connection:
Tool selection: expose only the tools you want (allowlist by prefix or exact match).
Service policies: allow, deny, or require approval for individual tool calls. The Destructive badge is informational; set a policy to actually gate destructive tools.
Rate limits and usage tracking: every call lands in
system.ai_gateway.usage.
Last updated
Was this helpful?
