databricks_ops_mcp
A governed MCP server exposing Databricks operations as tools for jobs orchestration, SQL execution, notebook creation, Unity Catalog governance, lineage, clusters, and DLT pipelines, with safety features like dry-run and audit logging.
README
databricks_ops_mcp
A governed MCP server exposing Databricks operations as tools — jobs orchestration, SQL execution, notebook creation, Unity Catalog governance, lineage, clusters, and DLT pipelines. Built as a reuse template: same pattern as a SharePoint/Jira MCP server, pointed at the Databricks REST API.
Tools (17)
| Category | Read-only | Write-gated |
|---|---|---|
| Jobs | list_jobs, get_run_status, list_failed_runs | run_job, repair_run |
| SQL | preview_table | execute_sql (DML/DDL only; SELECT is free) |
| Workspace | export_notebook, list_workspace | create_notebook |
| Unity Catalog | list_tables, get_table_grants, get_table_lineage | — |
| Compute/DLT | list_clusters, list_pipelines | restart_cluster, start_pipeline_update |
Safety model
- Dry-run by default: every write tool returns a validated dry-run message until
DBX_WRITE_ENABLED=true. Promote per environment (DEV=true, PROD=false + approval flow). - Audit log: every tool call appends a JSONL record (timestamp, tool, payload).
- Context safety: results capped at
DBX_MAX_RESULT_ROWS/DBX_MAX_RESULT_CHARS. - Read-only SQL enforcement: statements must start with SELECT/SHOW/DESCRIBE/EXPLAIN/WITH unless writes are enabled; multi-statement submissions are rejected.
- Placeholders only: no real hostnames, principals, or credentials anywhere in code. Everything comes from environment variables.
Setup
pip install -r requirements.txt
cp .env.example .env # fill in host, token (PAT or OAuth M2M), warehouse ID
Run
# Local (stdio) — for Claude Desktop / Claude Code
python server.py
# Remote (streamable HTTP) — for Databricks Apps / ECS / Lambda-backed deployments
MCP_TRANSPORT=http python server.py
Claude Desktop config
{
"mcpServers": {
"databricks_ops": {
"command": "python",
"args": ["/path/to/databricks_ops_mcp/server.py"],
"env": {
"DATABRICKS_HOST": "https://workspace_placeholder.cloud.databricks.com",
"DATABRICKS_TOKEN": "token_placeholder",
"DATABRICKS_WAREHOUSE_ID": "warehouse_id_placeholder",
"DBX_WRITE_ENABLED": "false"
}
}
}
}
Claude Code
claude mcp add databricks_ops -- python /path/to/databricks_ops_mcp/server.py
Bedrock / custom agents
Run with MCP_TRANSPORT=http behind your FastAPI gateway or as a Databricks App;
point the agent's MCP client at the streamable HTTP endpoint. For Databricks Apps
hosting, replace the bearer token with app OAuth (on-behalf-of user) so Unity
Catalog enforces per-user permissions.
Example flows
- "List failed runs from today, get the status of the worst one, and repair it"
→
list_failed_runs→get_run_status→repair_run(approval-gated in PROD) - "Create a notebook that deduplicates the claims feed and preview the target table"
→
create_notebook→preview_table - "What feeds this table and who can modify it?"
→
get_table_lineage+get_table_grants(Conversational Data Steward core)
Extension roadmap
create_job_from_spec— NL → metadata-driven pipeline config → Jobs API- Column-level lineage + cross-platform trace into MSTR cubes (second MCP server)
deploy_bundlevia Asset Bundles for Git-first production deployment- Approval elicitation (
ctx.elicit) on write tools instead of a global flag - Cost tools over
/api/2.0/usage(billing usage export)
Project layout
databricks_ops_mcp/
├── server.py # FastMCP/MCPServer registration (SDK 1.x & 2.x compatible)
├── client.py # Shared async REST client, errors, audit, truncation
├── config.py # Env-driven settings and guardrails
├── tools/
│ ├── jobs.py # /api/2.2/jobs/*
│ ├── sql.py # /api/2.0/sql/statements (submit → poll → fetch)
│ ├── workspace.py # /api/2.0/workspace/* (notebook import/export)
│ ├── unity_catalog.py # /api/2.1/unity-catalog/* + lineage-tracking
│ └── compute.py # /api/2.1/clusters/*, /api/2.0/pipelines/*
├── requirements.txt
└── .env.example
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.