From a354d2ec2b002a91b7406af5bf7cdf488e4335a6 Mon Sep 17 00:00:00 2001 From: Bei Pang Date: Wed, 3 Jun 2026 15:54:24 -0700 Subject: [PATCH] [DET-4499] Update readme and env comment to make install easier --- noom-mcp-server/.env.example | 15 +++++++++------ noom-mcp-server/README.md | 21 ++++++++------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/noom-mcp-server/.env.example b/noom-mcp-server/.env.example index 25c72b5d..3a33aafc 100644 --- a/noom-mcp-server/.env.example +++ b/noom-mcp-server/.env.example @@ -3,7 +3,10 @@ # Copy this file to .env and fill in the values below. # DO NOT commit .env to source control. # -# Authentication: the server opens a browser OAuth flow on first run. +# Authentication: at startup the server checks for a cached Databricks OAuth +# token. If one exists the start is silent; if not, a browser tab opens to +# complete the login flow. On headless machines, run: +# databricks auth login --host https://noom-prod.cloud.databricks.com # SP credentials are managed by an admin — no config needed here. # See DEVELOPMENT.md for dev/CI setup. @@ -13,8 +16,8 @@ DATABRICKS_HOST=https://noom-prod.cloud.databricks.com # SQL execution workspace — must match DATABRICKS_HOST DATABRICKS_MCP_SQL_HOST=https://noom-prod.cloud.databricks.com -# SQL warehouse — all queries are forced to run on this warehouse -# Find it in Databricks UI: -# * SQL Warehouses → Pick your warehouse. -# * In the Overview, you can see the ID by the warehouse name -DATABRICKS_WAREHOUSE_ID= +# SQL warehouse — all queries are forced to run on this warehouse. +# The default below is the shared Noom production warehouse. Override if +# you need a different warehouse (find its ID in Databricks UI under +# SQL Warehouses → your warehouse → Overview). +DATABRICKS_WAREHOUSE_ID=575c0a43969584a4 diff --git a/noom-mcp-server/README.md b/noom-mcp-server/README.md index 48f8e505..10ff85b4 100644 --- a/noom-mcp-server/README.md +++ b/noom-mcp-server/README.md @@ -23,34 +23,29 @@ cd databricks-ai-dev-kit/noom-mcp-server curl -LsSf https://astral.sh/uv/install.sh | sh ``` -**3. Authenticate to Databricks with OAuth** (PAT tokens are rejected) - -```bash -databricks auth login --host https://noom-prod.cloud.databricks.com -``` - -**4. Create your `.env` file** +**3. Create your `.env` file** ```bash cp .env.example .env ``` -Open `.env` and set `DATABRICKS_WAREHOUSE_ID` to your SQL warehouse ID. -(Find it in the Databricks UI under **SQL Warehouses → your warehouse → Overview**.) +The `.env` file ships with a default `DATABRICKS_WAREHOUSE_ID`. You can leave it as-is or override it with a different warehouse ID (find it in the Databricks UI under **SQL Warehouses → your warehouse → Overview**). -**5. Install dependencies** +**4. Install dependencies** ```bash uv sync ``` -**6. Verify the server starts** +**5. Verify the server starts** ```bash uv run --env-file .env python run.py ``` -You should see the FastMCP server start without errors. Use `Ctrl-C` to stop it — your MCP client will manage the process from here. +At startup the server checks for a cached Databricks OAuth token. If one exists the start is silent; if not, it opens a browser tab to complete the login flow. On headless machines where a browser can't open, run `databricks auth login --host https://noom-prod.cloud.databricks.com` in a terminal first. + +Use `Ctrl-C` to stop it — your MCP client will manage the process from here. --- @@ -117,7 +112,7 @@ user's own credentials and are not affected by the patches. - Python ≥ 3.10 - [uv](https://docs.astral.sh/uv/getting-started/installation/) -- Databricks OAuth session (`databricks auth login` — PAT tokens are rejected at startup) +- Databricks OAuth token (obtained automatically via browser on first start; PAT tokens are rejected) - READ permission on the `dbrix_mcp_secret` secret scope (provisioned by an admin) ## Environment variables