Databricks MCP Server

Databricks MCP Server

Expose Databricks data and jobs securely with Model Context Protocol for LLMs.

42
Stars
24
Forks
42
Watchers
11
Issues
Databricks MCP Server implements the Model Context Protocol (MCP) to provide a bridge between Databricks APIs and large language models. It enables LLMs to run SQL queries, list Databricks jobs, retrieve job statuses, and fetch detailed job information via a standardized MCP interface. The server handles authentication, secure environment configuration, and provides accessible endpoints for interaction with Databricks workspaces.

Key Features

Run SQL queries on Databricks SQL warehouses
List all Databricks jobs in a workspace
Retrieve status of specific Databricks jobs
Obtain detailed information about Databricks jobs
MCP protocol compliance
LLM-compatible tool interface
Environment-based configuration via .env
Secure authentication using personal access tokens
Testing utilities for connection verification
Easy server start and inspection commands

Use Cases

Enabling LLM-driven data analysis in Databricks environments
Automated monitoring and reporting of Databricks job statuses
Executing natural language-triggered SQL queries on Databricks warehouses
Integrating Databricks job management with conversational AI systems
Providing secure, structured access to Databricks resources for AI tools
Custom dashboards for job and data management via LLMs
Facilitating low-code/no-code interfaces to Databricks operations
Prototyping LLM-based data pipeline management solutions
Teaching and demonstration tools for Databricks and LLM integration
Rapid development of MCP-compliant Databricks agents

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

  • Your Databricks personal access token provides direct access to your workspace
  • Secure your .env file and never commit it to version control
  • Consider using Databricks token with appropriate permission scopes only
  • Run this server in a secure environment

Star History

Star History Chart

Repository Owner

JordiNeil
JordiNeil

User

Repository Details

Language Python
Default Branch main
Size 21 KB
Contributors 1
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Databricks Genie MCP Server

    Databricks Genie MCP Server

    Bridge natural language queries to Databricks Genie via Model Context Protocol.

    Databricks Genie MCP Server enables interaction between large language models and the Databricks Genie API using the Model Context Protocol. It allows users to ask natural language questions, start and manage conversations, and run SQL queries in Genie spaces. The tool provides structured results, supports follow-up queries, and facilitates connection through both standard and Docker-based setups. Designed for use with Claude Desktop, it streamlines conversational analytics within Databricks workspaces.

    • 12
    • MCP
    • yashshingvi/databricks-genie-MCP
  • TeslaMate MCP Server

    TeslaMate MCP Server

    Query your TeslaMate data using the Model Context Protocol

    TeslaMate MCP Server implements the Model Context Protocol to enable AI assistants and clients to securely access and query Tesla vehicle data, statistics, and analytics from a TeslaMate PostgreSQL database. The server exposes a suite of tools for retrieving vehicle status, driving history, charging sessions, battery health, and more using standardized MCP endpoints. It supports local and Docker deployments, includes bearer token authentication, and is intended for integration with MCP-compatible AI systems like Claude Desktop.

    • 106
    • MCP
    • cobanov/teslamate-mcp
  • MCP Server for ZenML

    MCP Server for ZenML

    Expose ZenML data and pipeline operations via the Model Context Protocol.

    Implements a Model Context Protocol (MCP) server for interfacing with the ZenML API, enabling standardized access to ZenML resources for AI applications. Provides tools for reading data about users, stacks, pipelines, runs, and artifacts, as well as triggering new pipeline runs if templates are available. Includes robust testing, automated quality checks, and supports secure connection from compatible MCP clients. Designed for easy integration with ZenML instances, supporting both local and remote ZenML deployments.

    • 32
    • MCP
    • zenml-io/mcp-zenml
  • Teamwork MCP Server

    Teamwork MCP Server

    Seamless Teamwork.com integration for Large Language Models via the Model Context Protocol

    Teamwork MCP Server is an implementation of the Model Context Protocol (MCP) that enables Large Language Models to interact securely and programmatically with Teamwork.com. It offers standardized interfaces, including HTTP and STDIO, allowing AI agents to perform various project management operations. The server supports multiple authentication methods, an extensible toolset architecture, and is designed for production deployments. It provides read-only capability for safe integrations and robust observability features.

    • 11
    • MCP
    • Teamwork/mcp
  • Pydantic Logfire MCP Server

    Pydantic Logfire MCP Server

    Enables LLMs to access and analyze application telemetry data through standardized MCP tools.

    Pydantic Logfire MCP Server provides an MCP-compatible interface to access, analyze, and query telemetry data sent to Pydantic Logfire. It allows LLMs to retrieve distributed traces, perform SQL queries on telemetry databases, and generate links for trace inspection. The server can be integrated with well-known MCP clients and supports configuration for secure access with read tokens.

    • 124
    • MCP
    • pydantic/logfire-mcp
  • mcp-graphql

    mcp-graphql

    Enables LLMs to interact dynamically with GraphQL APIs via Model Context Protocol.

    mcp-graphql provides a Model Context Protocol (MCP) server that allows large language models to discover and interact with GraphQL APIs. The implementation facilitates schema introspection, exposes the GraphQL schema as a resource, and enables secure query and mutation execution based on configuration. It supports configuration through environment variables, automated or manual installation options, and offers flexibility in using local or remote schema files. By default, mutation operations are disabled for security, but can be enabled if required.

    • 319
    • MCP
    • blurrah/mcp-graphql
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results