
jordineil/mcp-databricks-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
jordineil/mcp-databricks-server は [https://github.com/jordineil/mcp-databricks-server. からインポートされた MCP サーバーの候補です
概要
jordineil/mcp-databricks-server は [https://github.com/jordineil/mcp-databricks-server. からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
Databricks API に接続するモデルコンテキストプロトコル(MCP)サーバーで、LLM が SQL クエリを実行したり、ジョブをリストしたり、ジョブステータスを取得したりできます。
##特徴
- Databricks SQL倉庫でSQLクエリを実行
- すべてのDatabricksジョブをリストする
- 特定のDatabricksジョブのステータスを取得する
- Databricksジョブに関する詳細情報を入手
前提条件
- Python 3.7 +
- Databricksのワークスペース:
- 個人アクセストークン
- SQL倉庫エンドポイント
- クエリを実行し、ジョブにアクセスするための権限
セットアップ
-
このリポジトリをクローンする
-
仮想環境の作成と活性化(推奨):
-
依存関係を取付けて下さい:
4。 次の変数でrootディレクトリにある[.env]ファイルを作成します。
- あなたの関係をテストして下さい(任意しかし推薦して下さい):
##Databricks Credentials の取得
1.ホスト:DatabricksインスタンスのURL(例、your-instance.cloud.databricks.com))
2.Token:Databricksで個人アクセストークンを作成する:
- ユーザー設定に移動(右上のユーザー名をクリックします)
- 「Developer」タブを選択します
- 「アクセストークン」の下の「管理」をクリックします。
- 新しいトークンを生成し、すぐに保存します 3.HTTPパス:SQL倉庫の場合:
- DatabricksのSQL倉庫に行く
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Databricks MCP Server
A Model Context Protocol (MCP) server that connects to Databricks API, allowing LLMs to run SQL queries, list jobs, and get job status.
Features
- Run SQL queries on Databricks SQL warehouses
- List all Databricks jobs
- Get status of specific Databricks jobs
- Get detailed information about Databricks jobs
Prerequisites
- Python 3.7+
- Databricks workspace with:
- Personal access token
- SQL warehouse endpoint
- Permissions to run queries and access jobs
Setup
- Clone this repository
- Create and activate a virtual environment (recommended):
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt - Create a
.envfile in the root directory with the following variables:DATABRICKS_HOST=your-databricks-instance.cloud.databricks.com DATABRICKS_TOKEN=your-personal-access-token DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/your-warehouse-id - Test your connection (optional but recommended):
python test_connection.py
Obtaining Databricks Credentials
- Host: Your Databricks instance URL (e.g.,
your-instance.cloud.databricks.com) - Token: Create a personal access token in Databricks:
- Go to User Settings (click your username in the top right)
- Select “Developer” tab
- Click “Manage” under “Access tokens”
- Generate a new token, and save it immediately
- HTTP Path: For your SQL warehouse:
- Go to SQL Warehouses in Databricks
- Select your warehouse
- Find the connection details and copy the HTTP Path
Running the Server
Start the MCP server:
python main.py
You can test the MCP server using the inspector by running
npx @modelcontextprotocol/inspector python3 main.py
Available MCP Tools
The following MCP tools are available:
- run_sql_query(sql: str) - Execute SQL queries on your Databricks SQL warehouse
- list_jobs() - List all Databricks jobs in your workspace
- get_job_status(job_id: int) - Get the status of a specific Databricks job by ID
- get_job_details(job_id: int) - Get detailed information about a specific Databricks job
Example Usage with LLMs
When used with LLMs that support the MCP protocol, this server enables natural language interaction with your Databricks environment:
- “Show me all tables in the database”
- “Run a query to count records in the customer table”
- “List all my Databricks jobs”
- “Check the status of job #123”
- “Show me details about job #456”
Troubleshooting
Connection Issues
- Ensure your Databricks host is correct and doesn’t include
https://prefix - Check that your SQL warehouse is running and accessible
- Verify your personal access token has the necessary permissions
- Run the included test script:
python test_connection.py
Security Considerations
インストール
npx @modelcontextprotocol/inspector python3 main.py