JM

jordineil/mcp-databricks-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

50 stars 26 forks 품질 41 트렌드 13

jordineil/mcp-databricks-server는 MCP 서버 후보로 https://github.com/jordineil/mcp-databricks-server.]에서 가져온

개요

jordineil/mcp-databricks-server는 MCP 서버 후보로 https://github.com/jordineil/mcp-databricks-server.]에서 가져온

개요(AI 번역)

Databricks API에 연결하는 모델 Context Protocol (MCP) 서버는 SQL 쿼리, 목록 작업 및 작업 상태를 실행하는 LLM을 허용한다.

특징

  • Databricks SQL 창고에서 SQL 쿼리 실행
  • 모든 Databricks 일자리 목록
  • 특정 Databricks 작업의 상태를 얻으십시오.
  • Databricks 작업에 대한 자세한 정보 얻기

필수품

  • 파이썬 3.7+
  • Databricks 작업 공간:
  • 개인 액세스 토큰
  • SQL 창고 엔드포인트
  • 쿼리 및 액세스 작업을 실행하는 권한

설치

  1. Clone 이 저장소

  2. 가상 환경(recommended) 만들기 및 활성화:

  3. 의존성 설치:

  4. 다음 변수와 루트 디렉토리에 .env 파일을 만듭니다.

  5. 당신의 연결을 시험하십시오 (선택 그러나 추천되는):

Databricks Credentials 획득

  1. Host: 데이터bricks 인스턴스 URL (예: your-instance.cloud.databricks.com)
  2. Token: Databricks의 개인 액세스 토큰 만들기:
  • 사용자 설정으로 이동 ( 상단의 사용자 이름을 클릭)
  • "Developer"탭 선택
  • "액세스 토큰"에서 "Manage"를 클릭하십시오
  • 새로운 토큰 생성 및 즉시 저장
  1. ** 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

  1. Clone this repository
  2. Create and activate a virtual environment (recommended):
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Create a .env file 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
    
  5. Test your connection (optional but recommended):
    python test_connection.py
    

Obtaining Databricks Credentials

  1. Host: Your Databricks instance URL (e.g., your-instance.cloud.databricks.com)
  2. 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
  3. 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:

  1. run_sql_query(sql: str) - Execute SQL queries on your Databricks SQL warehouse
  2. list_jobs() - List all Databricks jobs in your workspace
  3. get_job_status(job_id: int) - Get the status of a specific Databricks job by ID
  4. 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

GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector python3 main.py
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →