DS

databricks-solutions/databricks-exec-code-mcp

Data science & ML

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

14 stars 7 forks 品質 59 トレンド 9NOASSERTION

このテンプレートは、MCP サーバーを介してDatabricks Command Execution APIを活用することで、DatabricksのAI支援開発を可能にします.

概要

このテンプレートは、MCP サーバーを介してDatabricks Command Execution APIを活用することで、DatabricksのAI支援開発を可能にします。 クラスターで直接コードをテストし、Databricks Asset Bundle (DAB) でデプロイします。 - ✅ 直接Databricksクラスターでコードを実行してテスト - ✅ オートセレクトクラスター - クラスターIDを指定する必要はありません - ✅ Databricks Asset Bundles(DAB)の作成とデプロイ - ✅ 自然言語プロンプトからすべて! マシンのどこかにMCPサーバーをクローンして設定します。 Databricks ワークスペース → プロファイル → 設定 → 開発者 → アクセストークン → 新しいトークンを生成 プロジェクトディレクトリを作成し、Databricks スキルをインストールします。 これは作成します: - : .cursor/rules/ と Databricks ルール - : .claude/skills/ と Databricks スキル ステップ1で設定したMCPサーバーにAIクライアントをポイントします。 — プロジェクトの .cursor/mcp.json を作成します

概要(AI 翻訳)

#Databricks MCPコード実行テンプレート

このテンプレートは、MCP サーバーを介してDatabricks Command Execution APIを活用することで、DatabricksのAI支援開発を可能にします。 クラスターで直接コードをテストし、Databricks Asset Bundle (DAB) でデプロイします。

は、これが何をするか

  • ✅ Databricks クラスターの実行とテストコード
  • ✅ 自動選択クラスター - クラスター ID を指定する必要はありません
  • ✅ Databricks Asset Bundle(DAB)の作成とデプロイ
  • ✅ 自然言語のプロンプトからすべて!

「AIが構築する」「Databricksのコードをテストし、完全なパイプラインをデプロイする」と記述します。

お問い合わせ

OST クイックスタート(推奨ワークフロー)

ステップ1:MCPサーバー(ワンタイム)の設定

マシンのどこかにMCPサーバーをクローンして設定します。

ステップ2:Databricks Credentialsの設定

[~/.zshrc または ~/.bashrc に追加します。

変数が読み込まれていることを確認してください:

ツイート

個人アクセストークンの取得(PAT): Databricks ワークスペース → プロファイル → 設定 → 開発者 → アクセストークン → 新しいトークンを生成

ステップ3:新しいプロジェクトを開始

プロジェクトディレクトリを作成し、Databricks スキルをインストールします。

これは作成します: -Cursor:Databricksルールで.cursor/rules/

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Databricks MCP Code Execution Template

This template enables AI-assisted development in Databricks by leveraging the Databricks Command Execution API through an MCP server. Test code directly on clusters, then deploy with Databricks Asset Bundles (DABs).

🎯 What This Does

  • ✅ Run and test code directly on Databricks clusters
  • ✅ Auto-select clusters - no need to specify a cluster ID
  • ✅ Create and deploy Databricks Asset Bundles (DABs)
  • ✅ All from natural language prompts!

Just describe what you want → AI builds, tests the code on Databricks, and deploys the complete pipeline.


Step 1: Set Up the MCP Server (One Time)

Clone and set up the MCP server somewhere on your machine:

git clone https://github.com/databricks-solutions/databricks-exec-code-mcp.git
cd databricks-exec-code-mcp
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Step 2: Configure Databricks Credentials

Add to your ~/.zshrc or ~/.bashrc:

export DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
export DATABRICKS_TOKEN=dapi_your_token_here

Make sure the variables are loaded:

source ~/.zshrc

To get your Personal Access Token (PAT): Databricks workspace → Profile → Settings → Developer → Access Tokens → Generate new token

Step 3: Start a New Project

Create your project directory and install the Databricks skills:

# Create and enter your project
mkdir my-databricks-project && cd my-databricks-project

# Initialize git in your my-databricks-project project
git init .

# Install skills for your AI client (downloads from remote)
curl -sSL https://raw.githubusercontent.com/databricks-solutions/databricks-exec-code-mcp/main/install_skills.sh | bash -s -- --cursor
# Or for Claude Code:
curl -sSL https://raw.githubusercontent.com/databricks-solutions/databricks-exec-code-mcp/main/install_skills.sh | bash -s -- --claude
# Or for both:
curl -sSL https://raw.githubusercontent.com/databricks-solutions/databricks-exec-code-mcp/main/install_skills.sh | bash -s -- --all

This creates:

  • Cursor: .cursor/rules/ with Databricks rules
  • Claude Code: .claude/skills/ with Databricks skills

Step 4: Configure Your AI Client

Point your AI client to the MCP server you set up in Step 1.

For Cursor — create .cursor/mcp.json in your project:

{
  "mcpServers": {
    "databricks": {
      "command": "/path/to/databricks-exec-code-mcp/.venv/bin/python",
      "args": ["/path/to/databricks-exec-code-mcp/mcp_tools/tools.py"]
    }
  }
}

For Claude Code — run in your project:

claude mcp add-json databricks '{"command":"/path/to/databricks-exec-code-mcp/.venv/bin/python","args":["/path/to/databricks-exec-code-mcp/mcp_tools/tools.py"]}'

Replace /path/to/databricks-exec-code-mcp with the actual path from Step 1.

Step 5: Start Prompting!

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "databricks": { "command": "/path/to/databricks-exec-code-mcp/.venv/bin/python", "args": ["/path/to/databricks-exec-code-mcp/mcp_tools/tools.py"] } } }