The Databricks MCP Server provides access to Databricks functionality via the Model Completion Protocol (MCP), enabling LLM-powered tools to interact with Databricks clusters, jobs, notebooks, and other resources. This server acts as a bridge between AI assistants and your Databricks environment.
uv
package manager (recommended)Install the uv
package manager:
# MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (in PowerShell)
irm https://astral.sh/uv/install.ps1 | iex
Restart your terminal after installation.
Clone the repository:
git clone https://github.com/markov-kernel/databricks-mcp.git
cd databricks-mcp
Set up the environment:
# Linux/Mac
./scripts/setup.sh
# Windows (PowerShell)
.\scripts\setup.ps1
Alternatively, manual setup:
# Create and activate virtual environment
uv venv
# On Windows
.\.venv\Scripts\activate
# On Linux/Mac
source .venv/bin/activate
# Install dependencies
uv pip install -e .
uv pip install -e ".[dev]"
Configure your Databricks credentials:
# Windows
set DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
set DATABRICKS_TOKEN=your-personal-access-token
# Linux/Mac
export DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
export DATABRICKS_TOKEN=your-personal-access-token
Alternatively, create an .env
file based on the provided .env.example
.
To start the server directly:
# Activate your virtual environment if not already active
source .venv/bin/activate
# Run the start script
./scripts/start_mcp_server.sh
Open or create ~/.cursor/mcp.json
Add the following configuration:
{
"mcpServers": {
"databricks-mcp-local": {
"command": "/absolute/path/to/your/project/databricks-mcp-server/start_mcp_server.sh",
"args": [],
"env": {
"DATABRICKS_HOST": "https://your-databricks-instance.azuredatabricks.net",
"DATABRICKS_TOKEN": "dapiXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"RUNNING_VIA_CURSOR_MCP": "true"
}
}
}
}
Replace the path and credentials with your actual values
Restart Cursor
Invoke tools using databricks-mcp-local:<tool_name>
Register the server with:
claude mcp add databricks-mcp-local \
-s user \
-e DATABRICKS_HOST="https://your-databricks-instance.azuredatabricks.net" \
-e DATABRICKS_TOKEN="dapiXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-- /absolute/path/to/your/project/databricks-mcp-server/start_mcp_server.sh
Replace the path and credentials with your actual values.
The Databricks MCP Server provides the following tools:
Use the included utility scripts to quickly view resources:
# View all clusters
uv run scripts/show_clusters.py
# View all notebooks
uv run scripts/show_notebooks.py
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.