This repository was archived by the owner on Jun 11, 2026. It is now read-only.
feat(noom-mcp-server): add Databricks Apps hosting layer#21
Open
beipang wants to merge 5 commits into
Open
Conversation
Deploys the Noom MCP server as a shared Databricks App at https://mcp-noom-dev-638571477831686.aws.databricksapps.com/mcp Key changes: - hosting/: new ASGI serving layer — IdentityMiddleware extracts X-Forwarded-User per request and stores it in a ContextVar so SQL query tagging works correctly in a multi-user shared process - run_app.py: hosted entrypoint (uvicorn / Streamable HTTP transport); applies all governance patches, then serves via mcp.http_app() - customization/auth_guard_patch.py: skip browser OAuth when DATABRICKS_APPS_HOSTED=1 (Databricks Apps proxy handles auth) - customization/sql_executor_patch.py: get_mcp_user_identity() reads from ContextVar in hosted mode instead of process-level OAuth cache - requirements-app.txt: pinned dep lockfile for the App environment (generated from uv export; excludes the two local editable packages) - scripts/deploy.sh: stages customization + hosting + upstream packages into a temp dir, uploads to workspace, and deploys the App All local-mode behavior (run.py, stdio transport, browser OAuth) is unchanged. See DATABRICKS_APPS_SPEC.md for full design rationale. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add patch_get_best_warehouse: short-circuits the upstream warehouse discovery call (which fails in hosted mode since the app SP has no warehouse list permission) to return DATABRICKS_WAREHOUSE_ID directly - deploy.sh step 6 now automatically grants secret scope READ and sets authorization mode (user_api_scopes: sql) via REST API — no manual steps required after deploy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The app SP is assigned asynchronously after first deploy. Without a retry loop the script would immediately fail with "unknown" SP and require a manual grant. Retries up to 6 times (30 s) before giving up. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deploys the Noom MCP server as a shared Databricks App at https://mcp-noom-dev-638571477831686.aws.databricksapps.com/mcp
Key changes:
All local-mode behavior (run.py, stdio transport, browser OAuth) is unchanged. See DATABRICKS_APPS_SPEC.md for full design rationale.