Get the FREE Ultimate OpenClaw Setup Guide →

mcp-databricks

Model Context Protocol (MCP) server for Databricks that empowers AI agents to autonomously interact with Unity Catalog metadata. Enables data discovery, lineage analysis, and intelligent SQL execution. Agents explore catalogs/schemas/tables, understand relationships, discover notebooks/jobs, and execute queries - greatly reducing ad-hoc query time.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rafaelcartenet-mcp-databricks-server npx -y mcp-databricks \
  --env DATABRICKS_HOST="Databricks workspace URL (e.g., https://<workspace>.cloud.databricks.com)" \
  --env DATABRICKS_TOKEN="Databricks PAT with appropriate permissions" \
  --env UC_DEFAULT_CATALOG="default Unity Catalog catalog to use (optional)"

How to use

This MCP server exposes tools to explore Unity Catalog metadata and the data processing lineage within Databricks, enabling an agent or user to discover catalogs, schemas, tables, and their descriptions, as well as inspect code that processes data. The included capabilities focus on querying Databricks SQL via a dedicated execute_sql_query tool and navigating UC assets through a set of explorer tools. Use these tools to build a rich context for an LLM agent: list available Unity Catalogs, dive into a catalog to see its schemas, inspect schemas with or without column details, and open tables to understand their structure and lineage. The agent can also browse notebooks and jobs that read from or write to particular tables to understand end-to-end data flow and transformation logic, supporting more accurate query generation and data discovery workflows.

How to install

Prerequisites:

  • Node.js (v14+ recommended) and npm installed on your system
  • Git (optional, for cloning repositories)

Install and run the MCP server:

  1. Install the package (if not using npx directly): git clone https://github.com/your-org/mcp-databricks.git cd mcp-databricks npm install

  2. Run the server using the recommended MCP config (example with npx): npx -y mcp-databricks

  3. Alternatively, install and run locally via npm script (if provided): npm install npm run start

  4. Validate the server is reachable (example): curl http://localhost:8080/health

Notes:

  • Ensure your Databricks workspace URL and a valid PAT are provided via environment variables as shown in the mcp_config section.
  • If running behind a firewall or in a restricted environment, adjust host/port mappings accordingly.

Additional notes

Environment variables:

  • DATABRICKS_HOST: Databricks workspace URL (required for API access)
  • DATABRICKS_TOKEN: Personal Access Token with UC read permissions (required)
  • UC_DEFAULT_CATALOG: Optional default Unity Catalog catalog to scope queries

Common issues:

  • If you cannot reach the Databricks API, verify network egress rules and that the PAT has not expired.
  • Ensure that the Unity Catalog metadata is populated; empty catalogs or schemas will return no results.
  • When using describe_uc_schema with include_columns=True, outputs can be lengthy; consider setting a limit or streaming results.

Security tip:

  • Do not commit tokens or secrets to version control. Use environment variables or secret managers where possible.

Related MCP Servers

Sponsor this space

Reach thousands of developers