databricks-genie-MCP

databricks-genie-MCP

Connects to the Databricks Genie API, enabling LLMs to ask natural language questions, run SQL queries, and interact with Databricks conversational agents.

Category
Visit Server

README

Databricks Genie MCP Server

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.

โœจ Features

  • 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 language questions
  • Ask follow-up questions in ongoing Genie conversations
  • Retrieve SQL and result tables in structured format

๐Ÿงฑ Prerequisites

  • Python 3.7+
  • Databricks workspace with:
    • Personal access token
    • Genie API enabled
    • Permissions to access Genie spaces and run queries

โš™๏ธ Setup

  1. Clone this repository

  2. 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.

๐Ÿงช Test the Server

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

๐Ÿ’ฌ Use with Claude Desktop

Download Claude Desktop

Install Your MCP Server: From your project directory, run:

mcp install main.py

Once Server Installed

  1. Connect in Claude

  2. Open Claude Desktop

  3. Click Resources โ†’ Add Resource

  4. Select your Genie MCP Server

  5. Start chatting with your data using natural language! ๐ŸŽฏ

๐Ÿงพ Obtaining Databricks Credentials

Host Your Databricks instance URL (e.g., your-instance.cloud.databricks.com) โ€” do not include https://

Token

  1. Go to your Databricks workspace

  2. Click your username (top right) โ†’ User Settings

  3. Under the Developer tab, click Manage under "Access tokens"

  4. Generate a new token and copy it

๐Ÿš€ Running the Server

python main.py

This will start the Genie MCP server over the stdio transport for LLM interaction.

๐Ÿงฐ Available MCP Tools

The following MCP tools are available:

Tool Description

  1. get_genie_space_id() List available Genie space IDs and titles
  2. get_space_info(space_id: str) Retrieve title and description of a Genie space
  3. ask_genie(space_id: str, question: str) Start a new Genie conversation and get results
  4. follow_up(space_id: str, conversation_id: str, question: str) Continue an existing Genie conversation

๐Ÿ› ๏ธ Troubleshooting

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

๐Ÿ” Security Considerations

  • 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

Claude Desktop Screenshots

image

image

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured