Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Databricks API configuration (REQUIRED)
DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
# Auth (pick one; see README "Authentication")
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=your_personal_access_token
# DATABRICKS_CLIENT_ID=... # OAuth service principal instead of a token
# DATABRICKS_CLIENT_SECRET=...
# DATABRICKS_CONFIG_PROFILE=DEFAULT # or use a ~/.databrickscfg profile

# SQL Warehouse configuration (OPTIONAL - for SQL functionality)
# Get this from your Databricks workspace SQL Warehouses section
DATABRICKS_WAREHOUSE_ID=your_warehouse_id_here
# Optional
DATABRICKS_WAREHOUSE_ID=
DATABRICKS_MCP_READ_ONLY=false
# DATABRICKS_MCP_TOOLSETS=unity_catalog,sql,volumes
# DATABRICKS_MCP_MAX_RESPONSE_CHARS=50000
# DATABRICKS_MCP_LOG_LEVEL=WARNING

# Server configuration (OPTIONAL - for development)
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
DEBUG=False

# Logging (OPTIONAL)
LOG_LEVEL=INFO
# MCP clients pass env vars in their own config. This file is only read if you
# export it yourself, e.g.: set -a; source .env; set +a
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[dev]"
- run: ruff check src tests scripts
- run: ruff format --check src tests scripts
- run: pytest -q

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install build twine
- run: python -m build
- run: twine check --strict dist/*
# Install the wheel by itself (no source tree) and make sure the entry point works.
- run: |
python -m venv /tmp/wheel-env
/tmp/wheel-env/bin/pip install dist/*.whl
/tmp/wheel-env/bin/databricks-mcp --version
/tmp/wheel-env/bin/databricks-mcp list-tools > /dev/null
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish to PyPI

# Runs when you publish a GitHub release tagged vX.Y.Z.
# Uses PyPI trusted publishing, so no API token is stored in the repo.
# One-time setup: https://docs.pypi.org/trusted-publishers/ (see RELEASING.md).

on:
release:
types: [published]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Check the tag matches the package version
run: |
version=$(python -c "import re;print(re.search(r'__version__ = \"(.+?)\"', open('src/databricks_mcp/__init__.py').read()).group(1))")
if [ "v${version}" != "${GITHUB_REF_NAME}" ]; then
echo "Tag ${GITHUB_REF_NAME} does not match package version ${version}" >&2
exit 1
fi
- run: pip install build twine
- run: python -m build
- run: twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/databricks-mcp-toolkit/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
Loading
Loading