A minimal MCP server that exposes Databricks SQL tools via the Model Context Protocol. Authenticates using OAuth service principal (M2M) — no PAT required.
| Tool | Description |
|---|---|
list_tables |
List all tables in a given catalog |
describe_table |
Describe columns of a fully-qualified table |
query |
Execute a read-only SQL query |
- Clone and install dependencies:
pip install -r requirements.txt- Configure environment variables:
cp .env.example .env
# Fill in your Databricks workspace details and service principal credentialsRequired variables:
DATABRICKS_HOST— Databricks workspace URLDATABRICKS_HTTP_PATH— SQL warehouse HTTP pathDATABRICKS_CLIENT_ID— Service principal client IDDATABRICKS_CLIENT_SECRET— Service principal client secret
- Run the server:
python server.pyThe server uses stdio transport by default for MCP communication.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"databricks": {
"command": "python",
"args": ["/absolute/path/to/server.py"]
}
}
}- Read-only — write operations (INSERT, UPDATE, DELETE, DROP, etc.) are blocked.
- Partition pruning — queries against Skyscanner tables must include a
dtcolumn filter.