fix(wake): serve without withAuth for parity with other commerce MCPs - #549
Merged
Conversation
The Wake deploy was crash-looping at boot with "[auth] AUTH_TOKEN is not set" — withAuth reads the shared secret eagerly and exits when it's missing. Wake was the only deco-hosted MCP enforcing this; VTEX, Shopify, Magento and the rest still serve runtime.fetch directly and are tracked in auth-exemptions.json. Drop the wrapper for parity so end users connect with only their Wake credentials (storefrontToken/apiToken), and register wake in the exemptions backlog to keep check-auth.ts green. Re-add withAuth once Mesh token-forwarding lets connections carry the shared secret transparently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nicacioliveira
approved these changes
Aug 24, 2026
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.
Problem
The Wake deploy was crash-looping at boot:
withAuthreads the shared secret eagerly at startup and exits the process whenAUTH_TOKENis missing. Wake was the only deco-hosted MCP enforcing this — a scan ofsites-*.deco.siteMCPs with their own server shows onlywakeandtemplate-minimalwrapruntime.fetchinwithAuth. Every other commerce MCP (VTEX, Shopify, Magento, Strapi…) servesruntime.fetchdirectly and is tracked inauth-exemptions.json.Requiring a shared secret also means end users can't connect with just their Wake credentials — they'd need a bearer token the platform doesn't yet forward transparently for hosted MCPs.
Change
wake/server/main.ts— drop thewithAuthwrapper; serveruntime.fetchdirectly, matching VTEX and the other commerce MCPs. Users connect with onlystorefrontToken/apiToken(already in the install form).auth-exemptions.json— registerwakein the remediation backlog socheck-auth.tsstays green.Trade-off
This puts Wake in the same posture as the other exempt commerce MCPs: the endpoint is open and the runtime decodes
x-mesh-tokenwithout verifying its signature. Re-addwithAuthonce Mesh token-forwarding lets connections carry the shared secret without end-user friction — that's what the exemptions backlog exists to remediate, for all of them at once.Validation
bun run scripts/check-auth.ts wake→ passes (exempt)bun run build(wake) →Bundled 392 modules, emitsdist/server/main.js🤖 Generated with Claude Code
Summary by cubic
Serve Wake without
withAuthand addwaketoauth-exemptions.json. Previously Wake requiredAUTH_TOKENat startup and exited when missing; now it servesruntime.fetchdirectly so users connect withstorefrontToken/apiTokenonly. This matches other commerce MCPs and unblocks deploys; the endpoint remains open until Mesh token-forwarding is available.withAuthfromwake/server/main.tsand callserve(runtime.fetch)using@decocms/runtimeand@decocms/mcps-shared/serve.waketoauth-exemptions.jsonto keepscripts/check-auth.tspassing.x-mesh-tokenwithout signature verification; re-add@decocms/mcps-shared/authonce token-forwarding ships.Written for commit 04855e2. Summary will update on new commits.