mcp-databricks
MCP Server for Databricks
claude mcp add --transport stdio jordineil-mcp-databricks-server python main.py \ --env DATABRICKS_HOST="your-databricks-instance.cloud.databricks.com" \ --env DATABRICKS_TOKEN="your-personal-access-token" \ --env DATABRICKS_HTTP_PATH="/sql/1.0/warehouses/your-warehouse-id"
How to use
This MCP server exposes tools to interact with your Databricks workspace from a Model Context Protocol client. It connects to the Databricks REST API and enables running SQL queries against a Databricks SQL warehouse, listing all jobs in the workspace, and querying status or details for specific jobs. The available MCP tools include: run_sql_query(sql: str) to execute an SQL query and return results, list_jobs() to fetch the list of jobs, get_job_status(job_id: int) to retrieve the status of a given job, and get_job_details(job_id: int) to obtain more in-depth information about a job. To use these tools, your agent or client can pass natural language prompts or structured requests that map to these tool functions, enabling seamless integration with LLMs that support MCP.
How to install
Prerequisites:
- Python 3.7+
- Git
- Network access to Databricks API
Step-by-step installation:
- Clone the repository
git clone https://github.com/your-org/jordineil-mcp-databricks-server.git
cd jordineil-mcp-databricks-server
- Create and activate a virtual environment On macOS/Linux:
python -m venv .venv
source .venv/bin/activate
On Windows:
python -m venv .venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Configure environment variables Create a .env file in the project root with:
DATABRICKS_HOST=your-databricks-instance.cloud.databricks.com
DATABRICKS_TOKEN=your-personal-access-token
DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/your-warehouse-id
- Run the server
python main.py
Optional: run the inspector (if you have the MCP inspector available):
npx @modelcontextprotocol/inspector python3 main.py
Additional notes
Tips and common considerations:
- Keep your Databricks token secure; do not commit .env to version control.
- Ensure the SQL warehouse is running and accessible from the host running this MCP server.
- If you rotate tokens, update DATABRICKS_TOKEN and restart the server.
- The .env variables correspond to the Databricks host, token, and the HTTP path for your SQL warehouse; incorrect values will result in connection errors.
- For security, consider restricting token scopes to SQL warehouse access required by your usage.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP