Skip to main content

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 Developer → Access 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;

Publishing to PyPI

This project is automatically published to PyPI using GitHub Actions when you push a version tag.

How to Publish a New Version

  1. Update the version number in pyproject.toml
  2. Commit your changes and create a tag:
    # Update version in pyproject.toml naar bijv. 0.1.2
    git add pyproject.toml
    git commit -m "Bump version to 0.1.2"
    git tag v0.1.2
    git push origin v0.1.2
    
  3. The GitHub Action will automatically build and publish to PyPI

Setup Requirements

Before the first publish, you need to add your PyPI API token to GitHub Secrets:

  1. Go to your repository on GitHub
  2. Navigate to Settings → Secrets and variables → Actions
  3. Click New repository secret
  4. Name: PYPI_API_TOKEN
  5. Value: Your PyPI API token (starts with pypi-)
  6. Click Add secret

The workflow will automatically trigger when you push a tag matching the pattern v*.*.* (e.g., v0.1.2, v1.0.0).

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

Metadata

Release files for databricks-mcp-tools 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for databricks-mcp-tools 0.1.2
File Size Uploaded Provenance
databricks_mcp_tools-0.1.2.tar.gz 26.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for databricks-mcp-tools 0.1.2
File Interpreter ABI Platform
databricks_mcp_tools-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 68.0 kB

Release files / databricks_mcp_tools-0.1.2.tar.gz

Download URL databricks_mcp_tools-0.1.2.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4e077253e55f1cf1e701bcd1ef21e5f8d1744bccc364334c2f713c779fb7e0da
BLAKE2b-256 checksum
How to use checksums
a156ba8e5eae9811d4e2839e0242d19ab4cd350213a2286d7a292c629b4a177e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / databricks_mcp_tools-0.1.2-py3-none-any.whl

Download URL databricks_mcp_tools-0.1.2-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86e8a4c3b95b201f136dd39026b9b985010ccaf76c933bd88dabff9db8cb07bf
BLAKE2b-256 checksum
How to use checksums
841cbcb420cf698c8d62104f63fd36c4987bbc6ae8dd97bd2c99785a17d1633f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for databricks-mcp-tools 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page