databricks-mcp
A read-only MCP server that enables users to query Databricks SQL, browse metadata, and monitor Delta Lake tables. It also supports tracking Databricks Jobs, DLT Pipelines, and cluster metrics through natural language interfaces.
README
databricks-mcp
Read this in other languages: 正體中文
A read-only MCP (Model Context Protocol) server for Databricks, enabling Claude to query Databricks SQL, browse metadata, and monitor jobs/pipelines.
Features
- SQL Queries: Execute SELECT, SHOW, DESCRIBE queries (write operations blocked)
- Metadata Browsing: List catalogs, schemas, tables, and search tables
- Delta Lake: View table history, details, and grants
- Jobs & Pipelines: List and monitor Databricks Jobs and DLT Pipelines
- Query History: Browse SQL query history with filters
- Cluster Metrics: Monitor CPU, memory, network usage from system tables
Installation
Prerequisites
- Python 3.13+
- uv package manager
- Databricks workspace with SQL Warehouse
Setup
# Clone the repository
git clone https://github.com/ChrisChoTW/databricks-mcp.git
cd databricks-mcp
# Install dependencies
uv sync
# Create .env file
cp .env.example .env
Configuration
Edit .env with your Databricks credentials:
DATABRICKS_SERVER_HOSTNAME=your-workspace.cloud.databricks.com
DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/your-warehouse-id
DATABRICKS_TOKEN=your-personal-access-token
Usage
With Claude Code
Add to your Claude Code MCP configuration (~/.claude.json):
{
"mcpServers": {
"databricks-sql": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/path/to/databricks-mcp",
"run",
"python",
"server.py"
],
"env": {
"DATABRICKS_SERVER_HOSTNAME": "your-workspace.cloud.databricks.com",
"DATABRICKS_HTTP_PATH": "/sql/1.0/warehouses/your-warehouse-id",
"DATABRICKS_TOKEN": "your-token"
}
}
}
}
Standalone
uv run python server.py
Available Tools
SQL & Metadata
| Tool | Description |
|---|---|
databricks_query |
Execute SQL queries (read-only) |
list_catalogs |
List all catalogs |
list_schemas |
List schemas in a catalog |
list_tables |
List tables in a schema |
get_table_schema |
Get table structure (DESCRIBE EXTENDED) |
search_tables |
Search tables by name |
Delta Lake
| Tool | Description |
|---|---|
get_table_history |
View Delta table change history |
get_table_detail |
View Delta table details |
get_grants |
View object permissions |
list_volumes |
List Unity Catalog volumes |
Jobs & Pipelines
| Tool | Description |
|---|---|
list_jobs |
List Databricks Jobs |
get_job |
Get job details |
list_job_runs |
List job run history |
get_job_run |
Get run details |
list_pipelines |
List DLT Pipelines |
get_pipeline |
Get pipeline status |
Compute & Monitoring
| Tool | Description |
|---|---|
list_query_history |
List SQL query history |
list_warehouses |
List SQL Warehouses |
list_clusters |
List clusters |
get_cluster_metrics |
Get cluster CPU/memory metrics |
get_cluster_events |
Get cluster events |
Project Structure
databricks-mcp/
├── server.py # Entry point
├── core.py # Shared connections and MCP instance
└── tools/
├── query.py # SQL queries and metadata
├── delta.py # Delta Lake and permissions
├── jobs.py # Jobs management
├── pipelines.py # DLT Pipelines
├── compute.py # Clusters and query history
└── metrics.py # Cluster metrics
Security
This server is read-only by design:
- ❌ INSERT, UPDATE, DELETE, DROP, TRUNCATE, MERGE, COPY blocked
- ✅ SELECT, SHOW, DESCRIBE, CREATE VIEW allowed
- Credentials are passed via environment variables (never hardcoded)
License
MIT
Contributing
Issues and pull requests are welcome!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。