Databricks MCP Server

Databricks MCP Server

Databricks MCP Server is an implementation of the Model Context Protocol (MCP) that enables language model-based applications to access, manage, and automate Databricks resources through a standardized protocol, allowing seamless integration between LLM-powered tools and Databricks clusters, jobs, notebooks, and more.

Author: JustTryAI


View Protocol

What is Databricks MCP Server?

Databricks MCP Server is a lightweight server that connects Databricks platform APIs to AI-powered applications via the MCP protocol. It exposes Databricks functionality as executable tools that language models and automation systems can invoke, making it easy to interact with and automate Databricks resources in a programmatic and standardized way.

How to Configure Databricks MCP Server

  1. Install prerequisites: Ensure you have Python 3.10+ and install the uv package manager for easy environment management.
  2. Clone the repository:
    git clone https://github.com/JustTryAI/databricks-mcp-server.git
    cd databricks-mcp-server
    
  3. Set up the project:
    Use uv venv to create a virtual environment and install dependencies:
    uv venv
    # Activate venv and install dependencies as per your OS instructions
    uv pip install -e .
    uv pip install -e ".[dev]"
    
  4. Configure environment variables:
    Set DATABRICKS_HOST to your Databricks workspace URL and DATABRICKS_TOKEN to your personal access token. You can use an .env file or set these directly in your shell.
  5. (Optional) Review .env.example for template configuration and best practices.

How to Use Databricks MCP Server

  1. Start the server:
    Use the provided wrapper scripts to start the MCP server:
    # Windows
    .\start_mcp_server.ps1
    # Linux/Mac
    ./start_mcp_server.sh
    
  2. Invoke tools via MCP clients:
    Connect your MCP-compatible application or agent to the running server. The server exposes Databricks operations as tools, discoverable and callable via the MCP protocol (tools/list, tools/call endpoints).
  3. Utility scripts:
    Use bundled scripts in the scripts/ directory (e.g., show_clusters.py, show_notebooks.py) to interact with Databricks resources directly or as examples for custom automation.

Key Features

  • Full MCP protocol support for standardized LLM integration
  • Exposes major Databricks features (clusters, jobs, notebooks, DBFS file access, SQL execution) as callable tools
  • Built on asyncio for efficient, concurrent operation
  • Easily extensible with new tools for further Databricks API coverage
  • Works securely within your data infrastructure using personal access tokens and environment isolation
  • Prebuilt utility scripts and clear project structure for convenience

Use Cases

  • Automated cluster management: Create, list, terminate, or start clusters dynamically via LLM-driven workflows or scripts.
  • Notebook and job orchestration: List or export notebooks, run jobs, and manage scheduled tasks programmatically.
  • Data exploration and querying: Use SQL execution or browse DBFS files to empower LLM agents with direct workspace data access and querying capabilities.
  • Integration with AI agents: Enable natural language or chat agent interfaces to Databricks resources (e.g., for internal data scientists or support bots).
  • Platform-agnostic automation: Seamlessly swap LLM providers or move tooling between infrastructures by keeping the MCP interface consistent.

FAQ

1. How does authentication work with the Databricks MCP Server?

Authentication is handled via environment variables (DATABRICKS_HOST and DATABRICKS_TOKEN) or an .env file containing your Databricks instance URL and access token. The server uses these credentials to perform actions on your behalf through the Databricks REST API.

2. Can I extend the server to add more Databricks API coverage?

Yes. The project is modular and extensible—simply add new tool definitions inside the appropriate server components, following existing examples. Contributions are welcome via Pull Requests.

3. What client applications can use Databricks MCP Server?

Any tool or agent that speaks the MCP protocol can connect, including custom LLM-based assistants, workflow automation systems, or MCP Demo clients. See the examples/ directory for usage samples and integration guides.

4. Is it safe to run the server on my machine?

The server is designed for security: it only accesses resources with the permissions granted to your Databricks token. Always use a token with the minimum required permissions and never share your credentials.

5. How do I see what tools are available?

Use the tools/list endpoint via an MCP client or refer to the documentation to view all exposed tools, their names, and descriptions.