Skip to content

feat(vtex): migrate to Cloudflare Workers deploy#424

Merged
viktormarinho merged 1 commit into
mainfrom
viktormarinho/vtex-cf-deploy
May 6, 2026
Merged

feat(vtex): migrate to Cloudflare Workers deploy#424
viktormarinho merged 1 commit into
mainfrom
viktormarinho/vtex-cf-deploy

Conversation

@viktormarinho
Copy link
Copy Markdown
Contributor

@viktormarinho viktormarinho commented May 6, 2026

Summary

  • Migrates the vtex MCP off the kubernetes-bun pipeline onto the same Cloudflare Workers pattern as github/dropbox: adds vtex/wrangler.toml (custom domain vtex-mcp.decocms.com), converts server/main.ts to a Workers fetch entrypoint, and adds a dedicated .github/workflows/deploy-vtex.yml triggered on vtex/** changes.
  • Updates vtex/package.json to use wrangler-based scripts, bumps @decocms/runtime to ^1.6.0 and @modelcontextprotocol/sdk to ^1.27.1, drops deco-cli, and tightens tsconfig.json (no DOM libs, narrowed include).
  • Removes the vtex entry from deploy.json so the old pipeline stops picking it up; collapses the per-package vtex/bun.lock into the workspace root lockfile.

Test plan

  • bun run check passes in vtex/
  • bunx wrangler deploy --dry-run --outdir=dist succeeds (5.1MB / 775KB gzip bundle)
  • Pre-merge: register vtex-mcp.decocms.com as a custom domain in the Cloudflare zone (otherwise first deploy will fail)
  • Post-merge: verify Deploy VTEX MCP workflow runs green and the new endpoint serves /mcp

🤖 Generated with Claude Code


Summary by cubic

Migrate the VTEX MCP from the kubernetes-bun pipeline to Cloudflare Workers with a wrangler-based deploy and the custom domain vtex-mcp.decocms.com. This aligns VTEX with the existing Workers pattern and simplifies operations.

  • Refactors

    • Switched to Cloudflare Workers: added vtex/wrangler.toml (custom domain, logs), converted server/main.ts to a Workers fetch entrypoint, and added .github/workflows/deploy-vtex.yml.
    • Updated app and config: MCP URL now https://vtex-mcp.decocms.com/mcp; package.json scripts use wrangler; tightened tsconfig.json (no DOM libs, server only).
    • Removed legacy pipeline and cleaned up: dropped vtex from deploy.json and the per-package vtex/bun.lock; bumped deps (@decocms/runtime ^1.6.0, @modelcontextprotocol/sdk ^1.27.1, @decocms/bindings ^1.4.0); added wrangler and @types/node; removed deco-cli.
  • Migration

    • Before merge: register vtex-mcp.decocms.com as a custom domain in Cloudflare.
    • After merge: confirm the "Deploy VTEX MCP" workflow passes and https://vtex-mcp.decocms.com/mcp responds.

Written for commit 3e2330a. Summary will update on new commits.

Move vtex MCP off the kubernetes-bun pipeline onto the same
Cloudflare Workers pattern as github/dropbox: wrangler.toml with
custom domain, Workers fetch entrypoint, dedicated deploy-vtex.yml
workflow, and bumped runtime/sdk deps. Removes the vtex entry from
deploy.json so the kubernetes-bun pipeline no longer picks it up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@viktormarinho viktormarinho merged commit 0e4598e into main May 6, 2026
2 checks passed
viktormarinho added a commit that referenced this pull request May 6, 2026
Reverts the Workers migration (#424#427). The runtime cache fix from
decocms/studio#3299/#3300 didn't restore acceptable tools/list latency
(~5s/call still observed after 1.6.2). Going back to the working
kubernetes-bun pipeline; vtex stays on @decocms/runtime 1.3.1 with the
serve()-style entrypoint.

Restores: deploy.json entry, wrangler.toml deleted, deploy-vtex.yml
workflow deleted, server/main.ts back to bun serve(), package.json
back to deco-cli/openapi-ts deps, tsconfig/app.json restored.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant