MCP Servers on Databricks
Generative AI is evolving rapidly, and one of the most exciting developments is standardizing how models interact with external systems. Let me walk you through how we got here and why the Model Context Protocol (MCP)โespecially when combined with Databricksโis a game-changer.
How MCPs Evolved in the Real World
To understand MCPs, it helps to look at the progression of Large Language Models (LLMs):
- Traditional LLMs: In the beginning, LLMs were simply answering questions based on the static data they were trained on.
- Context and RAG: To overcome the problem of outdated or missing information, approaches like Retrieval-Augmented Generation (RAG) were introduced, passing relevant reference materials directly to the model.
- The Rise of Agents: Next came the ability for LLMs to use specialized tools to execute tasks via API calls. Instead of just answering questions, models became "agents" capable of interacting with Git repositories, searching live databases, or triggering third-party applications.
- The Integration Problem: However, a problem emerged: How do agents know which API to call and how to format those calls? Every new tool required custom integration logic, creating endless glue code.
- The Solution โ MCPs (Model Context Protocol): The Model Context Protocol standardizes this. MCP servers host tools and expose them to LLM clients (like Claude or Cursor) in a consistent, runtime-discoverable format. Models can now dynamically discover capabilities and execute tasks seamlessly.
The Scope of MCPs in Databricks
Databricks has embraced this open-source standard to connect AI agents with tools, data, and workflows through a standardized, secure interface. By supporting MCP, Databricks ensures that data governance and model intelligence work hand in hand.
Different Types of MCPs on Databricks
Depending on your need, Databricks offers different flavors of MCP servers:
- Managed MCP: Give agents immediate access to Databricks features (like Unity Catalog functions, Genie spaces, and Vector Search indices) using pre-configured, native MCP servers.
- External MCP: Securely connect to external MCP servers hosted entirely outside of Databricks using managed connections.
- Custom MCP: Host your own bespoke logic by deploying a custom MCP server as a Databricks App.
How Can We Use Databricks MCPs?
You can harness these MCP capabilities across multiple environments:
1. In Your Local Machine (Via LLM Clients)
You can build an MCP server that securely connects to your Databricks workspace and run it locally. Then, using LLM desktop clients like Claude Code, Antigravity, or Cursor, you can let your preferred AI interact directly with your Databricks data right from your own IDE!
2. Hosted in Databricks Apps
You can create an MCP server and host it directly inside Databricks using Databricks Apps.
MCP server in Databricks Apps
By hosting it here, it gets assigned a secure URL that you can use anywhere. Furthermore, once hosted, these Custom MCP servers natively integrate with Databricks UI features such as the AI Playground. You can select your hosted App as a Custom MCP Server and let the Databricks Playground models execute your tools.
Playground in the Databricks
Demo Implementation
To put this into practice, I have created a custom MCP server utilizing the Databricks REST APIs and hosted it natively inside Databricks Apps.
You can review the source code, see how local development works, and test it yourself by visiting my GitHub repository: ๐ Databricks_MCP_server (GitHub Repo)
References