Enables deployment and hosting of custom MCP servers on Databricks Apps platform, providing infrastructure for running AI agents with MCP capabilities in the Databricks environment
Example - custom MCP server on Databricks Apps
This example shows how to create and launch a custom agent on Databricks Apps.
Please note that this example doesn't use any Databricks SDK, and is independent of the mcp
package in the root dir of this repo.
Prerequisites
- Databricks CLI installed and configured
uv
Local development
- run
uv
sync:
- start the server locally. Changes will trigger a reload:
This will start the server on http://localhost:8000
Deploying a custom MCP server on Databricks Apps
There are two ways to deploy the server on Databricks Apps: using the databricks apps
CLI or using the databricks bundle
CLI. Depending on your preference, you can choose either method.
Both approaches require first configuring Databricks authentication:
Using databricks apps
CLI
To deploy the server using the databricks apps
CLI, follow these steps:
Create a Databricks app to host your MCP server:
Upload the source code to Databricks and deploy the app:
Using databricks bundle
CLI
To deploy the server using the databricks bundle
CLI, follow these steps
Update the app.yaml
file in this directory to use the following command:
- In this directory, run the following command to deploy and run the MCP server on Databricks Apps:
Connecting to the MCP server
To connect to the MCP server, use the Streamable HTTP
transport with the following URL:
For authentication, you can use the Bearer
token from your Databricks profile.
You can get the token by running the following command:
Please note that the URL should end with /mcp/
(including the trailing slash), as this is required for the server to work correctly.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables deployment and hosting of custom MCP servers on Databricks Apps platform. Provides a template and deployment methods for creating scalable MCP servers with Databricks authentication.