Databricks Mosaic MCP Server


What is this?

Databricks Mosaic MCP Server is an enterprise-grade Message Channel Protocol server that integrates Databricks’ Delta Lake platform with AI agents and large language models. It acts as a secure, high-performance bridge between your lakehouse architecture and AI-driven applications, enabling real-time data access and model inference through a standardized MCP protocol.

Packaged as @databricks/mcp-server-databricks, it implements the MCP protocol for seamless interoperability and leverages Databricks’ Plasma execution engine for low-latency SQL and Python queries. You can also route inference requests directly to MLflow or custom model endpoints, unifying data retrieval and model serving under one endpoint.

Quick Start

Install the server using npm:

npm install @databricks/mcp-server-databricks

Then add it to your MCP client configuration:

{
  "mcpServers": {
    "Databricks Mosaic MCP Server": {
      "command": "npx",
      "args": ["-y", "@databricks/mcp-server-databricks"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

Key Features

Real-Time Data Access: Perform SQL and Python queries against live Delta Lake tables with low latency, returning structured results and embeddings for dynamic applications.

Model Serving Integration: Route inference requests to MLflow or custom model endpoints on Databricks, unifying data retrieval and inference pipelines.

Enterprise-Grade Security: Leverage Unity Catalog for fine-grained access controls, audit logging, and end-to-end encryption.

Example Usage

One common way to use this server is to fetch recent sales data for an LLM agent in a retrieval-augmented generation workflow.

// Example code
const result = await client.callTool({
  name: "sql_query",
  arguments: {
    query: `
      SELECT date, region, SUM(sales) AS total_sales
      FROM sales_delta
      WHERE region = :region
      GROUP BY date, region
      ORDER BY date DESC
      LIMIT 30
    `,
    parameters: { region: "EMEA" }
  }
});

This code sends a SQL query via MCP and returns the recent sales figures for the EMEA region.

Configuration

The server accepts the following environment variables:

API_KEY – A Databricks Personal Access Token used for authentication.

SETTING_1 (optional) – An optional setting for custom configuration.

Available Tools/Resources

sql_query: Execute SQL statements against Delta Lake tables and return structured results.

model_invoke: Invoke MLflow or custom model endpoints for inference.

Who Should Use This?

This server is perfect for:

Use case 1: AI developers building retrieval-augmented generation applications.

Use case 2: Data engineers needing secure, real-time access to Delta Lake data.

Use case 3: BI analysts integrating live data into dashboards.

Conclusion

Databricks Mosaic MCP Server provides a unified, secure, and scalable interface for AI agents to interact with Delta Lake data and model inference pipelines. Give it a try to streamline your data-driven AI workflows with enterprise-grade governance and performance.

Check out the GitHub repository for more information and to contribute.