Most data MCP demos stop at “let the model run a query.”
DatabricksMCP is being built for a different target: a broad, governable, self-hostable platform gateway that lets AI assistants and agents inspect and operate a Databricks environment without bypassing security, policy, or operational controls.
DatabricksMCP is an open-source Model Context Protocol (MCP) server for Databricks. It lets AI agents securely query Databricks SQL, explore Unity Catalog, run Jobs/Notebooks, and use Vector Search. Designed for governed, auditable workflows, it makes Databricks a first-class MCP integration.
星數
18
工具
—
可用率
—
Today the project exposes 63 read tools across 11 capability packs — Unity Catalog, SQL, Jobs, Lakeflow pipelines, compute, governance, workspace assets, MLflow, AI (Model Serving, Vector Search, Genie), and cost/audit — plus a controlled-mutation contract with a first gated write pack.
[!IMPORTANT]
DatabricksMCP is pre-1.0 and under active development. The read surface is always on. State-changing tools are disabled by default; when enabled they are gated per-tool, and destructive actions require an approval token and are audited (see Controlled mutations). Remote deployments still require additional authentication and transport hardening before internet exposure.
[!NOTE]
DatabricksMCP is an independent open-source community project. It is not affiliated with, endorsed by, or sponsored by Databricks, Inc. Databricks and related marks are trademarks of their respective owners.
Why DatabricksMCP?
A production-oriented MCP server for an enterprise data platform needs more than API wrappers.
DatabricksMCP is designed around five principles:
Policy before capability — every tool is registered with explicit operational metadata and passes a central policy gate.
Bounded by default — list operations, SQL results, bytes, wait time, and warehouse access can be constrained.
Credentials stay out of prompts — Databricks unified authentication is used instead of accepting secrets as model-generated tool arguments.
Platform-wide, not SQL-only — one server can expose governed context from catalog, compute, workflows, governance, workspace, ML/AI, and cost services.
Extensible by domain — capability packs isolate platform surfaces so new functionality does not turn the server into one monolithic tool module.
Current capability map
Capability pack
Tools
Current coverage
Core
5
Health, identity, server introspection, enabled capabilities, policy status
flowchart LR
A[AI assistants / agents / IDEs] --> B{MCP transport}
B -->|stdio| C[DatabricksMCP]
B -->|Streamable HTTP| C
C --> R[Policy-enforcing Registrar]
R --> P[Policy Engine]
R --> M[Mutation Controller<br/>dry-run · approval · audit]
R --> CP[Capability Packs]
CP --> CORE[Core]
CP --> UC[Unity Catalog]
CP --> SQL[SQL]
CP --> JOBS[Jobs]
CP --> PIPE[Lakeflow]
CP --> COMP[Compute]
CP --> GOV[Governance]
CP --> WS[Workspace]
CP --> MLF[MLflow]
CP --> AI[AI]
CP --> COST[Cost & audit]
CORE --> S[Typed Databricks Service Layer]
UC --> S
SQL --> S
JOBS --> S
PIPE --> S
COMP --> S
GOV --> S
WS --> S
MLF --> S
AI --> S
COST --> S
S --> SDK[Official Databricks Python SDK]
SDK --> D[Databricks APIs / Workspace / Unity Catalog]
The MCP layer is intentionally thin. Tool implementations delegate to a testable service layer, while the registrar applies policy checks consistently before a capability executes, and routes every mutation through a single safety contract.
Safety model
DatabricksMCP treats model-generated tool input as untrusted.
SQL guardrails
execute_read_only_sql parses SQL with the Databricks dialect using sqlglot and rejects requests unless they are positively recognized as permitted query forms.
Current protections include:
single-statement enforcement;
deny-by-default AST validation;
DML/DDL/administrative command rejection;
nested command checks;
bounded rows;
bounded response bytes;
bounded synchronous wait time;
optional SQL warehouse allowlist;
statement polling and cancellation.
Controlled mutations
State-changing tools are off by default. They register only when DATABRICKS_MCP_ACCESS_MODE=controlled-write, and each one executes only if its name is in DATABRICKS_MCP_WRITE_TOOLS_ALLOW. Every mutation routes through one contract:
policy → dry-run plan → approval → execute → audit
Dry-run — call any write tool with dry_run=true to get a plan (risk, target, argument fingerprint) without executing.
Approval — destructive and privileged actions require a short-lived, single-use token bound to the exact tool and arguments; a dry-run returns the token. Wrong-argument, wrong-tool, expired, and replayed tokens are rejected.
Audit — every branch (denied, dry-run, approval-required, executed, error) emits a structured event that never contains argument values.
export DATABRICKS_MCP_TRANSPORT=streamable-http
export DATABRICKS_MCP_HOST=127.0.0.1
export DATABRICKS_MCP_PORT=8000
uv run databricks-mcp
The MCP endpoint is /mcp.
[!WARNING]
Do not expose the current HTTP server directly to the public internet. Put it behind TLS and a standards-compliant authentication layer until native remote MCP authorization is implemented.
Configuration
Variable
Default
Purpose
DATABRICKS_MCP_TRANSPORT
stdio
stdio or streamable-http
DATABRICKS_MCP_HOST
127.0.0.1
HTTP bind address
DATABRICKS_MCP_PORT
8000
HTTP bind port
DATABRICKS_MCP_LOG_LEVEL
INFO
Log level
DATABRICKS_MCP_ACCESS_MODE
read-only
read-only or controlled-write
DATABRICKS_MCP_WRITE_TOOLS_ALLOW
unset
Comma-separated write tools to enable (controlled-write only)
DATABRICKS_MCP_APPROVAL_TTL_SECONDS
300
Approval-token lifetime for destructive actions (30–3600)
DATABRICKS_MCP_DEFAULT_PAGE_SIZE
100
Default bounded listing size
DATABRICKS_MCP_SQL_MAX_ROWS
1000
SQL result-row ceiling
DATABRICKS_MCP_SQL_BYTE_LIMIT
10000000
SQL result-byte ceiling
DATABRICKS_MCP_SQL_WAIT_SECONDS
30
Initial SQL wait before polling
DATABRICKS_MCP_SQL_WAREHOUSES
unset
Optional comma-separated warehouse allowlist
Standard DATABRICKS_* authentication variables are consumed by the official Databricks SDK.
What “production-grade” means for this project
The goal is not simply to accumulate more tools. The goal is to make broad platform access safe enough to operate in enterprise environments.
The production-readiness backlog is therefore centered on:
1. Remote identity and isolation
native MCP OAuth 2.1 protected-resource support;
audience-bound token validation;
no token passthrough;
user-to-Databricks identity mapping;
M2M, U2M, OBO, and workload identity patterns;
multi-user and multi-workspace isolation.
2. Policy as a first-class subsystem
multidimensional policy: effect, sensitivity, privilege, cost, external side effects;
pack/tool/catalog/schema/table/path allowlists and denylists;
tag-aware access policies;
per-tool scopes;
approval policies for privileged actions (implemented for mutations);
policy decision audit records (implemented).
3. MCP-native contracts
explicit output schemas and structured content (implemented);
Extension SDK — third-party capability packs without modifying the core server.
Development
uv sync --all-groups
uv run ruff check .
uv run ruff format --check .
uv run mypy src
uv run pytest
The project uses strict typing, automated formatting/linting, tests with coverage gates, dependency automation, CodeQL, and a non-root container image.
Contributing
Contributions are welcome.
Before adding a capability, ask:
What Databricks permission does it require?
Can the operation expose sensitive data?
Can it change state?
Can it create material cost?
Can its output be bounded?
Does it need dry-run, approval, idempotency, or rollback?
signed releases, SBOM/provenance, PyPI and container distribution;
MCP Registry publication;
a public extension SDK.
License
Apache License 2.0.
D
DatabricksMCP
Purvanshsingh·18 顆星·
DatabricksMCP is an open-source Model Context Protocol (MCP) server for Databricks. It lets AI agents securely query Databricks SQL, explore Unity Catalog, run Jobs/Notebooks, and use Vector Search. D
DatabricksMCP is an open-source Model Context Protocol (MCP) server for Databricks. It lets AI agents securely query Databricks SQL, explore Unity Catalog, run Jobs/Notebooks, and use Vector Search. Designed for governed, auditable workflows, it makes Databricks a first-class MCP integration.
上次檢查時間:2026-10-28。 DatabricksMCP is an open-source Model Context Protocol (MCP) server for Databricks. It lets AI agents securely query Databricks SQL, explore Unity Catalog, run Jobs/Notebooks, and use Vector Search. Designed for governed, auditable workflows, it makes Databricks a first-class MCP integration.