databricks-mcp-server

databricks-mcp-server

0

This project sets up an MCP server for executing SQL queries on Databricks, facilitating data retrieval and complex task execution through APIs. It supports features like listing schemas, tables, and views, as well as describing table schemas and extracting SQL definitions.

Databricks MCP Server

This project is a Model Context Protocol (MCP) server designed for executing SQL queries against Databricks through the Statement Execution API. It features capabilities such as listing schemas, tables, views, and describing table schemas. It also allows getting SQL definitions of views and facilitates complex tasks when used in Agent mode.

Features

  • Execute SQL queries on Databricks
  • List available schemas in a catalog
  • List tables in a schema
  • Describe table schemas
  • List views in a catalog and schema
  • Get SQL definitions of views

Setup

System requires Python 3.10+. Installation involves cloning the repository, installing dependencies, and setting environment variables for Databricks credentials.

Permissions Requirements

Ensure you have necessary SQL warehouse and token permissions configured in Databricks UI.

Running the Server

The server can be run in standalone mode or be configured to work with Cursor's AI assistant.

Handling Long-Running Queries

The server handles long-running queries by polling the Databricks API, with a default timeout of 10 minutes.