
jaibehl97/databricks_genie_mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
This project implements a Model Context Protocol (MCP) server that exposes Databricks Genie API capabilities as tools.
概要
This project implements a Model Context Protocol (MCP) server that exposes Databricks Genie API capabilities as tools. It allows you to integrate Databricks' no-code AI/BI assistant features with other applications through a standardized interface, enabling powerful natural language querying of your Databricks data. For a detailed explanation and example use cases, please see the accompanying blog post. - Expose Databricks Genie API functions as MCP tools. - Enable natural language querying of Databricks data. - Start and manage Genie conversations. - Create and retrieve messages. - Execute and fetch SQL query results generated by Genie. - Secure authentication with Databricks. - Python 3.10+ - Databricks workspace with Genie access and System Tables enabled (if using them). - Databricks Assistant enabled. - CAN USE permission on a Pro or Serverless SQL warehouse. - Access to Unity Catalog data relevant to your Genie Space.
README
以下は原文 README の抜粋です。原文を見る。
Databricks Genie API MCP Server
This project implements a Model Context Protocol (MCP) server that exposes Databricks Genie API capabilities as tools. It allows you to integrate Databricks’ no-code AI/BI assistant features with other applications through a standardized interface, enabling powerful natural language querying of your Databricks data.
For a detailed explanation and example use cases, please see the accompanying blog post.
Features
- Expose Databricks Genie API functions as MCP tools.
- Enable natural language querying of Databricks data.
- Start and manage Genie conversations.
- Create and retrieve messages.
- Execute and fetch SQL query results generated by Genie.
- Secure authentication with Databricks.
Prerequisites
- Python 3.10+
- Databricks workspace with Genie access and System Tables enabled (if using them).
- Databricks Assistant enabled.
- CAN USE permission on a Pro or Serverless SQL warehouse.
- Access to Unity Catalog data relevant to your Genie Space.
- An MCP-compatible client application, such as Claude Desktop.
Setup Instructions
-
Clone the Repository (if you haven’t already)
# Add clone command if needed -
Navigate to the Server Directory
cd genie_api -
Install Dependencies
pip install -r requirements.txt -
Configure Authentication
Set the required environment variables for the Databricks SDK to connect to your workspace. Create a
.envfile in this directory (genie_api/) or set them globally:# --- .env file content --- # For PAT authentication (recommended for development) # DATABRICKS_HOST=https://your-workspace.cloud.databricks.com # DATABRICKS_TOKEN=your-personal-access-token # Or for OAuth with service principal (recommended for production) DATABRICKS_HOST=https://your-workspace.cloud.databricks.com DATABRICKS_CLIENT_ID=your-client-id DATABRICKS_CLIENT_SECRET=your-client-secret # --- end .env file content ---Ensure the
.envfile is added to your `.gitignore! -
Run the Server Locally
python server.pyThe server will start and listen for connections via standard input/output (stdio).
Using with Claude Desktop
This MCP server is designed to be used with MCP clients like Claude Desktop. Follow these steps to connect:
- Install Claude Desktop: Download and install from the official website.
- Configure Claude Desktop:
- Open Claude Desktop settings (Menu Bar -> Claude -> Settings…).
- Go to Developer -> Edit Config.
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"databricks-genie": {
"command": "python", // Or python3, or the full path to your python executable
"args": [
"/full/absolute/path/to/your/project/genie_api/server.py"
],
"workingDirectory": "/full/absolute/path/to/your/project/genie_api/"
}
// ... potentially other servers ...
}
}