Skip to main content

Databricks

Databricks connects to the Timbr MCP server the same way it connects to any external MCP server: by wrapping it in a Unity Catalog HTTP connection, then exposing that connection as an MCP Service under AI Gateway. This guide uses a static Bearer token (your Timbr x-api-key token) for authentication - the simplest path, since it needs no identity provider, app registration, or interactive login.

OAuth instead?

If you need per-user authentication (each Databricks user signs in with their own identity and gets their own Timbr permissions) rather than one shared token for everyone, see the Databricks section of the OAuth guide instead.

Use case: stock-out risk for top sellers​

A retailer keeps sales and store inventory in Databricks, the product catalog in MongoDB, and shipment tracking in a carrier's REST API. Timbr maps all three into one ontology. A Genie Agent (formerly a Genie space) connected to Timbr over MCP can then answer questions across them.

Architecture diagram: a merchandising planner asks a Genie Agent in Agent mode. The Genie Agent calls the Timbr Data Agent over MCP with the ask_question tool. The Timbr Data Agent generates semantic SQL, which runs through the ontology and virtualization against Databricks, MongoDB and a carrier REST API. The answer returns to the Genie Agent.

How it works​

  1. A merchandising planner asks the Genie Agent a question in Agent mode.
  2. The Genie Agent sends the question to Timbr with the ask_question tool of the MCP Service.
  3. The Timbr data agent turns the question into semantic SQL, and Timbr runs it across the sources through the ontology and virtualization.
  4. Timbr returns the answer to the Genie Agent, which shows it to the planner.

Example​

The planner asks:

Which of our top 10 products by revenue last month have late inbound shipments, and how many stores will run out of stock before they arrive?

Revenue and stock come from Databricks, categories from MongoDB, and delays from the carrier API. An illustrative answer, with fictional products and figures:

ProductCategoryShipment delayStores that run out first
TrailRunner 2 hiking bootFootwear6 days14
Ridgeline down jacketOuterwear4 days9
Summit 40L backpackBags2 days0

The boots and the jacket need attention first. No store runs out of backpacks before the shipment arrives.

Pick the Timbr data agent

Name the data agent in the tool call with the agent_name parameter, for example by adding Always pass agent_name: retail_ops_agent when you call Timbr tools to the Genie Agent's instructions.

Prerequisites​

  • A Databricks workspace with Unity Catalog enabled
  • A Timbr API token (tk_...) - the same token used for x-api-key auth elsewhere in this guide
  • Permission to create connections and MCP services in Unity Catalog (catalog/schema-level CREATE CONNECTION, or workspace admin)

Step 1: Create the connection​

  1. Go to Catalog → Connections → Create connection
  2. Fill in Connection basics:
    • Connection name: e.g. timbr_mcp_bearer_token
    • Connection type: HTTP
    • Catalog / Schema: pick where this connection should live (or use a metastore-level connection - see the note in the OAuth guide about connection scope)
    • Auth type: Bearer token
  3. Fill in Authentication:
    • Host: https://<your-timbr-host>
    • Port: 443
    • Bearer token: your Timbr API token (tk_...)
  4. Under Connection details:
    • Check Is MCP connection
    • Base path: /timbr/api/mcp/
  5. Click through to create the connection

Unlike the OAuth/DCR flow, there's no login step here - a Bearer token is a static credential, so the connection is immediately usable once created.

Step 2: Create the MCP Service​

  1. Go to AI Gateway → MCPs → Create MCP Service
  2. Enter Catalog / Schema / Name (name cannot be changed after creation)
  3. Under Connection, select Use existing connection and pick the connection from Step 1
  4. Under Tools, choose which tools to expose - the picker populates immediately since the connection doesn't need a separate auth step (query_data, ask_question, generate_sql, identify_concept, execute_sql, list_ontologies, list_agents, list_datasources, describe_knowledge_graph, list_skills, and more)
  5. Click Create

Step 3: Verify with cURL​

databricks auth login --host "<your-databricks-workspace-url>" -p DEFAULT
export DATABRICKS_TOKEN=$(databricks auth token -p DEFAULT | jq -r .access_token)

curl -X POST "<your-databricks-workspace-url>/ai-gateway/mcp-services/<catalog>.<schema>.<service-name>" \
-H "Authorization: Bearer $DATABRICKS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}'
Two different tokens

$DATABRICKS_TOKEN here authenticates you to the Databricks AI Gateway API - it has nothing to do with Timbr. The Timbr credential is the Bearer token you stored on the connection in Step 1; Databricks attaches that automatically when it forwards the request to Timbr's MCP server.

Step 4: Test in Playground​

  1. Open AI Playground, select a model with tool support enabled
  2. Tools → + Add tool → MCP Servers → select your Timbr MCP Service
  3. Ask something like list timbr 3 ontologies names and confirm it calls list_ontologies and returns data

A note on shared access​

A Bearer token is a shared credential - every Databricks user who queries through this MCP Service is authenticated to Timbr as the same identity (whoever's token you configured), the same way OAuth Machine to Machine works in the OAuth guide's multi-user comparison. There's no per-user Timbr permission enforcement or per-user audit trail with this approach. If you need that, use the OAuth/DCR flow instead.

If the token is ever compromised or the Timbr user it belongs to is deprovisioned, update the Bearer token value directly on the connection (Catalog Explorer → the connection → rotate/edit) - no OAuth reconfiguration needed, which is the main operational tradeoff for this simplicity.