by yashshingvi
Provides a Model Context Protocol server that connects to the Databricks Genie API, enabling large language models to ask natural language questions, execute SQL queries, and interact with Genie conversational agents.
Enables LLMs to retrieve data and insights from a Databricks workspace through natural language, leveraging the Genie API for conversational query handling and structured SQL results.
.env
file with DATABRICKS_HOST
(without https://
) and DATABRICKS_TOKEN
.get_genie_space_id()
function (the API does not list them automatically).python main.py
npx @modelcontextprotocol/inspector python main.py
mcp install main.py
and connect it as a resource.main.py
.DATABRICKS_HOST
(your workspace URL without https://
) and DATABRICKS_TOKEN
(personal access token with Genie permissions).python main.py
after setting the required env vars..env
file secure and use minimal‑scope tokens.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
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "databricks-genie": { "command": "npx", "args": [ "@modelcontextprotocol/inspector", "python", "main.py" ], "env": { "DATABRICKS_HOST": "<YOUR_DATABRICKS_HOST>", "DATABRICKS_TOKEN": "<YOUR_DATABRICKS_TOKEN>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by antvis
Offers over 25 AntV chart types for automated chart generation and data analysis, callable via MCP tools, CLI, HTTP, SSE, or streamable transports.
by reading-plus-ai
A versatile tool that enables interactive data exploration through prompts, CSV loading, and script execution.
by Canner
Provides a semantic engine that lets MCP clients and AI agents query enterprise data with contextual understanding, precise calculations, and built‑in governance.
by surendranb
Provides natural‑language access to Google Analytics 4 data via MCP, exposing over 200 dimensions and metrics for Claude, Cursor and other compatible clients.
by ergut
Provides secure, read‑only access to BigQuery datasets, allowing large language models to query and analyze data through a standardized interface.
by isaacwasserman
Provides an interface for LLMs to visualize data using Vega‑Lite syntax, supporting saving of data tables and rendering visualizations as either a full Vega‑Lite specification (text) or a base64‑encoded PNG image.
by vantage-sh
Fetch and explore cloud cost and usage data from a Vantage account using natural language through AI assistants and MCP clients.
by acryldata
Provides a Model Context Protocol server that enables searching, metadata retrieval, lineage traversal, and SQL query listing for DataHub entities.
by rishijatia
Provides programmatic access to Fantasy Premier League statistics, team information, gameweeks, and analysis tools via a Model Context Protocol server.