Menu
Blog Documentation Community Pricing Demo Call Sign Up
Sign Up

How to Set Up a Databricks MCP Server for Claude, Cursor & Codex

Connect Claude, Cursor, Codex, or any AI agent to Databricks using MCP. Set up the official Databricks Labs MCP server with Unity Catalog integration.

MCP

This post was written by an engineer at QueryPlane. QueryPlane is an app builder for your database: bring your own postgres db and you can create interactive applications to share with other developers, coworkers or even your customers. If you’re interested in trying it out, get started here.


MCP (Model Context Protocol) lets AI tools like Claude Desktop, Claude Code, Cursor, and Codex connect directly to your Databricks lakehouse. Instead of copy-pasting schemas and query results into chat, the AI can explore Unity Catalog, run SQL, and leverage Databricks’ AI features autonomously.

In this post, we’ll cover:

  • What is MCP — How the protocol works
  • Best Databricks MCP servers — Official and community options
  • Setup guides — Step-by-step for Claude Desktop and Claude Code
  • Security considerations — Keeping your lakehouse safe

What is MCP?

The Model Context Protocol is an open standard created by Anthropic that lets AI applications connect to external data sources and tools. Think of it as a USB-C port for AI — a standardized way for any AI client to talk to any data source.

For platforms like Databricks, MCP servers expose tools for exploring Unity Catalog, running SQL, and accessing platform-specific features — all callable by AI agents without manual context.

Best Databricks MCP Servers

1. Official Databricks Labs MCP

databrickslabs/mcp (~87 stars) is maintained by Databricks and provides deep platform integration.

Features:

  • Unity Catalog data exploration
  • Vector search indexes
  • Genie spaces integration
  • UC functions as tools

Note: Databricks now recommends using their Managed MCP servers instead of this self-hosted option. Check the README for the latest guidance.

Claude Desktop config:

Authentication uses the Databricks CLI (databricks auth login). Once configured:

{
  "mcpServers": {
    "databricks": {
      "command": "uv",
      "args": [
        "--directory", "/path/to/databrickslabs-mcp",
        "run", "unitycatalog-mcp",
        "-s", "catalog.schema"
      ]
    }
  }
}

2. Community Databricks MCP Server

RafaelCartenet/mcp-databricks-server provides Unity Catalog metadata access, lineage analysis, and SQL execution.

Features:

  • Unity Catalog metadata browsing
  • Data lineage analysis (including notebook/job lineage)
  • SQL query execution via execute_sql_query
  • Table and schema exploration

See what QueryPlane can build for you

Connect to your database, write SQL with AI, and build shareable apps — all from your browser.

Which Databricks MCP Server Should You Use?

ServerStarsOfficial?Unity CatalogVector search
Databricks Labs MCP~87YesYesYes
mcp-databricks-serverCommunityNoYesNo

For most developers, use the official Databricks Labs MCP — it has the deepest platform integration including Unity Catalog, vector search, and Genie spaces.

Security Considerations

Connecting an AI agent to Databricks carries risk. Follow these practices:

  • Use a dedicated service principal — create a service principal with minimal permissions
  • Grant read-only access — use Unity Catalog permissions to restrict to SELECT
  • Limit catalog access — grant access only to specific catalogs, schemas, and tables
  • Use a dedicated SQL warehouse — control costs and avoid contention
  • Use personal access tokens carefully — rotate frequently and limit scope
  • Monitor via audit logs — track what the AI runs via Databricks audit logging
-- Grant read-only access to a specific schema
GRANT USE SCHEMA ON my_catalog.my_schema TO `mcp-reader`;
GRANT SELECT ON my_catalog.my_schema.* TO `mcp-reader`;

Using MCP with QueryPlane

If you want the benefits of AI-powered database access without managing MCP servers, QueryPlane provides this out of the box. Connect your Databricks workspace and use AI to generate queries, explore schemas, and build dashboards — all from your browser with built-in access controls and team collaboration.

FAQ

What is a Databricks MCP server?

A Databricks MCP server is a process that implements the Model Context Protocol to let AI tools (Claude, Cursor, Codex, Windsurf) connect to your Databricks lakehouse. It exposes tools for exploring Unity Catalog, running SQL, and accessing platform features.

How do I connect Claude to Databricks?

Install the official Databricks Labs MCP server, then add it to your Claude Desktop config or use claude mcp add in Claude Code. Authentication uses Databricks personal access tokens.

Is it safe to connect AI to Databricks?

It can be safe with proper precautions: use a dedicated service principal with read-only Unity Catalog permissions, a separate SQL warehouse, and monitor queries via audit logs.

Does MCP work with Databricks SQL Warehouses?

Yes. The official MCP server executes queries via SQL warehouses. Use a dedicated serverless warehouse for MCP to control costs and avoid impacting production workloads.

Wrapping up

Databricks’ official MCP server provides deep Unity Catalog integration with access to vector search, Genie spaces, and SQL execution. Start with a read-only service principal and a dedicated warehouse, then explore how AI-powered lakehouse access fits your data workflow.