Skip to main content

MCP server for Databricks integration

Project description

Databricks Unity Catalog View Access

Script om Databricks Unity Catalog via MCP te benaderen.

Setup Stappen

0. Zorg dat je een Python environment hebt

Python 3.12.11 werkt.

1. Installeer Dependencies

pip install -r requirements.txt

2. Databricks Configuratie (Vereist voor externe toegang)

A. Genereer Personal Access Token

  1. Log in op Databricks workspace: https://adb-4268269233410651.11.azuredatabricks.net
  2. Klik rechtsboven op je gebruikersnaam → Settings
  3. Ga naar DeveloperAccess tokens
  4. Klik Generate new token
  5. Geef een naam (bijv. "Python Script Access") en optioneel een expiration
  6. Kopieer de token (wordt maar 1x getoond!)

B. Verkrijg SQL Warehouse HTTP Path

  1. Ga in Databricks naar SQL Warehouses (via zijmenu)
  2. Selecteer een actieve SQL Warehouse (of maak een nieuwe aan)
  3. Klik op de warehouse en ga naar Connection Details
  4. Kopieer de HTTP Path (format: /sql/1.0/warehouses/xxxxx)

C. Verkrijg Cluster ID (Voor Python Code Execution)

Als je de execute_python_code tool wilt gebruiken:

  1. Ga in Databricks naar Compute (via zijmenu)
  2. Selecteer een actieve cluster (of maak een nieuwe aan)
  3. Kopieer de Cluster ID uit de URL of cluster details

Let op: De Command Execution API werkt alleen met classic all-purpose clusters, niet met serverless compute.

D. Configureer Environment Variables

Maak een .env file aan conform:

DATABRICKS_ACCESS_TOKEN=<je access token>
DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/15c864e4e063e48c
DATABRICKS_SERVER_HOSTNAME=adb-4268269233410651.11.azuredatabricks.net
DATABRICKS_CLUSTER_ID=<je cluster id voor python execution>

Let op: DATABRICKS_CLUSTER_ID is alleen vereist als je de execute_python_code tool wilt gebruiken.

5. Permissies Check

Zorg dat je Databricks account heeft:

  • USE CATALOG rechten op main catalog
  • USE SCHEMA rechten op ralf schema
  • SELECT rechten op full_view_with_location view

Test met:

SHOW GRANTS ON VIEW main.ralf.full_view_with_location;

Troubleshooting

Fout: "Invalid access token"

  • Check of DATABRICKS_TOKEN environment variable correct is gezet
  • Genereer een nieuwe token als deze verlopen is

Fout: "Warehouse not found"

  • Controleer of HTTP Path correct is ingevuld
  • Zorg dat SQL Warehouse actief is (Status: Running)

Fout: "Table or view not found"

  • Verifieer permissies via Databricks UI
  • Check of catalog/schema/view namen exact kloppen (case-sensitive!)

Fout: "Connection timeout"

  • Check internet connectie
  • Verifieer IP whitelisting in Databricks
  • Test VPN verbinding indien van toepassing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

databricks_mcp_tools-0.1.0.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

databricks_mcp_tools-0.1.0-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

Details for the file databricks_mcp_tools-0.1.0.tar.gz.

File metadata

  • Download URL: databricks_mcp_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for databricks_mcp_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d6948d2ce7271fba3f6411dce51a0bb33fc7f71c6ba7059f72555c40e026d0e
MD5 5c3cf44141cf9dd391dce32bac2ea7cc
BLAKE2b-256 5ae200593618081ec434ea49202e9588361992ad3557155d31b44fc179f92213

See more details on using hashes here.

File details

Details for the file databricks_mcp_tools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for databricks_mcp_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 429d3c59a16e7f138b6e2f3e03e27512680478c9e3b34ae2d5a4701e583bbeaf
MD5 9a21dff776daa384c0ade08aa8b04ee0
BLAKE2b-256 e7c32b4ea58f3dafa1d36ecd4ddf908804cee2f0ce433a73273f965b3c20a153

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page