# Connecting Databricks Genie One to Treasure AI Studio

You can register Treasure AI Studio in Databricks as an external MCP service, so business users can run Studio agents and Actions from a Genie One chat. Genie One is the Databricks interface for business users. Each request runs with the Studio work folders, permissions, and cost of the person who signed in. This page covers the setup in Treasure AI Studio and in Databricks, and how people use the connection from Genie One. Use it when your business users already work in Databricks and need audience information or the output of a Studio Action there, without switching tools.

This guide covers Genie One. To connect the Genie Code CLI instead, see [Connect Databricks Genie Code to Treasure AI](/getting-started/ai/databricks-genie-code). To let a Genie Agent answer read-only questions about parent segments, segments, and journeys through the CDP API, without Treasure AI Studio, see [Connecting Databricks Genie Agents to Treasure AI CDP](/getting-started/ai/databricks-genie-agents).

## How the Connection Is Set Up

Three roles take part, in two places.

| Who  | Where  | What They Do  |
|  --- | --- | --- |
| **Studio account administrator** | Treasure AI Studio, under **Settings → Agent Channels** | Creates one OAuth endpoint and copies its Connection URL |
| **Databricks user who registers the MCP** | Databricks, under **Unity Gateway → MCPs** | Registers the Connection URL as an MCP service and grants access to it |
| **Each person who uses Genie One** | Databricks Genie One | Adds the MCP service to a chat, signs in to Studio, and allows access |


Databricks registers itself with Treasure AI Studio as an OAuth client (dynamic client registration), so nobody enters a Studio token or a Treasure AI API key in Databricks. Each person signs in to Studio with their own account. Each person also needs a Treasure AI Studio account in the same Studio account as the endpoint, with access to the work folders they want to use.

## Prerequisites

- **In Treasure AI Studio**, an account administrator to create the OAuth endpoint. Only account administrators can create OAuth endpoints.
- **In Databricks**, the person who registers the MCP needs the following. These requirements come from the Databricks guide [External MCP servers](https://docs.databricks.com/aws/en/ai-gateway/register-mcp-service).
  - A Unity Catalog-enabled workspace in a region that supports Model Serving, and the **Workspace access** entitlement
  - `USE CATALOG` and `USE SCHEMA` on the catalog and schema that will hold the MCP service, and `CREATE SERVICE` on the schema
  - `CREATE CONNECTION` on the schema
- **Network access** from the Databricks workspace to the Studio Agent Gateway, for example `agent-gateway.us01.treasure.ai`. If the workspace restricts outbound traffic, see [MCP networking](https://docs.databricks.com/aws/en/agents/mcp-tools/networking).


## Step 1: Create an OAuth Endpoint in Studio

An account administrator creates one OAuth endpoint, and everyone who connects uses its Connection URL. For the full setup, see [Create an OAuth Endpoint](/products/ai-studio/agent-channels/mcp-oauth#create-an-oauth-endpoint).

1. Open **Settings → Agent Channels** and select **New MCP Endpoint** in the **MCP Endpoints** section.
2. Under **Connection method**, select **OAuth · connected user**.
3. Enter an **Endpoint name**, such as *Studio MCP OAuth*, and add an optional **Comment**.
4. Select **Create endpoint**.
5. On the **OAuth endpoint created** screen, select **Copy** next to the **Connection URL**.


The Connection URL has the form `https://<your account's Agent Gateway>/v1/mcp/<endpoint ID>`, for example `https://agent-gateway.us01.treasure.ai/v1/mcp/<endpoint ID>` on the US01 site. The endpoint's detail page shows its status as **Active**. Give the Connection URL to the people who will set up the connection. This guide uses the endpoint's own Connection URL. The common MCP URL is an alternative, described in [The Common MCP URL](/products/ai-studio/agent-channels/mcp-oauth#the-common-mcp-url).

## Step 2: Register Treasure AI Studio in Databricks

The Databricks user who registers the MCP does this once. The registration creates an MCP service in Unity Catalog and the HTTP connection behind it.

1. In your Databricks workspace, open **Unity Gateway**, select **MCPs**, and select **+ MCP**. Choose **Connect an existing MCP server**.
2. In **Server URL**, paste the Connection URL from Step 1.
3. Under **Location**, choose the catalog and schema, such as `workspace.default`, and enter a **Service name**, such as `treasure_ai_studio`. The name can't be changed after creation.
4. Under **Authentication**, select **OAuth (automatic, DCR)**. With this method, each user signs in with their own account, and Databricks registers the OAuth app automatically.


1. Select **Sign in**. Your browser opens Treasure AI Studio. If Studio asks you to sign in, sign in.
2. On **Authorize MCP access**, check that the callback host shown at the top is a Databricks host, such as `oregon.cloud.databricks.com`, and that the application name is **Databricks**. Check the requested MCP resource, which is the Connection URL from Step 1, and the account. Select **Allow access**.


The requested permission is `mcp`: view work folders, list Actions, read execution results, run Actions, and start or continue chats. See [The MCP Permission](/products/ai-studio/agent-channels/mcp-oauth#the-mcp-permission).

1. Under **Tools**, choose the tools to expose, then select **Create MCP Service**. Treasure AI Studio provides six tools. To expose only some of them, see [Choose available tools](https://docs.databricks.com/aws/en/ai-gateway/govern-mcp-service#select-tools).


The MCP service's page shows its status as **Active** and lists the six tools. Databricks labels `list_work_folders`, `list_actions`, and `get_chat_result` as **Read-only**, and `run_action`, `start_chat`, and `continue_chat` as **Destructive**. For what each tool does, see [The Tools](/products/ai-studio/agent-channels/mcp-clients#the-tools).

## Step 3: Give People Access to the MCP Service

People who use the MCP service from Genie One need `EXECUTE` on the MCP service, `USE CATALOG` on its catalog, `USE SCHEMA` on its schema, and assignment to the workspace. Grant these with an identity that can manage the MCP service's permissions. These requirements come from the Databricks guide [Share an MCP](https://docs.databricks.com/aws/en/ai-gateway/govern-mcp-service).

1. In **Unity Gateway**, select **MCPs**, open the MCP service, and open the **Permissions** tab.
2. Select **Grant**, choose the group, select **EXECUTE**, and select **Grant**.
3. In **Catalog Explorer**, grant the group `USE CATALOG` on the catalog and `USE SCHEMA` on the schema.


People who use the MCP service don't need `USE CONNECTION`. Keep that privilege for the people who manage the MCP service, because it allows direct use of the connection outside the MCP service's tool selection. Genie One chat is available to people with the **Consumer access** entitlement. To let people who have only Consumer access sign in to the MCP service, grant the permission to the `account users` group, as described in the Databricks [MCP API and SDK reference](https://docs.databricks.com/aws/en/ai-gateway/mcp-service-reference).

## Step 4: Use Treasure AI Studio from Genie One

Each person adds the MCP service to a Genie One chat and signs in to Studio the first time.

1. Add the MCP service to Genie One. Use one of these entry points:
  - On the MCP service's page in **Unity Gateway**, under **Get started**, select **Genie**, select **Genie One**, and then select **Add to Genie One**.
  - On the Genie One home page, select the **+** icon at the bottom left of the search bar, select **Connectors**, select **Browse connectors**, and select the MCP service.
2. If Genie One asks you to sign in, sign in to Treasure AI Studio and select **Allow access** on **Authorize MCP access**.
3. Send a request that needs Studio, such as *List the Studio work folders I can access*.


Genie One shows each tool it calls in the chat, for example **Completed: List work folders**. If a tool doesn't run, name the connection in the request, as the Databricks guide [Connect Genie One to external applications with MCP](https://docs.databricks.com/aws/en/genie-one/external-sources) suggests.

## What Runs in Studio

Each request runs as the person who signed in to Studio. It uses that person's work folders, permissions, and cost, not those of the person who registered the MCP service. Studio does not ask for approval before each request. Requests that start or continue chats appear in that person's Studio chat list as ordinary chats, with the name of the work folder they ran in, and they can change files in their work folders. [The Chats Are the Person's Own Studio Chats](/products/ai-studio/agent-channels/mcp-oauth#the-chats-are-the-persons-own-studio-chats) describes this in more detail.

Databricks governs each tool call through Unity Gateway. Before each call, it checks that the person has `EXECUTE` on the MCP service, and it records usage in system tables. Administrators with `MANAGE` on the MCP service can limit the available tools and apply service policies. See [Govern an MCP](https://docs.databricks.com/aws/en/ai-gateway/govern-mcp-service).

## Stop the Connection

You can stop the connection for everyone or for one person.

- **Stop everyone (Studio).** Turn off the **Enabled** switch on the endpoint. Requests from Databricks are refused until you turn it back on.
- **Stop one person (Studio).** Remove the person from the account, or remove their access to the work folders involved.
- **Stop one person (Databricks).** Remove the person's `EXECUTE` on the MCP service. A person can also remove their own Studio sign-in by selecting **Revoke credentials** on the MCP service's page, or in Genie One under **Connectors → Browse connectors**.
- **Remove the MCP service (Databricks).** Delete the MCP service. See [Update or delete an MCP](https://docs.databricks.com/aws/en/ai-gateway/govern-mcp-service#manage-service).


## Troubleshooting

| Symptom  | Cause and Fix  |
|  --- | --- |
| The consent screen says *"No accessible account has an OAuth endpoint for the requested MCP resource."* | Your accounts can't be offered for this endpoint. The endpoint may be deleted, you may not be a member of its account, or the URL in **Server URL** may not be the endpoint's Connection URL. Check the URL in Step 2, or ask an account administrator |
| The consent screen says the endpoint *"is stopped or unavailable."* | The endpoint is disabled. An account administrator turns the **Enabled** switch back on |
| The MCP service doesn't appear in Genie One | The person lacks `EXECUTE` on the MCP service, or `USE CATALOG` or `USE SCHEMA` on its parents. Grant them as in Step 3 |
| Requests are refused with `403` and `mcp_disabled` | The endpoint is disabled. An account administrator enables it |
| Other errors after you connect | See the troubleshooting table in [OAuth MCP Endpoints](/products/ai-studio/agent-channels/mcp-oauth#troubleshooting) |


## Next Steps

- [OAuth MCP Endpoints](/products/ai-studio/agent-channels/mcp-oauth): permissions, the common MCP URL, and how access ends.
- [Connecting an MCP Client](/products/ai-studio/agent-channels/mcp-clients): the six tools and how to read their results.
- [What an Agent Channel Chat Can Reach](/products/ai-studio/agent-channels/channel-chats): what these chats can and cannot change.
- [Headless](/products/headless): the overview of connecting other AI tools to Treasure AI Studio.
- Other Headless guides: [ChatGPT](/products/headless/chatgpt), [Claude](/products/headless/claude-web), [Gemini](/products/headless/gemini).