> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcollate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started with Databricks

> Register your Collate MCP Server as a governed Unity Catalog MCP Service so Databricks agents can discover and call its tools.

# Getting Started with Databricks

Connect your Collate instance to Databricks by registering it as an MCP Service in Unity Catalog. Once registered, Databricks agents and AI assistants (including Databricks Assistant and Mosaic AI Agent Framework agents) can discover and call Collate's MCP tools as a governed, auditable Unity Catalog resource.

Unlike client-side integrations such as Claude or Cursor, Databricks doesn't connect directly to the Collate MCP endpoint from a local config file. Instead, an admin registers the server once as a Unity Catalog securable, and Databricks proxies and governs every call through its Unity AI Gateway.

## Prerequisites

Before you begin, ensure you have:

1. **Collate v1.8.0+** running.
2. **MCP Application** installed in Collate.
   * Navigate to `<YOUR-Collate-SERVER>/marketplace/apps/McpApplication`.
   * Install **McpApplication** if it isn't already installed.
3. A Collate [Personal Access Token](/ai-2-0/how-to-guides/mcp#personal-access-token-pat), or OAuth client credentials, if you want per-user authentication instead.
4. A **Databricks workspace with Unity Catalog enabled**, in a region that supports Model Serving.
5. Sufficient Unity Catalog privileges to create connections and MCP Services in the target catalog and schema.

## Configure the MCP Service

Registering Collate as an MCP Service takes four steps: create the HTTP connection, register the service, grant access, and connect an agent.

### Step 1: Create a Unity Catalog HTTP Connection

To create a Unity Catalog HTTP connection in Databricks, follow these steps:

1. Navigate to **Catalog** > **External Data** > **Connections**.
2. Click **Create connection**.
3. Set **Connection type** to `HTTP`.
4. Set **Host / MCP server URL** to `https://<YOUR-Collate-SERVER>/mcp`.
5. Set **Authentication** to `Bearer token`, and paste your Collate Personal Access Token.
6. Enable the **Is MCP connection** checkbox so Databricks treats the endpoint as an MCP server rather than a generic HTTP API.
7. Click **Create** to save the connection.

<Tip>
  **Tip**: If your Collate deployment authenticates with OAuth 2.0 instead of a PAT, use **OAuth M2M** (shared service-principal credentials) or **OAuth U2M** (per-user login) as the authentication type instead of Bearer token. See [OAuth 2.0 Authentication](/ai-2-0/how-to-guides/mcp/oauth) for the values Collate expects.
</Tip>

If you selected **OAuth U2M**, each user must authenticate individually before they can call the service:

1. Open the connection's detail page in Catalog Explorer.
2. Click **Login**.
3. Complete the OAuth consent flow against your Collate instance.

Bearer token and OAuth M2M skip this step: Both use a single shared credential set once, at connection creation, so no per-user login is required.

### Step 2: Register the MCP Service

Register the MCP Service through the Databricks UI or the REST API.

#### Using the Databricks UI

To register the MCP service in Databricks, follow these steps:

1. In the left sidebar, select **AI Gateway** > **MCPs** > **Register MCP Server**.

   Alternatively, go to **Catalog**, open the target schema, and select **Create** > **MCP Service**, which opens the same form.

2. Set **Catalog** and **Schema** to where the MCP Service will live as a Unity Catalog securable.

3. Set **MCP Service name**, for example `collate` (this can't be changed after creation).

4. Set **Connection** to the HTTP connection you created in Step 1.

5. Optional: Set **Tools** to the Collate MCP tools you want to expose. Leave unrestricted to expose all of them. See the [MCP Tools Reference](/ai-2-0/how-to-guides/mcp/reference) for the full list.

6. Click **Create** to register the service.

#### Using the REST API

Register the service directly with a POST request:

```bash theme={null}
databricks api post \
  "/api/2.1/unity-catalog/mcp-services?parent=schemas/main.default&mcp_service_id=collate" \
  --json '{
    "comment": "Collate MCP Server",
    "config": {
      "source_connection": {
        "name": "connections/main.default.collate_http"
      },
      "include_tool_selectors": []
    }
  }'
```

### Step 3: Grant EXECUTE Permission

On the MCP Service's **Permissions** tab, grant **EXECUTE** to the users, groups, or service principals that should be able to call Collate's tools:

```bash theme={null}
databricks api patch \
  "/api/2.1/unity-catalog/permissions/mcp_service/main.default.collate" \
  --json '{
    "changes": [
      { "principal": "data-team", "add": ["EXECUTE"] }
    ]
  }'
```

<Warning>
  **Important**: Grant **EXECUTE** on the MCP Service itself. Never grant **USE CONNECTION** on the underlying HTTP connection to end users. That would let them bypass tool selection and call the Collate MCP endpoint directly with the shared credential.
</Warning>

### Step 4: Connect an Agent or Client

Once registered, the MCP Service is reachable at:

```
https://<YOUR-DATABRICKS-WORKSPACE>/ai-gateway/mcp-services/<catalog>.<schema>.<service-name>
```

Mosaic AI Agent Framework agents can add it as a tool source directly. To verify the connection manually, authenticate with a Databricks token and list the available tools:

```bash theme={null}
TOKEN=$(databricks auth token | jq -r .access_token)
curl -s -X POST \
  "https://<YOUR-DATABRICKS-WORKSPACE>/ai-gateway/mcp-services/main.default.collate" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
```

You should see Collate's MCP tools (`search_metadata`, `get_entity_details`, and others) in the response. See the [MCP Tools Reference](/ai-2-0/how-to-guides/mcp/reference) for the complete list.

## Try It Out

Once your agent has the Collate MCP Service attached as a tool source, try prompting it:

> "What tables do you have access to in Collate?"

> "Find the tables that track customer transactions, engagement metrics, and churn indicators."

## Troubleshooting

If you run into connection issues:

1. **Verify Collate is running**: `curl <YOUR-Collate-SERVER>/api/health`.
2. **Check the MCP endpoint**: `curl <YOUR-Collate-SERVER>/mcp` (should return `401`).
3. **Verify MCP Application is installed**: Visit `<YOUR-Collate-SERVER>/marketplace/apps/McpApplication`.
4. **Confirm the connection is marked as an MCP connection**: Open the HTTP connection in Catalog Explorer and check that **Is MCP connection** is enabled.
5. **Confirm EXECUTE is granted**: Check the MCP Service's Permissions tab for the calling user, group, or service principal.
6. **Token expired**: [Generate a new PAT](/ai-2-0/how-to-guides/mcp#personal-access-token-pat) and update the HTTP connection's credentials.

## Additional Resources

* [Collate MCP Documentation](/ai-2-0/how-to-guides/mcp)
* [OAuth 2.0 Authentication](/ai-2-0/how-to-guides/mcp/oauth)
* [MCP Tools Reference](/ai-2-0/how-to-guides/mcp/reference)
* [Databricks: Connect agents to third-party tools with MCP Services](https://docs.databricks.com/aws/en/agents/agent-framework/mcp-services)
* [Databricks: Register an external MCP server](https://docs.databricks.com/aws/en/ai-gateway/register-mcp-service)
