Token导航 LogoToken导航

MCP Server · AI代理

MCP Databricks App

在Databricks Apps上托管模型上下文协议(MCP)提示和工具,使AI助手如Claude能够与您的Databricks工作区交互。

stdio官方级别未说明来源级核验工具 0
TypeScriptClaudeAI代理

快速开始

作者 / 组织
moma1992
提供方
moma1992
运行时
Python

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

2 个

MCP World

选型结论

MCP Databricks App 属于AI代理类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Claude,有可以直接复制的安装命令;接入前要先准备 OAuth 授权。

分类

AI代理

传输方式

stdio

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

安装命令

uvx --from git+ssh://git@github.com/YOUR-ORG/YOUR-REPO.git dba-mcp-proxy \

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

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

  2. 2

    安装服务

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

  3. 3

    写入客户端配置

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

  4. 4

    验证是否可用

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

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

架构概述

┌─────────────┐       MCP Protocol      ┌──────────────────┐        OAuth         ┌─────────────────┐
│   Claude    │ ◄─────────────────────► │  dba-mcp-proxy   │ ◄──────────────────► │ Databricks App  │
│    CLI      │     (stdio/JSON-RPC)    │ (local process)  │    (HTTPS/SSE)      │  (MCP Server)   │
└─────────────┘                         └──────────────────┘                      └─────────────────┘
                                                ▲                                           │
                                                │                                           ▼
                                                └────────── Databricks OAuth ──────► Workspace APIs

Databricks MCP 服务器

在Databricks应用程序中,主机模型上下文协议(MCP)提供了提示和工具,使像Claude这样的AI助手能够与您的Databricks工作区进行交互。

这是什么?

此模板允许您在Databricks应用程序上创建一个MCP服务器。您可以:

  • 添加提示 作为简单的Markdown文件在 prompts/ 文件夹
  • 创建工具 作为利用Databricks SDK的Python函数

连接Claude与您的Databricks工作区的桥梁——您定义Claude能看到和能做什么,其余的由这个服务器处理。

组件

  1. MCP服务器 (server/app.py一个集成了MCP服务器的FastAPI应用,该应用:

- 动态加载来自(某处)的提示 prompts/*.md 文件 - 通过(某种方式)将Python函数作为MCP工具暴露出来 @mcp_server.tool 装饰器 - 处理通过服务器发送事件(Server-Sent Events)的HTTP请求和MCP协议

  1. 提示 (prompts/): 简单的Markdown文件,其中:

- 文件名 = 提示名称(例如。, check_system.md → check_system 提示) - 第一行以……开头 # = 描述 - 文件内容 = 返回给Claude的内容

  1. 本地代理 (dba_mcp_proxy/): 验证并代理MCP请求:

- 自动处理Databricks OAuth身份验证 - 在克劳德的stdin协议与HTTP/SSE之间进行翻译转换 - 适用于本地开发和已部署的应用程序

先决条件

  • Claude CLI(命令行界面)
  • 订阅Databricks应用程序
  • python

本地开发

# Clone and setup
git clone 
cd 
./setup.sh

# Start dev server
./watch.sh

# Set your configuration for local testing
export DATABRICKS_HOST="https://your-workspace.cloud.databricks.com"
export DATABRICKS_APP_URL="http://localhost:8000"  # Local dev server

# Add to Claude for local testing
claude mcp add databricks-mcp-local --scope local -- \
  uvx --from git+ssh://git@github.com/YOUR-ORG/YOUR-REPO.git dba-mcp-proxy \
  --databricks-host $DATABRICKS_HOST \
  --databricks-app-url $DATABRICKS_APP_URL

## Customization Guide

This template uses [FastMCP](https://github.com/jlowin/fastmcp), a framework that makes it easy to build MCP servers. FastMCP provides two main decorators for extending functionality:

- **`@mcp_server.prompt`** - For registering prompts that return text
- **`@mcp_server.tool`** - For registering tools that execute functions

### Adding Prompts

The easiest way is to create a markdown file in the `prompts/` directory:

Get cluster information

List all available clusters in the workspace with their current status


提示将自动加载以下内容:

- **名字**文件名(不含扩展名)(例如。, `get_clusters.md` → `get_clusters`)
- **描述**在(某处)之后的第一行 `#`
- **内容**整个文件内容

或者,您可以将提示注册为函数在 `server/app.py`:

@mcp_server.prompt(name="dynamic_status", description="Get dynamic system status") async def get_dynamic_status(): # This can include dynamic logic, API calls, etc. w = get_workspace_client() current_user = w.current_user.me() return f"Current user: {current_user.display_name}\nWorkspace: {DATABRICKS_HOST}"


我们自动加载 `prompts/` 为了方便起见,但当你需要动态内容时,基于功能的提示非常有用。

### 添加工具

在(某处)添加一个函数 `server/app.py` 使用 `@mcp_server.tool` 装饰器:

@mcp_server.tool def list_clusters(status: str = "RUNNING") -> dict: """List Databricks clusters by status.""" w = get_workspace_client() clusters = [] for cluster in w.clusters.list(): if cluster.state.name == status: clusters.append({ "id": cluster.cluster_id, "name": cluster.cluster_name, "state": cluster.state.name }) return {"clusters": clusters}


工具必须:

- 使用 `@mcp_server.tool` 装饰器
- 具有文档字符串(成为工具描述)
- 返回可序列化的JSON数据(字典、列表、字符串等)
- 只接受可序列化为JSON的参数

## 部署

Deploy to Databricks Apps

./deploy.sh

Check status and get your app URL

./app_status.sh


您的MCP服务器将在 `https://your-app.databricksapps.com/mcp/`

这个(或:那个,具体根据上下文确定) `app_status.sh` 脚本将显示您已部署的应用程序的URL,您将需要该URL用于 `DATABRICKS_APP_URL` 在将MCP服务器添加到Claude时设置环境变量。

## 认证

- **本地开发**无需认证
- **生产**代理会自动处理OAuth,使用您的Databricks CLI凭据

## 示例

### 与Claude一起使用

添加后,您可以在Claude中与您的MCP服务器进行交互:

Human: What prompts are available?

Claude: I can see the following prompts from your Databricks MCP server:

  • check_system: Get system information
  • list_files: List files in the current directory
  • ping_google: Check network connectivity

### 样品工具使用

Human: Can you execute a SQL query to show databases?

Claude: I'll execute that SQL query for you using the execute_dbsql tool.

[Executes SQL and returns results]


## 项目结构

├── server/ # FastAPI backend with MCP server │ ├── app.py # Main application + MCP tools │ └── routers/ # API endpoints ├── prompts/ # MCP prompts (markdown files) │ ├── check_system.md │ ├── list_files.md │ └── ping_google.md ├── dba_mcp_proxy/ # MCP proxy for Claude CLI │ └── mcp_client.py # OAuth + proxy implementation ├── client/ # React frontend (optional) ├── scripts/ # Development tools └── pyproject.toml # Python package configuration


## 高级用法

### 环境变量

在(某处)进行配置 `.env.local`:

DATABRICKS_HOST=https://your-workspace.cloud.databricks.com DATABRICKS_TOKEN=your-token # For local development DATABRICKS_SQL_WAREHOUSE_ID=your-warehouse-id # For SQL tools


### 创建复杂工具

工具可以访问完整的Databricks软件开发工具包(SDK):

@mcp_server.tool def create_job(name: str, notebook_path: str, cluster_id: str) -> dict: """Create a Databricks job.""" w = get_workspace_client() job = w.jobs.create( name=name, tasks=[{ "task_key": "main", "notebook_task": {"notebook_path": notebook_path}, "existing_cluster_id": cluster_id }] ) return {"job_id": job.job_id, "run_now_url": f"{DATABRICKS_HOST}/#job/{job.job_id}"}


## 测试您的MCP服务器

此模板包含全面的测试工具,用于在多个层面验证MCP(可能指某种系统或组件)的功能。

### 快速验证

在将MCP服务器添加到Claude后,验证其是否正常工作:

List available prompts and tools

echo "What MCP prompts are available from databricks-mcp?" | claude

Test a specific prompt

echo "Use the check_system prompt from databricks-mcp" | claude


### 全面测试套件

该(或:这个) `claude_scripts/` 该目录包含6种测试工具,用于全面验证MCP(多协议控制器):

#### 命令行测试

Test local MCP server (requires ./watch.sh to be running)

./claude_scripts/test_local_mcp_curl.sh # Direct HTTP/curl tests with session handling ./claude_scripts/test_local_mcp_proxy.sh # MCP proxy client tests

Test remote MCP server (requires Databricks auth and deployment)

./claude_scripts/test_remote_mcp_curl.sh # OAuth + HTTP tests with dynamic URL discovery ./claude_scripts/test_remote_mcp_proxy.sh # Full end-to-end MCP proxy tests


#### 交互式网页用户界面测试

Launch MCP Inspector for visual testing (requires ./watch.sh for local)

./claude_scripts/inspect_local_mcp.sh # Local server web interface ./claude_scripts/inspect_remote_mcp.sh # Remote server web interface

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

AI助手集成TypeScript本地部署Databricks工具MCP协议工作区自动化Python函数工具

支持客户端

Claude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

多步任务编排

把拆解、检索、执行串成一条链,模型按步骤调用工具。

长期上下文

把会话、笔记和知识放到外部存储,换个会话还能接着做。

接自有流程

把内部系统和模型连起来,让助手调用已有的工作流。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

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

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到OAuth 授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
MCP Databricks App

MCP World · 本页

0stdio有2 个2026-05-17
Everything Claude Code

MCP World

0stdio有1 个2026-05-17
Filesystem 560c4363

MCP World

13未说明未标注2 个2026-05-17
Time 7365cb6d

MCP.so

2SSE有2 个2026-05-17
Server Everything (everything)

MCP World

11stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

MCP Databricks App 怎么安装?

公开资料给出的安装命令是 uvx --from git+ssh://git@github.com/YOUR-ORG/YOUR-REPO.git dba-mcp-proxy \,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

MCP Databricks App 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

MCP Databricks App 收费吗?

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

MCP Databricks App 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

MCP Databricks App 支持哪些客户端?

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

来源信息

继续浏览同类 MCP