A Model Context Protocol (MCP) server that connects to Databricks API, allowing LLMs to run SQL queries, list jobs, and get job status. - Run SQL queries on Databricks SQL warehouses - List all Databricks jobs - Get status of specific Databricks jobs - Get detailed information about Databricks jobs - Python 3.7+ - Databricks workspace with: - Personal access token - SQL warehouse endpoint - Permis
Add this skill
npx mdskills install JordiNeil/mcp-databricks-serverWell-documented MCP server for Databricks with clear setup instructions and useful SQL/job tools
1# Databricks MCP Server23A Model Context Protocol (MCP) server that connects to Databricks API, allowing LLMs to run SQL queries, list jobs, and get job status.45## Features67- Run SQL queries on Databricks SQL warehouses8- List all Databricks jobs9- Get status of specific Databricks jobs10- Get detailed information about Databricks jobs1112## Prerequisites1314- Python 3.7+15- Databricks workspace with:16 - Personal access token17 - SQL warehouse endpoint18 - Permissions to run queries and access jobs1920## Setup21221. Clone this repository232. Create and activate a virtual environment (recommended):24 ```25 python -m venv .venv26 source .venv/bin/activate # On Windows: .venv\Scripts\activate27 ```283. Install dependencies:29 ```30 pip install -r requirements.txt31 ```324. Create a `.env` file in the root directory with the following variables:33 ```34 DATABRICKS_HOST=your-databricks-instance.cloud.databricks.com35 DATABRICKS_TOKEN=your-personal-access-token36 DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/your-warehouse-id37 ```385. Test your connection (optional but recommended):39 ```40 python test_connection.py41 ```4243### Obtaining Databricks Credentials44451. **Host**: Your Databricks instance URL (e.g., `your-instance.cloud.databricks.com`)462. **Token**: Create a personal access token in Databricks:47 - Go to User Settings (click your username in the top right)48 - Select "Developer" tab49 - Click "Manage" under "Access tokens"50 - Generate a new token, and save it immediately513. **HTTP Path**: For your SQL warehouse:52 - Go to SQL Warehouses in Databricks53 - Select your warehouse54 - Find the connection details and copy the HTTP Path5556## Running the Server5758Start the MCP server:59```60python main.py61```6263You can test the MCP server using the inspector by running6465```66npx @modelcontextprotocol/inspector python3 main.py67```6869## Available MCP Tools7071The following MCP tools are available:72731. **run_sql_query(sql: str)** - Execute SQL queries on your Databricks SQL warehouse742. **list_jobs()** - List all Databricks jobs in your workspace753. **get_job_status(job_id: int)** - Get the status of a specific Databricks job by ID764. **get_job_details(job_id: int)** - Get detailed information about a specific Databricks job7778## Example Usage with LLMs7980When used with LLMs that support the MCP protocol, this server enables natural language interaction with your Databricks environment:8182- "Show me all tables in the database"83- "Run a query to count records in the customer table"84- "List all my Databricks jobs"85- "Check the status of job #123"86- "Show me details about job #456"8788## Troubleshooting8990### Connection Issues9192- Ensure your Databricks host is correct and doesn't include `https://` prefix93- Check that your SQL warehouse is running and accessible94- Verify your personal access token has the necessary permissions95- Run the included test script: `python test_connection.py`9697## Security Considerations9899- Your Databricks personal access token provides direct access to your workspace100- Secure your `.env` file and never commit it to version control101- Consider using Databricks token with appropriate permission scopes only102- Run this server in a secure environment103
Full transparency — inspect the skill content before installing.