Databricks

DatabricksにおけるカスタムMCPサーバーの構築
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You run a custom MCP (Model Context Protocol) server on Databricks Apps to expose two practical tools you can call from your preferred LLM client. This server lets you fetch stock information from the Tokyo Stock Exchange and run SQL queries in a Databricks SQL warehouse, making it easy to integrate live data and data analytics into your conversations.

How to use

Connect your MCP client to the Databricks Apps MCP server using the HTTP configuration you set up. Once connected, you can invoke the two available tools from your LLM prompts: get_stock_info to retrieve stock data from the TSE, and run_query_on_databricks to execute SQL against your Databricks SQL warehouse. Treat the server as a trusted data source that executes defined operations and returns results as plain text strings for easy display in your chat or UI.

How to install

Prerequisites you need before installing and running locally or deploying to Databricks Apps:

Python 3.11 or higher

Databricks CLI and access to your Databricks workspace

A Databricks SQL warehouse already created for your MCP usage

Additional sections

Deployment and configuration details you will use directly in your setup include the Databricks Apps configuration file and deployment steps. You will specify the SQL warehouse to use via the WAREHOUSE_ID environment variable and then deploy the app to Databricks Apps. After deployment, verify the application URL and use that URL to configure your MCP client for HTTP transport.

Configuration and security notes

Configure the server to your environment by setting the required environment variable in the deployment configuration. Ensure you limit access to the MCP URL and keep credentials secure. Use the Databricks-provided Bearer token authentication via the platform’s built-in mechanisms. For SQL operations, validate and sanitize inputs as needed to minimize SQL injection risk.

Troubleshooting

If the MCP tools do not appear in your LLM client, ensure your MCP server is mounted at the root path when deploying to Databricks Apps and that you defined the tool endpoints without manually overriding names. Confirm your Databricks App is running and that the URL configured in your MCP client points to the deployed app. Check logs via your Databricks UI or CLI for any startup or runtime errors.

Available tools

get_stock_info

Fetches stock information from the Tokyo Stock Exchange. Use this tool to obtain up-to-date stock data for a given ticker or market segment.

run_query_on_databricks

Executes a SQL query against your Databricks SQL warehouse and returns the results as a text string. Useful for quick data exploration and verification from an LLM prompt.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational