deploy: serve /mcp-beta on staging (set MCP_SERVE_BETA there) - #95
Merged
Conversation
PR #92 gated the beta II instance at /mcp-beta behind $MCP_SERVE_BETA (off by default), but no deployment set it, so /mcp-beta was never mounted anywhere (including staging). Wire it on for the staging environment only: - imcp2.service: add Environment=MCP_SERVE_BETA=__MCP_SERVE_BETA__, substituted by deploy.sh per environment. - deploy.sh: substitute __MCP_SERVE_BETA__ from $MCP_SERVE_BETA (default empty). - deploy-native.yml: pass MCP_SERVE_BETA=1 when inputs.environment == staging, empty otherwise, so production keeps serving /mcp (production II) alone. An empty value reads as off, so production's rendered unit is inert. Verified the unit renders MCP_SERVE_BETA=1 for staging and empty for production, and deploy.sh passes `bash -n`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014T9N8USDfNK5yzznPGg7Ym
There was a problem hiding this comment.
Pull request overview
This PR updates the native deployment pipeline so the staging environment actually enables the previously-added /mcp-beta route by setting MCP_SERVE_BETA=1 for staging only, while leaving production behavior unchanged.
Changes:
- Add an
MCP_SERVE_BETAenvironment line to the systemd unit template and document the behavior. - Extend
deploy.shto substitute the__MCP_SERVE_BETA__placeholder during unit rendering. - Configure the reusable GitHub Actions deploy workflow to set
MCP_SERVE_BETA=1only when deploying to staging.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
deploy/native/README.md |
Documents that staging enables /mcp-beta via MCP_SERVE_BETA=1, production leaves it off. |
deploy/native/imcp2.service |
Adds templated Environment=MCP_SERVE_BETA=__MCP_SERVE_BETA__ to the unit. |
deploy/native/deploy.sh |
Substitutes __MCP_SERVE_BETA__ from $MCP_SERVE_BETA (default empty) when rendering the unit. |
.github/workflows/deploy-native.yml |
Sets MCP_SERVE_BETA to '1' for inputs.environment == 'staging', otherwise empty. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closed
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
PR #92 added the beta Internet Identity instance at
/mcp-beta, gated behind$MCP_SERVE_BETA(off by default so production serves/mcpalone). But no deployment set that variable, so/mcp-betawas never mounted anywhere — including staging, where it's meant to live. Requests tohttps://mcp.beta.id.ai/mcp-betatherefore hit no route (nothing/404).This wires
MCP_SERVE_BETAon for the staging deployment only, so staging serves/mcp-beta(beta II) alongside/mcp(production II), while production keeps serving/mcpalone.Related issues
Follows #92. No GitHub issue open.
Changes
deploy/native/imcp2.service: addEnvironment=MCP_SERVE_BETA=__MCP_SERVE_BETA__, substituted per environment at deploy time (mirrors the existing__PUBLIC_URL__templating).deploy/native/deploy.sh: substitute__MCP_SERVE_BETA__from$MCP_SERVE_BETA(default empty)..github/workflows/deploy-native.yml: setMCP_SERVE_BETA=1in the Deploy step wheninputs.environment == 'staging', empty otherwise. Staging (deploy.yml, push to main) turns it on; production (deploy-release.yml,release-*tags) leaves it off.deploy/native/README.md: note that staging setsMCP_SERVE_BETA=1and therefore serves/mcp-beta.An empty value reads as off (the app's
serve_beta()only treats1/true/yes/onas truthy), so production's rendered unit lineEnvironment=MCP_SERVE_BETA=is inert.Notes
main, so this takes effect on the next push tomainafter merge. Production is unaffected (and still needs arelease-*tag that includes Serve production II at /mcp; drop /mcp-prod; add opt-in /mcp-beta for staging #92 before its/mcpmoves to production II — separate from this PR).Testing
Environment=MCP_SERVE_BETA=1for staging andEnvironment=MCP_SERVE_BETA=(empty/off) for production, using the exactdeploy.shsed substitution with the variable exported as the workflow'senv:provides it.bash -n deploy/native/deploy.sh(syntax check) passes; no leftover__…__placeholders in the rendered unit.cargo build/cargo test— not applicable (deploy config only; no Rust changed).Checklist
Generated by Claude Code