WHAT IT CONNECTS
mcp-databricks-server 为 AI Agent 提供什么
- Run SQL queries on Databricks SQL warehouses
- List all Databricks jobs
- Get status of specific Databricks jobs
- Get detailed information about Databricks jobs
- Python 3.7+
- Databricks workspace with:
- Personal access token
- SQL warehouse endpoint
- Permissions to run queries and access jobs
- Clone this repository
- Create and activate a virtual environment (recommended):
- Install dependencies:
- Create a `.env` file in the root directory with the following variables:
- Test your connection (optional but recommended):
- **Host**: Your Databricks instance URL (e.g., `your-instance.cloud.databricks.com`)
- **Token**: Create a personal access token in Databricks:
- Go to User Settings (click your username in the top right)
- Select "Developer" tab
- Click "Manage" under "Access tokens"
- Generate a new token, and save it immediately
- **HTTP Path**: For your SQL warehouse:
- Go to SQL Warehouses in Databricks
- Select your warehouse
- Find the connection details and copy the HTTP Path
- **run_sql_query(sql: str)** - Execute SQL queries on your Databricks SQL warehouse
- **list_jobs()** - List all Databricks jobs in your workspace
- **get_job_status(job_id: int)** - Get the status of a specific Databricks job by ID
- **get_job_details(job_id: int)** - Get detailed information about a specific Databricks job
- "Show me all tables in the database"
- "Run a query to count records in the customer table"
- "List all my Databricks jobs"
- "Check the status of job #123"
- "Show me details about job #456"
- Ensure your Databricks host is correct and doesn't include `https://` prefix
- Check that your SQL warehouse is running and accessible
- Verify your personal access token has the necessary permissions
- Run the included test script: `python test_connection.py`
- Your Databricks personal access token provides direct access to your workspace
- Secure your `.env` file and never commit it to version control
- Consider using Databricks token with appropriate permission scopes only
- Run this server in a secure environment
SECURITY
MCP 收录不等于安全审核
MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。