Enables AI assistants to interact with Databricks workspaces through OAuth authentication, providing tools for managing clusters, executing SQL queries, creating jobs, and accessing workspace resources via the Databricks SDK
awesome-databricks-mcp
Host Model Context Protocol (MCP) prompts and tools on Databricks Apps, enabling AI assistants like Claude to interact with your Databricks workspace through a secure, authenticated interface.
What is this?
This template lets you create an MCP server that runs on Databricks Apps. You can:
- 📝 Add prompts as simple markdown files in the
prompts/
folder - 🛠️ Create tools as Python functions that leverage Databricks SDK
- 🔐 Authenticate securely with OAuth through Databricks Apps
- 🚀 Deploy instantly to make your MCP server accessible to Claude
- 🖥️ Web Interface with a modern React TypeScript frontend for MCP discovery
- 🧪 Comprehensive Testing with automated MCP validation tools
Think of it as a bridge between Claude and your Databricks workspace - you define what Claude can see and do, and this server handles the rest.
How it Works
Architecture Overview
Components
- MCP Server (
server/app.py
): A FastAPI app with integrated MCP server that:- Dynamically loads prompts from
prompts/*.md
files - Exposes Python functions as MCP tools via modular tool system
- Handles both HTTP requests and MCP protocol over Server-Sent Events
- Uses FastMCP framework for seamless MCP integration
- Dynamically loads prompts from
- React Frontend (
client/
): A modern TypeScript React application that:- Provides a web interface for MCP discovery and testing
- Shows available prompts, tools, and MCP configuration
- Includes copy-paste setup commands for Claude integration
- Built with TailwindCSS, Radix UI, and modern React patterns
- Uses Vite for fast development and building
- Prompts (
prompts/
): Simple markdown files where:- Filename = prompt name (e.g.,
build_dlt_pipeline.md
→build_dlt_pipeline
prompt) - First line with
#
= description - File content = what gets returned to Claude
- Filename = prompt name (e.g.,
- Modular Tools System (
server/tools/
): Organized tool modules that:- Break down functionality into logical, manageable components
- Provide 104+ tools across 9 specialized modules
- Enable better maintainability and collaboration
- Support easy addition of new tools
- Local Proxy (
dba_mcp_proxy/
): Authenticates and proxies MCP requests:- Handles Databricks OAuth authentication automatically
- Translates between Claude's stdio protocol and HTTP/SSE
- Works with both local development and deployed apps
🎬 Demo
This 5-minute video shows you how to set up and use the MCP server with Claude and/or Cursor: https://www.youtube.com/watch?v=_yPtm2iH04o
Quick Start
Create Your Own MCP Server
Step 1: Install Databricks CLI and Set Up GitHub SSH Access
Before you begin, make sure you have the Databricks CLI and GitHub SSH access configured.
Install Databricks CLI:
macOS:
Windows:
Linux:
Set Up GitHub SSH Access:
macOS:
Windows:
Linux:
Test GitHub SSH Connection:
Configure Git with SSH:
Step 2: Clone the Repo
This will:
- Configure Databricks authentication
- Set your MCP server name
- Install all dependencies (Python + Node.js)
- Create your
.env.local
file
Step 3: Deploy with Claude
In Claude Code, run:
This will:
- Deploy your MCP server to Databricks Apps
- Configure the MCP integration
- Show you available prompts and tools
Then restart Claude Code to use your new MCP server.
Add to Claude CLI
After deployment, add your MCP server to Claude:
Local Development
Running Locally
Prerequisites
Before running the MCP server locally, ensure you have:
- Python 3.11+ and Node.js 18+ installed
- Databricks CLI configured with
databricks auth login
- Git for cloning the repository
- uv package manager (recommended) or pip for Python dependencies
- bun (recommended) or npm for Node.js dependencies
Step-by-Step Local Setup
1. Clone and Configure
The setup script will:
- Install Python dependencies using
uv
orpip
- Install Node.js dependencies using
bun
ornpm
- Configure your Databricks workspace settings
- Create a
.env.local
file with your configuration
2. Start the Development Server
This command starts:
- Backend: FastAPI server on
http://localhost:8000
- Frontend: React development server on
http://localhost:3000
- File watching: Automatic reloading when files change
3. Verify Local Setup
Open your browser and navigate to:
- Backend API: http://localhost:8000/docs (FastAPI Swagger UI)
- Frontend: http://localhost:3000 (React application)
- MCP Endpoint: http://localhost:8000/mcp/ (MCP server)
4. Test with Claude CLI
Development Workflow
Making Changes
- Edit prompts: Modify files in
prompts/
directory - Edit tools: Update functions in appropriate modules under
server/tools/
- Edit frontend: Modify React components in
client/src/
- Edit backend: Update FastAPI routes in
server/
All changes automatically reload thanks to the file watchers in ./watch.sh
.
Testing Changes
Debugging
- Backend logs: Check terminal output from
./watch.sh
- Frontend logs: Check browser console and terminal output
- MCP logs: Monitor the
/mcp/
endpoint responses - Database queries: Check Databricks workspace logs
Local vs Production Differences
Feature | Local Development | Production |
---|---|---|
Authentication | Databricks CLI token | OAuth via Databricks Apps |
URL | http://localhost:8000 | https://your-app.databricksapps.com |
HTTPS | No (HTTP only) | Yes (HTTPS required) |
File watching | Yes (auto-reload) | No |
Debug mode | Yes | No |
Logs | Terminal output | Databricks Apps logs |
Troubleshooting Local Issues
Common Problems
Port conflicts:
Dependencies not found:
Databricks authentication:
MCP connection issues:
Performance Tips
- Use
uv
instead ofpip
for faster Python dependency management - Use
bun
instead ofnpm
for faster Node.js dependency management - The
./watch.sh
script usesuvicorn --reload
for fast backend development - Frontend uses Vite for fast hot module replacement
Deployment
Your MCP server will be available at https://your-app.databricksapps.com/mcp/
The app_status.sh
script will show your deployed app URL, which you'll need for the DATABRICKS_APP_URL
environment variable when adding the MCP server to Claude.
Authentication
- Local Development: No authentication required
- Production: OAuth is handled automatically by the proxy using your Databricks CLI credentials
Examples
Using with Claude
Once added, you can interact with your MCP server in Claude:
Sample Tool Usage
Project Structure
Advanced Usage
Environment Variables
Configure in .env.local
:
Creating Complex Tools
Tools can access the full Databricks SDK:
Testing Your MCP Server
This template includes comprehensive testing tools for validating MCP functionality at multiple levels.
Quick Verification
After adding the MCP server to Claude, verify it's working:
Comprehensive Testing Suite
The claude_scripts/
directory contains 6 testing tools for thorough MCP validation:
Command Line Tests
Interactive Web UI Tests
MCP Inspector Features:
- 🖥️ Web-based interface for interactive MCP server testing
- 🔧 Visual tool execution with parameter input forms
- 📊 Real-time request/response monitoring
- 🐛 Protocol-level debugging and error inspection
- 📋 Complete tool and resource discovery
What Each Test Validates
Test Type | Authentication | Protocol | Session Management | Tool Discovery |
---|---|---|---|---|
curl tests | ✅ | ✅ | ✅ | ✅ |
proxy tests | ✅ | ✅ | ✅ | ✅ |
MCP Inspector | ✅ | ✅ | ✅ | ✅ |
All tests dynamically discover app URLs and handle OAuth authentication automatically.
See claude_scripts/README.md
for detailed documentation.
Web Interface Testing
The React frontend provides an additional way to test your MCP server:
Troubleshooting
- Authentication errors: Run
databricks auth login
to refresh credentials - MCP not found: Ensure the app is deployed and accessible
- Tool errors: Check logs at
https://your-app.databricksapps.com/logz
- MCP connection issues:
- Check Claude logs:
tail -f ~/Library/Logs/Claude/*.log
- Verify the proxy works:
uvx --from git+ssh://... dba-mcp-proxy --help
- Test with echo pipe:
echo "list your mcp commands" | claude
- Check Claude logs:
- Cached version issues: If you get errors about missing arguments after an update:
- Frontend build issues: Ensure Node.js dependencies are installed:
Contributing
- Fork the repository
- Add your prompts and tools
- Test locally with
./watch.sh
- Submit a pull request
License
See LICENSE.md
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 AI assistants like Claude to interact with Databricks workspaces through secure OAuth authentication. Supports custom prompts, tools for cluster management, SQL execution, and job operations via the Databricks SDK.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to interact with Databricks workspaces, allowing them to browse Unity Catalog, query metadata, sample data, and execute SQL queries.Last updated -PythonMIT License
- -securityAlicense-qualityA server that provides tools to interact with Databricks for cluster, job, notebook, DBFS, and SQL management through natural language interfaces like Claude-Desktop and Cursor.Last updated -PythonGPL 3.0
- -securityFlicense-qualityProvides intelligent dbt assistance through Claude Code integration, enabling users to perform dbt CLI operations, explore project metadata, and execute SQL queries against DuckDB warehouse with context-aware support.Last updated -1Python
- AsecurityAlicenseAqualityProvides flexible access to Oracle databases for AI assistants like Claude, supporting SQL queries across multiple schemas with comprehensive database introspection capabilities.Last updated -62JavaScriptMIT License