A Model Context Protocol (MCP) server that connects to the Databricks Genie API, allowing LLMs to ask natural language questions, run SQL queries, and interact with Databricks conversational agents. - List Genie spaces available in your Databricks workspace (Currently Manual/Using Resource) - Fetch metadata (title, description) of a specific Genie space - Start new Genie conversations with natural
Add this skill
npx mdskills install yashshingvi/databricks-genie-mcpWell-documented MCP server with useful Databricks Genie tools but overly broad permissions and manual setup workaround.
A Model Context Protocol (MCP) server that connects to the Databricks Genie API, allowing LLMs to ask natural language questions, run SQL queries, and interact with Databricks conversational agents.
Clone this repository
Create and activate a virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Create a .env file in the root directory with the following variables:
DATABRICKS_HOST=your-databricks-instance.cloud.databricks.com # Don't add https
DATABRICKS_TOKEN=your-personal-access-token
๐ Manually Adding Genie Space IDs
Note:
At this time, the Databricks Genie API does not provide a public endpoint to list all available space IDs and titles. (afaik)
As a workaround, you need to manually add the Genie space IDs and their titles in the get_genie_space_id() function in main.py.
You can test the MCP server using the inspector (optional but recommended):
npx @modelcontextprotocol/inspector python main.py
OR
You can directly build and run docker to test the server
Download Claude Desktop
Install Your MCP Server: From your project directory, run:
mcp install main.py
Once Server Installed
Connect in Claude
Open Claude Desktop
Click Resources โ Add Resource
Select your Genie MCP Server
Start chatting with your data using natural language! ๐ฏ
Host Your Databricks instance URL (e.g., your-instance.cloud.databricks.com) โ do not include https://
Token
Go to your Databricks workspace
Click your username (top right) โ User Settings
Under the Developer tab, click Manage under "Access tokens"
Generate a new token and copy it
python main.py
This will start the Genie MCP server over the stdio transport for LLM interaction.
The following MCP tools are available:
Tool Description
Common Issues
Invalid host: Ensure the host does not include https://
Token error: Make sure your personal access token is valid and has access to Genie
Timeout: Check if the Genie space is accessible and not idle/expired
No data returned: Ensure your query is valid for the selected space
Keep your .env file secure and never commit it to version control
Use minimal scope tokens with expiration whenever possible
Avoid exposing this server in public-facing environments unless authenticated
Install via CLI
npx mdskills install yashshingvi/databricks-genie-mcpDatabricks Genie MCP Server is a free, open-source AI agent skill. A Model Context Protocol (MCP) server that connects to the Databricks Genie API, allowing LLMs to ask natural language questions, run SQL queries, and interact with Databricks conversational agents. - List Genie spaces available in your Databricks workspace (Currently Manual/Using Resource) - Fetch metadata (title, description) of a specific Genie space - Start new Genie conversations with natural
Install Databricks Genie MCP Server with a single command:
npx mdskills install yashshingvi/databricks-genie-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Databricks Genie MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.