Skip to main content
The Cloudflare Worker target is FrontMCP’s first hosted runtime. Clients connect to https://your-worker.example.com/mcp; the Worker boots from a signed bundle assembled by the GitHub Action, and live-reloads on every push without redeploying. This page covers the Worker itself. The declarative configuration that drives it lives in frontmcp.deploy.yaml; the higher-level concepts behind the skills-only model are on the Skills-Only Deployment page.
v1.3 ships the Worker runtime as the first hosted target. The Vercel Edge and Deno Deploy targets are deferred — declared in the runtime.target discriminator but not yet implemented.

What a Worker entry file looks like

The user’s worker.ts is ~10 lines. Everything else is in the deploy bundle.
createWorker parses the manifest, applies the environments.production overlay, verifies the signed envelope against TRUSTED_KEYS, then assembles the FrontMCP runtime against the Worker’s request handler.

Storage bindings (opinionated default)

The Worker uses Durable Objects + D1 + KV + R2 for its persistence stack: These names mirror the bindings.* section of the manifest verbatim. The Action can also emit a wrangler.toml from the manifest so you can stay in lockstep.

Hot-reload on every push

The Worker exposes one internal endpoint — POST /_frontmcp/resync — that accepts a freshly-built, signed bundle and atomically swaps the in-memory skill registry and classification registry.
A wrangler deploy is only needed on structural changes — new Durable Object classes, new bindings, new compatibility flags. Day-to-day skill / OpenAPI changes are pure hot-reload.
The replay-guard window is shared with the v1.2 SaaS push hardening — same JWT + nonce machinery, generalised from skill-only bundles to the full deploy envelope.

Worker isolation strategy

codecall:execute runs agent-authored AgentScript inside the Worker’s V8 isolate. Two ingredients make this safe:
  1. AST preflight on every call. Each script is parsed by @enclave-vm/ast (pure-JS, Acorn-based, zero Node dependencies — Worker-safe). Disallowed identifiers are rejected before the script ever runs: eval, Function, process, require, dynamic import, raw fetch, top-level globalThis access, prototype walks, etc.
  2. Frozen capability scope. The script is executed via new Function('skills', 'ctx', code) with a frozen scope object containing only:
    • The active skills’ generated namespaces (acme, billing, …)
    • callTool / getTool (still available for backward compat or non-namespaced names)
    • mcpLog / mcpNotify (observability hooks)
@enclave-vm/core (which the Node target uses) relies on node:vm and is therefore not Worker-safe — the Worker target uses the AST validator alone plus the frozen scope. This is the strategy documented in the v1.3 design memo and decided after the @enclave-vm/* Worker-compatibility audit.
The Worker isolation model leans on the AST guard’s correctness. If you author your own custom plugin tools that the AgentScript could reach (beyond the auto-generated OpenAPI namespaces), make sure those tools’ implementations don’t re-introduce escape hatches.

Sessions on Durable Objects

SessionDO is the FrontMCP session store. Long-lived MCP sessions (Streamable HTTP, /sse) are bound to a DO instance keyed by session id; the instance survives Worker restarts and routes incoming requests for that session deterministically. This converges with the broader session-HA design — the DO IS the external session store for the Cloudflare deployment target. Existing HA primitives (heartbeat, takeover, relay) apply unchanged; the DO simply provides the durable substrate.

Auth at the Worker edge

The deploy manifest’s auth block configures the gate. The four shapes:
Frontegg integration runs JWT verification at the Worker edge — no upstream hop, no cold-start latency. Other providers follow the same shape: declare the secret name, populate it via wrangler secret put.

Secrets

Secret values are never in the manifest. Every secret name referenced from auth, signing.trustRoots, or any plugin must appear in the manifest’s secrets[] list (the cross-validator enforces this). Populate the actual values out-of-band:
Inside the Worker the values are available as env.<NAME>.

Wrangler config

Most binding shapes mirror wrangler.toml field names verbatim (camelCased in the YAML). The Action can emit a wrangler.toml from your manifest so you don’t have to maintain both:
Then either keep that file or feed it directly into a wrangler deploy step in your workflow.

Sample .github/workflows/deploy.yml

The action emits two outputs you can chain on:
  • deployment-url — the Worker URL the bundle was pushed to.
  • bundle-sha256 — the content-addressed digest of the envelope. Pin in your release notes / audit trail.

Limits & known gaps

  • @enclave-vm/core (full VM) runs only on the Node target. The Worker target uses the AST-preflight + frozen-scope strategy instead. If your skills need the full enclave VM’s pause/rerun semantics, host on Node (and watch the v1.7 roadmap for a Worker-compatible answer via CF Containers).
  • scripts/ skill execution (Anthropic Agent Skills scripts/ directory) ships in v1.7. The v1.3 Worker honours skill bundles structurally but doesn’t execute scripts/ blobs yet.
  • Vault-backed credential resolver isn’t on the Worker yet — use CF secret bindings (wrangler secret put) for v1.3.

Deploy manifest reference

Every field of frontmcp.deploy.yaml, with examples.

Skills-Only Deployment

The concept behind the runtime.

High Availability

Session HA primitives the Worker integrates with.

Skill-Based Workflows

The skill primitive that powers everything.