A template for creating a new project configured with Databricks AI Dev Kit for Claude Code or Cursor. Use this as a template to create a new AI coding project focused on Databricks. It can also be used to experiment with the skills, MCP server integration, and test tools before using them in a real project.
- uv - Python package manager
- Databricks CLI - Command line interface for Databricks
- Claude Code or Cursor - AI Coding environment
Make scripts executable and install dependencies.
chmod +x setup.sh cleanup.sh
./setup.shThis will:
- Check for
uvinstallation - Install dependencies for
databricks-tools-coreanddatabricks-mcp-server - Install Databricks skills to
.claude/skills/ - Setup MCP server config for this project in
.mcp.json(Claude Code) and.cursor/mcp.json(Cursor) - Create
CLAUDE.mdwith project context
Set your Databricks credentials:
Option 1: Profile:
export DATABRICKS_CONFIG_PROFILE=your-profileOption 2: Host and Databricks Personal Access Token:
export DATABRICKS_HOST="https://your-workspace.cloud.databricks.com"
export DATABRICKS_TOKEN="dapi..."Or create a .env.local file (gitignored):
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=dapi...# Start Claude Code in this directory
claudeTry these commands to test the Databricks MCP integration:
# List available warehouses
List my SQL warehouses
# Run a simple query
Run this SQL query: SELECT current_timestamp()
# Check clusters
What clusters do I have available?
# Test Unity Catalog
List the catalogs in my workspace
The setup script registers the databricks-mcp-server to run from the sibling directory.
In your project directory, create .mcp.json (Claude) or .cursor/mcp.json (Cursor). Replace /path/to/ai-dev-kit with the actual path where you cloned the repo.
{
"mcpServers": {
"databricks": {
"command": "/path/to/ai-dev-kit/databricks-mcp-server/.venv/bin/python",
"args": ["/path/to/ai-dev-kit/databricks-mcp-server/run_server.py"]
}
}
}To manually add or reconfigure the MCP server from another project directory:
Set variable with directory to your path:
export DEV_KIT_DIR=/path/to/ai-dev-kitRun remove and add script for Claude.
# Remove existing (if any)
claude mcp remove databricks
claude mcp add --transport stdio databricks -- ${DEV_KIT_DIR}/.venv/bin/python -- ${DEV_KIT_DIR}/databricks-mcp-server/run_server.pyTo verify the server is configured:
claude mcp listAfter adding the MCP config, you must enable the server in Cursor:
- Open Cursor Settings (
Cmd+,) - Search for "MCP"
- Find "databricks" under Installed MCP Servers
- Toggle it on
Cursor spawns MCP servers as subprocesses that don't inherit shell environment variables. If you use DATABRICKS_CONFIG_PROFILE, you must pass it explicitly in the config:
{
"mcpServers": {
"databricks": {
"command": "/path/to/databricks-mcp-server/.venv/bin/python",
"args": ["/path/to/databricks-mcp-server/run_server.py"],
"env": {
"DATABRICKS_CONFIG_PROFILE": "your-profile-name"
}
}
}
}Cursor loads MCP configs from both locations:
- Global:
~/.cursor/mcp.json(applies to all projects) - Project:
.cursor/mcp.json(project-specific)
If you have the same server in both, the global config may take precedence. For project-specific profiles, remove the server from the global config.
Once configured, your coding agent has access to these Databricks tools:
| Tool | Description |
|---|---|
mcp_databricks_execute_sql |
Execute SQL on Databricks SQL Warehouse |
mcp_databricks_execute_sql_multi |
Execute multiple SQL statements with dependency-aware parallelism |
mcp_databricks_list_warehouses |
List all SQL warehouses |
mcp_databricks_get_best_warehouse |
Get best available SQL warehouse |
mcp_databricks_get_table_details |
Get table schema and statistics |
| Tool | Description |
|---|---|
mcp_databricks_list_clusters |
List all clusters |
mcp_databricks_get_best_cluster |
Get best available cluster |
mcp_databricks_execute_databricks_command |
Execute code (Python/Scala/SQL/R) on cluster |
mcp_databricks_run_python_file_on_databricks |
Run local Python file on cluster |
| Tool | Description |
|---|---|
mcp_databricks_upload_folder |
Upload folder to Databricks workspace |
mcp_databricks_upload_file |
Upload file to Databricks workspace |
| Tool | Description |
|---|---|
mcp_databricks_create_or_update_pipeline |
Main tool for pipeline management (create/update/run) |
mcp_databricks_find_pipeline_by_name |
Find pipeline by name |
mcp_databricks_create_pipeline |
Create new pipeline |
mcp_databricks_get_pipeline |
Get pipeline details |
mcp_databricks_update_pipeline |
Update pipeline configuration |
mcp_databricks_delete_pipeline |
Delete pipeline |
mcp_databricks_start_update |
Start pipeline update/validation |
mcp_databricks_get_update |
Get pipeline update status |
mcp_databricks_stop_pipeline |
Stop running pipeline |
mcp_databricks_get_pipeline_events |
Get pipeline events/errors |
The setup script installs these skills to .claude/skills/:
- asset-bundles - Databricks Asset Bundles
- databricks-app-apx - Full-stack apps with APX framework (FastAPI + React)
- databricks-app-python - Python apps with Dash, Streamlit, Flask
- databricks-python-sdk - Python SDK patterns
- mlflow-evaluation - MLflow evaluation and trace analysis
- spark-declarative-pipelines - Spark Declarative Pipelines (SDP/DLT)
- synthetic-data-generation - Test data generation
Use skills by asking Claude:
Load the spark-declarative-pipelines skill and help me create a pipeline
To reset the project and start fresh:
./cleanup.shThis removes:
.claude/directory (skills, mcp.json, sessions)- Generated test files (*.parquet, *.csv, etc.)
- Temporary directories
Make sure you're in the ai-dev-kit repository and the databricks-mcp-server directory exists:
ls ../databricks-mcp-server/Verify your credentials:
echo $DATABRICKS_HOST
echo $DATABRICKS_TOKENCheck the MCP server logs - Claude Code shows tool errors in the chat. Common issues:
- Invalid warehouse ID
- Missing permissions
- Network connectivity
- Ensure the server is enabled in Cursor Settings → MCP
- Reload window (
Cmd+Shift+P→ "Developer: Reload Window") - Check for conflicts with
~/.cursor/mcp.json
If using DATABRICKS_CONFIG_PROFILE, add it to the env block in .cursor/mcp.json. Shell environment variables are not inherited by MCP server subprocesses.
ai-dev-project/
├── .claude/
│ └── skills/ # Installed Databricks skills
│ ├── asset-bundles/
│ ├── spark-declarative-pipelines/
│ └── ...
├── .cursor/
│ └── mcp.json # MCP server configuration
├── .gitignore # Ignores test artifacts
├── .mcp.json # MCP server configuration
├── CLAUDE.md # Project context for Claude
├── setup.sh # Setup script
├── cleanup.sh # Cleanup script
└── README.md # This file