Databricks MCP Server C04f2fd6

MCP数据服务

提供方 keruru-amuri

数据服务 stdio · 本地进程 OAuth 授权 社区 / 第三方 Claude DesktopClaude
查看接入方式

一个基于Docker的Databricks集成服务器,结合CLI和SDK提供统一的接口,用于集群管理、工作区操作、Unity Catalog集成和MLflow支持。

一句话选型结论

按资料字段整理

Databricks MCP Server C04f2fd6 属于数据服务类 MCP 服务器,stdio · 本地进程,OAuth 授权,可直接接入 Claude Desktop、Claude,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类数据服务 传输方式stdio · 本地进程 鉴权OAuth 授权 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 54 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

数据服务
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量54暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

Databricks集成Python本地部署集群管理工作区操作UnityCatalogMLflow支持

安装与配置

stdio · 本地进程 OAuth 授权
客户端在本机拉起子进程,数据不出本机
python -m venv .venv

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 54 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
数据库查询

用自然语言查库、取数,不用手写 SQL。

数据同步与清洗

把多来源数据拉到一处做整理。

报表取数

按口径快速拉出统计结果。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 54 个工具,覆盖面较广,能满足多种调用。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在数据服务场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Databricks MCP Server C04f2fd6当前 54 stdio · 本地进程 本地部署 有 2026-05-17
Memory 9d25f64e 9 未标注 未标注 无 2026-05-17
Getzep MCP 9 stdio · 本地进程 本地部署 有 2026-05-17
anything-llm 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Prisma MCP Server 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Astr Bot 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

数据服务
字段来自项目仓库与公开索引,中文说明由本站标注
提供方keruru-amuri上游标注的维护方 keruru-amuri
分类数据服务本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

17.9 KB
来自项目仓库与上游目录的原文,未做删改

Databricks MCP Server

A Docker-based Model Context Protocol (MCP) server that provides comprehensive Databricks integration by combining both the Databricks CLI and SDK. This server enables AI assistants to interact with Databricks workspaces through a unified interface that intelligently chooses between CLI commands and SDK operations based on the task requirements.

🚀 Key Features

🐳 Docker-First Architecture

  • Containerized deployment for consistent environments
  • Pre-configured with Databricks CLI and SDK
  • Easy deployment to any container platform
  • Isolated dependencies and secure execution

🔄 Dual-Mode Operations

  • CLI Tools: Direct command-line interface for file operations, authentication, and workspace management
  • SDK Tools: Programmatic access for complex queries, data operations, and automation
  • Hybrid Tools: Intelligent selection between CLI and SDK based on operation type

🖥️ Cluster Management

  • List, start, stop, and restart clusters
  • Get detailed cluster status and configuration
  • Automatic cluster lifecycle management
  • Real-time cluster monitoring

📝 Workspace Operations

  • Create, read, update, and delete notebooks and files
  • Execute code on Databricks clusters
  • Support for Python, SQL, Scala, and R notebooks
  • Workspace file system navigation

🗄️ Unity Catalog Integration

  • Browse catalogs, schemas, and tables
  • Execute SQL queries on SQL warehouses
  • Get detailed table metadata and schema information
  • Data lineage and governance operations

🤖 ML & MLflow Support

  • List experiments and registered models
  • Get model versions and serving endpoints
  • Access MLflow tracking and model registry
  • Model deployment and monitoring

⚡ Job & Pipeline Management

  • Create and run notebooks as jobs
  • Monitor job execution and get results
  • Delta Live Tables pipeline operations
  • Workflow orchestration

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • Databricks workspace access
  • Personal Access Token or Service Principal credentials

Installation

  1. Clone the repository:bash git clone <repository-url> cd databricks-mcp-server

  2. Create virtual environment:bash python -m venv .venv .venv\Scripts\activate # Windows # source .venv/bin/activate # Linux/macOS

  3. Install dependencies:bash pip install -e .

  4. Configure credentials:
    Set your credentials in the MCP client configuration (see Usage section below)

Usage with MCP Clients

Claude Desktop Configuration

After installing the package (pip install -e .), add this to your Claude Desktop MCP servers configuration:```json
{
"mcpServers": {
"databricks": {
"command": "databricks-mcp-server",
"env": {
"DATABRICKS_HOST": "https://your-workspace.cloud.databricks.com",
"DATABRICKS_TOKEN": "your-databricks-token-here",
"DATABRICKS_MCP_PORT": "4040",
"DATABRICKS_MCP_HOST": "0.0.0.0"
}
}
}
}


**Replace the placeholder values:**
- `your-workspace.cloud.databricks.com` → Your actual Databricks workspace URL
- `your-databricks-token-here` → Your actual Databricks Personal Access Token

#### Direct Command Line Usage```bash
# After package installation
databricks-mcp-server

# Alternative
python -m databricks_mcp_server

⚙️ Configuration

MCP Client Configuration

The server gets configuration from environment variables set in your MCP client configuration. No .env file is needed - all configuration is done through the MCP client JSON.

Required Environment Variables:

  • DATABRICKS_HOST - Your Databricks workspace URL
  • DATABRICKS_TOKEN - Your Databricks Personal Access Token

Optional Environment Variables:

  • DATABRICKS_MCP_PORT - Server port (default: 3000)
  • DATABRICKS_MCP_HOST - Server host (default: 0.0.0.0)
  • DATABRICKS_MCP_LOG_LEVEL - Log level (default: INFO)
  • DATABRICKS_CLUSTER_ID - Default cluster for execution
  • DATABRICKS_WAREHOUSE_ID - Default SQL warehouse

Alternative Authentication (Optional):

  • DATABRICKS_CLIENT_ID - OAuth client ID
  • DATABRICKS_CLIENT_SECRET - OAuth client secret
  • DATABRICKS_AZURE_TENANT_ID - Azure AD tenant ID

MCP Client Configuration Examples

For Claude Desktop (Python Package)

Add to your claude_desktop_config.json:```json
{
"mcpServers": {
"databricks": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env-file", "/path/to/.env",
"databricks-mcp-server:latest"
]
}
}
}


#### For VS Code with MCP Extension (Docker)

Add to your MCP configuration:```json
{
  "mcpServers": {
    "databricks": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "DATABRICKS_HOST=https://your-workspace.cloud.databricks.com",
        "-e", "DATABRICKS_TOKEN=your-pat-token",
        "databricks-mcp-server:latest"
      ]
    }
  }
}

For Development (Local Python)```json

{
"mcpServers": {
"databricks": {
"command": "uvx",
"args": ["databricks-mcp-server"],
"env": {
"DATABRICKS_HOST": "https://your-workspace.cloud.databricks.com",
"DATABRICKS_TOKEN": "your-pat-token"
}
}
}
}


## 📖 Usage Examples

### Cluster Management```python
# List all clusters (uses SDK for detailed info)
clusters = await cluster_list()

# Get cluster status (hybrid: CLI for quick status, SDK for details)
status = await cluster_get_status(cluster_id="1234-567890-abc123")

# Start a cluster (SDK for programmatic control)
result = await cluster_start(cluster_id="1234-567890-abc123", wait=True)

# Monitor cluster events (SDK streaming)
events = await cluster_get_events(cluster_id="1234-567890-abc123")

Workspace Operations```python

List workspace files (CLI for file system operations)

files = await workspace_list(path="/Users/your-email@company.com")

Create a new notebook (CLI for file operations)

await workspace_create_notebook(
path="/Users/your-email@company.com/my-notebook",
content="print('Hello, Databricks!')",
language="PYTHON"
)

Execute code on a cluster (SDK for execution control)

result = await cluster_execute_code(
cluster_id="1234-567890-abc123",
code="spark.sql('SELECT 1').show()",
language="python"
)

Upload files to workspace (CLI for file uploads)

await workspace_upload_file(
local_path="./data.csv",
workspace_path="/FileStore/shared_uploads/data.csv"
)


### Job Management```python
# Create and run a notebook job (hybrid approach)
job_run = await job_run_notebook(
    notebook_path="/Users/your-email@company.com/my-notebook",
    cluster_id="1234-567890-abc123",
    parameters={"param1": "value1"},
    wait=True
)

# Monitor job progress (SDK for real-time updates)
status = await job_get_run_status(run_id=job_run["run_id"])

# Get job output (CLI for log retrieval)
output = await job_get_run_output(run_id=job_run["run_id"])

Unity Catalog```python

List catalogs (SDK for metadata operations)

catalogs = await catalog_list_catalogs()

Browse schema and tables (SDK for structured queries)

tables = await catalog_list_tables(catalog_name="main", schema_name="default")

Execute SQL query (SDK for query execution)

result = await catalog_execute_sql(
warehouse_id="abc123def456",
query="SELECT COUNT(*) FROM main.default.my_table"
)

Get table lineage (SDK for governance features)

lineage = await catalog_get_table_lineage(
catalog_name="main",
schema_name="default",
table_name="my_table"
)


### ML & MLflow Operations```python
# List MLflow experiments (SDK for ML operations)
experiments = await ml_list_experiments()

# Create and log to experiment (SDK for tracking)
run = await ml_create_run(
    experiment_id="123456",
    run_name="my-experiment-run"
)

# Register model (SDK for model registry)
model = await ml_register_model(
    name="my-model",
    source="runs:/run-id/model"
)

# Deploy model to serving endpoint (SDK for deployment)
endpoint = await ml_create_serving_endpoint(
    name="my-model-endpoint",
    model_name="my-model",
    model_version="1"
)

🛠️ Available Tools

🖥️ Cluster Management Tools

  • cluster_list - List all clusters with detailed information (SDK)
  • cluster_get_status - Get real-time cluster status (Hybrid)
  • cluster_start - Start a cluster and wait for ready state (SDK)
  • cluster_restart - Restart a cluster with optional configuration updates (SDK)
  • cluster_terminate - Terminate a cluster (SDK)
  • cluster_get_events - Get cluster event logs (SDK)
  • cluster_resize - Resize cluster (add/remove nodes) (SDK)

📁 Workspace Management Tools

  • workspace_list - List files and folders in workspace (CLI)
  • workspace_get_content - Get file/notebook content (CLI)
  • workspace_create_notebook - Create new notebook (CLI)
  • workspace_create_folder - Create workspace folder (CLI)
  • workspace_upload_file - Upload local file to workspace (CLI)
  • workspace_download_file - Download workspace file locally (CLI)
  • workspace_delete - Delete workspace file/folder (CLI)
  • workspace_move - Move/rename workspace items (CLI)

🔧 Code Execution Tools

  • cluster_execute_code - Execute code on cluster interactively (SDK)
  • cluster_execute_notebook - Execute entire notebook on cluster (SDK)
  • cluster_get_execution_context - Get or create execution context (SDK)
  • cluster_cancel_execution - Cancel running code execution (SDK)

⚡ Job Management Tools

  • job_list - List all jobs in workspace (SDK)
  • job_get - Get job configuration and details (SDK)
  • job_create - Create new job definition (SDK)
  • job_run_notebook - Run notebook as one-time job (SDK)
  • job_run_now - Trigger existing job run (SDK)
  • job_get_run_status - Get job run status and progress (SDK)
  • job_get_run_output - Get job run logs and output (CLI)
  • job_list_runs - List recent job runs (SDK)
  • job_cancel_run - Cancel running job (SDK)

🗄️ Unity Catalog Tools

  • catalog_list_catalogs - List available catalogs (SDK)
  • catalog_list_schemas - List schemas in catalog (SDK)
  • catalog_list_tables - List tables in schema (SDK)
  • catalog_get_table - Get table metadata and schema (SDK)
  • catalog_execute_sql - Execute SQL query on warehouse (SDK)
  • catalog_list_warehouses - List SQL warehouses (SDK)
  • catalog_get_table_lineage - Get data lineage information (SDK)
  • catalog_create_table - Create new table (SDK)
  • catalog_grant_permissions - Grant table/schema permissions (CLI)

🤖 ML & MLflow Tools

  • ml_list_experiments - List MLflow experiments (SDK)
  • ml_get_experiment - Get experiment details and runs (SDK)
  • ml_create_experiment - Create new experiment (SDK)
  • ml_create_run - Create new experiment run (SDK)
  • ml_log_metrics - Log metrics to run (SDK)
  • ml_log_artifacts - Log artifacts to run (SDK)
  • ml_list_models - List registered models (SDK)
  • ml_get_model - Get model details and versions (SDK)
  • ml_register_model - Register model from run (SDK)
  • ml_list_model_versions - List model versions (SDK)
  • ml_list_serving_endpoints - List model serving endpoints (SDK)
  • ml_create_serving_endpoint - Create serving endpoint (SDK)
  • ml_get_serving_endpoint - Get endpoint status and config (SDK)

🔍 Monitoring & Logging Tools

  • logs_get_cluster_logs - Get cluster driver/executor logs (CLI)
  • logs_get_job_logs - Get job run logs (CLI)
  • metrics_get_cluster_metrics - Get cluster performance metrics (SDK)
  • metrics_get_job_metrics - Get job execution metrics (SDK)

🏗️ Architecture & Development

Project Structure```

databricks-mcp-server/
├── README.md # This file
├── pyproject.toml # Python package configuration
├── Dockerfile # Docker container definition
├── docker-compose.yml # Docker Compose configuration
├── .env.example # Environment variables template
├── .gitignore # Git ignore patterns
├── databricks_mcp_server/ # Main package
│ ├── init.py # Package initialization
│ ├── server.py # FastMCP server implementation
│ ├── config.py # Configuration management
│ ├── models.py # Pydantic data models
│ └── tools/ # Tool implementations
│ ├── init.py # Tools package init
│ └── sdk_tools.py # Reliable Databricks SDK tools
├── tests/ # Test suite
│ ├── init.py
│ ├── test_sdk_tools.py
│ └── test_integration.py
└── scripts/ # Utility scripts
├── setup.sh # Development setup
└── test.sh # Test runner


### Tool Architecture

The server implements a **reliable SDK-based architecture**:

**SDK Tools** (`sdk_tools.py`)
- Native Python SDK integration using the official `databricks-sdk`
- **Best for**: All Databricks operations - reliable, fast, and production-ready
- **Advantages**:
  - Type safety and structured responses
  - Async operations for better performance
  - No CLI dependencies or timeout issues
  - Consistent JSON responses with proper error handling
  - Direct API access for real-time data
- **Uses**: `databricks-sdk` with async/await patterns and proper error handling

> **Note**: CLI and hybrid tools have been removed due to timeout issues and function calling bugs. The SDK approach provides all necessary functionality with better reliability.

### Development Setup

#### Local Development```bash
# Clone repository
git clone <repository-url>
cd databricks-mcp-server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Set up pre-commit hooks
pre-commit install

Docker Development```bash

Build development image

docker build -t databricks-mcp-server:dev .

Run with development mount

docker run -it --rm \
-v $(pwd):/app \
-e DATABRICKS_HOST="your-host" \
-e DATABRICKS_TOKEN="your-token" \
databricks-mcp-server:dev


### Testing```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=databricks_mcp_server

# Run specific test categories
pytest tests/test_cli_tools.py
pytest tests/test_sdk_tools.py
pytest tests/test_integration.py

# Run tests in Docker
docker run --rm \
  -e DATABRICKS_HOST="test-host" \
  -e DATABRICKS_TOKEN="test-token" \
  databricks-mcp-server:latest pytest

Code Quality```bash

Format code

ruff format .

Lint code

ruff check .

Type checking

mypy databricks_mcp_server/

Security scanning

bandit -r databricks_mcp_server/


## 🔧 Troubleshooting

### Common Issues

#### Authentication Problems```bash
# Verify connection
docker run --rm \
  -e DATABRICKS_HOST="your-host" \
  -e DATABRICKS_TOKEN="your-token" \
  databricks-mcp-server:latest \
  databricks auth describe

# Test with CLI
databricks clusters list

Docker Issues```bash

Check container logs

docker logs databricks-mcp

Debug container

docker run -it --rm \
-e DATABRICKS_HOST="your-host" \
-e DATABRICKS_TOKEN="your-token" \
databricks-mcp-server:latest bash


#### Common Error Solutions

1. **Authentication Error**:
   - Verify `DATABRICKS_HOST` format (include `https://`)
   - Check PAT token permissions and expiration
   - Ensure workspace access

2. **Cluster Not Found**:
   - Verify cluster ID exists: `databricks clusters list`
   - Check cluster permissions
   - Ensure cluster is in correct workspace

3. **Permission Denied**:
   - Review PAT token scopes
   - Check workspace admin settings
   - Verify Unity Catalog permissions

4. **Timeout Errors**:
   - Increase timeout values in environment variables
   - Check network connectivity
   - Verify cluster startup time

5. **Docker Container Issues**:
   - Ensure proper environment variable passing
   - Check Docker daemon status
   - Verify image build completed successfully

### Debug Mode

Enable detailed logging:```bash
# Environment variable
export DATABRICKS_MCP_LOG_LEVEL=DEBUG

# Docker run with debug
docker run --rm \
  -e DATABRICKS_MCP_LOG_LEVEL=DEBUG \
  -e DATABRICKS_HOST="your-host" \
  -e DATABRICKS_TOKEN="your-token" \
  databricks-mcp-server:latest

Health Checks```bash

Test MCP server health

curl http://localhost:3000/health

Test Databricks connectivity

docker exec databricks-mcp databricks auth describe
```

🤝 Contributing

We welcome contributions! Please follow these steps:

Development Workflow

  1. Fork and Clonebash git clone https://github.com/your-username/databricks-mcp-server.git cd databricks-mcp-server

  2. Create Feature Branchbash git checkout -b feature/your-feature-name

  3. Set Up Development Environmentbash python -m venv venv source venv/bin/activate pip install -e ".[dev]" pre-commit install

  4. Make Changes
    - Add new tools in appropriate files (cli_tools.py, sdk_tools.py, hybrid_tools.py)
    - Follow existing patterns and naming conventions
    - Add comprehensive docstrings and type hints

  5. Test Your Changesbash pytest ruff check . mypy databricks_mcp_server/

  6. Submit Pull Request
    - Ensure all tests pass
    - Update documentation if needed
    - Provide clear description of changes

Contribution Guidelines

  • Code Style: Follow PEP 8, use ruff for formatting
  • Testing: Add tests for new functionality
  • Documentation: Update README and docstrings
  • Type Hints: Use type annotations throughout
  • Error Handling: Implement proper error handling and logging

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Databricks for the excellent CLI and SDK
  • Model Context Protocol for the MCP specification
  • FastMCP for the server framework
  • The open-source community for inspiration and contributions

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Databricks MCP Server C04f2fd6 怎么安装?

在客户端按下面的安装命令接入:python -m venv .venv。装完在客户端配置里引用同一个包或端点。

Databricks MCP Server C04f2fd6 怎么在 Claude Desktop、Claude 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Databricks MCP Server C04f2fd6 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Databricks MCP Server C04f2fd6 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

Databricks MCP Server C04f2fd6 支持哪些客户端?

资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Databricks MCP Server C04f2fd6 能提供哪些能力?

资料显示约 54 个工具;能力标签包括 Python、Claude、集群管理。具体工具清单以官方文档为准。

Databricks MCP Server C04f2fd6 需要什么运行环境?

运行时为 Python;属于本地进程,需要在本机装好运行环境。

Databricks MCP Server C04f2fd6 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。