Repository navigation
[BFA-130] Default MCP public origin from BASE_DOMAIN - #392
Open
arnold-retool wants to merge 1 commit into
Open
arnold-retool wants to merge 1 commit into
arnold-retool wants to merge 1 commit into
Conversation
Contributor
[Medium impact] The PR appears safe to merge, with all three previous findings addressed and no new blocking issues found. Reviews (2) · Last reviewed commit: "[BFA-130] Default MCP public origin from..." · Reviewed by Greptile |
arnold-retool
added this pull request to stack #393
September 30, 2026 21:47
arnold-retool
force-pushed
the
arnold/mcp-public-origin-defaults
branch
from
October 20, 2026 20:51
dc98d39 to
85f8d3a
Compare
arnold-retool
marked this pull request as ready for review
October 20, 2026 20:57
arnold-retool
force-pushed
the
arnold/mcp-public-origin-defaults
branch
from
October 20, 2026 23:32
85f8d3a to
99d997d
Compare
arnold-retool
force-pushed
the
arnold/mcp-public-origin-defaults
branch
from
October 21, 2026 21:47
99d997d to
78dccb5
Compare
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
arnold-retool
force-pushed
the
arnold/mcp-public-origin-defaults
branch
from
October 21, 2026 22:30
78dccb5 to
b269170
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
BFA-130: Use
env.BASE_DOMAINas the MCP public origin fallback in a single-host Retool installation. The chart passes it to the MCP process, derivesOAUTH_MAIN_DOMAINwhen it can resolve the value, and passes trusted-proxy CIDRs when configured. An explicitmcp.config.mcpServiceExternalUrl(ormcp.environmentVariablesentry) is copied to the backend unless the backend has its own explicit value, keeping OAuth discovery, Bearer challenges, resource metadata, and upload links aligned. Existing explicit values are preserved.Render-time validation rejects malformed public origin values and clear mismatches with chart-managed Ingress hosts and HTTPRoute hostnames. Multiple managed hosts, externally managed ingress, and secret-backed values that cannot be resolved during templating remain supported. Tests cover both
backendRelayanddirectrouting modes. The chart version moves to 6.12.4 and both values files remain synchronized.Companion server PR: https://github.com/tryretool/retool_development/pull/86710
This PR is stacked on routing PR #391 (itself stacked on #390) and targets
arnold/mcp-routing-modeso the diff contains only the public-origin change.Migration
For one public host, set
env.BASE_DOMAIN: https://retool.example.comand serve that host via the configured Ingress or HTTPRoute. Removemcp.config.mcpServiceExternalUrlwhen custom Space domains should be advertised per request; the existing explicit override continues to pin every MCP response to one origin. If a proxy rewrites Host or terminates TLS, setenv.MCP_TRUSTED_PROXY_CIDRSto the immediate proxy peer CIDRs. The server PR consumes this contract. With external ingress, disable chart-managed routing and provide the public path mappings documented in the README.Validation
python3 .github/test_mcp_routing.py: 16 render tests passed, including defaults, overrides, mismatches, secret-backed values, custom hosts, and both routing modes.python3 .github/test_mcp_helm_test.py: 14 render and localhost HTTP smoke tests passed.helm lint charts/retool --values charts/retool/ci/test-install-values.yaml --values charts/retool/ci/test-mcp-enabled-option.yaml: passed.helm template ... | kubeconform -strict -ignore-missing-schemas -summary: 18 valid resources, zero invalid, one skipped.git diff --check: passed.No deployment was performed.