Databricks MCP server

Integrates with Databricks services to enable interaction with clusters, jobs, notebooks, DBFS, and SQL workspaces via tools that wrap the Databricks REST API.
Back to servers
Provider
JustTryAI
Release date
Mar 13, 2025
Language
Python
Stats
17 stars

The Databricks MCP Server implements the Model Completion Protocol (MCP) to let LLM-powered tools interact with Databricks resources including clusters, jobs, notebooks, and SQL execution, providing a bridge between AI models and your Databricks infrastructure.

Installation

Prerequisites

  • Python 3.10 or higher
  • uv package manager (recommended)

Setup Process

  1. Install uv package manager:

    # MacOS/Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # Windows (in PowerShell)
    irm https://astral.sh/uv/install.ps1 | iex
    

    Remember to restart your terminal after installation.

  2. Clone the repository:

    git clone https://github.com/JustTryAI/databricks-mcp-server.git
    cd databricks-mcp-server
    
  3. Set up the environment:

    # Create and activate virtual environment
    uv venv
    
    # On Windows
    .\.venv\Scripts\activate
    
    # On Linux/Mac
    source .venv/bin/activate
    
    # Install dependencies in development mode
    uv pip install -e .
    
    # Install development dependencies
    uv pip install -e ".[dev]"
    
  4. Configure your Databricks credentials:

    # Windows
    set DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
    set DATABRICKS_TOKEN=your-personal-access-token
    
    # Linux/Mac
    export DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
    export DATABRICKS_TOKEN=your-personal-access-token
    

    Alternatively, create an .env file based on the provided .env.example template.

Running the Server

Start the MCP server using the provided scripts:

# Windows
.\start_mcp_server.ps1

# Linux/Mac
./start_mcp_server.sh

You can also run the server scripts directly:

# Windows
.\scripts\start_mcp_server.ps1

# Linux/Mac
./scripts/start_mcp_server.sh

Using the Server

Available Tools

The server exposes these Databricks functions as MCP tools:

  • list_clusters: View all Databricks clusters
  • create_cluster: Create a new cluster
  • terminate_cluster: Terminate a cluster
  • get_cluster: Get details about a specific cluster
  • start_cluster: Start a terminated cluster
  • list_jobs: View all Databricks jobs
  • run_job: Execute a job
  • list_notebooks: View notebooks in a workspace directory
  • export_notebook: Export a notebook from the workspace
  • list_files: List files and directories in a DBFS path
  • execute_sql: Run a SQL statement

Querying Databricks Resources

Use the included utility scripts to quickly view your Databricks resources:

# View all clusters
uv run scripts/show_clusters.py

# View all notebooks
uv run scripts/show_notebooks.py

These tools provide a convenient way to interact with your Databricks environment using the MCP protocol, enabling AI-powered automation and integration with your data infrastructure.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later