Repository navigation
v0.3.0 — Code Mode MCP
Code Mode MCP
MCP endpoints (/mcp, /mcp/editor) now serve Cloudflare Code Mode by default. Instead of 33 individual tool calls, agents write JavaScript that chains operations in a V8 sandbox — one code tool replaces sequential round-trips.
What changed
/mcp→ Code Mode (admin, 31 methods) whenworker_loadersbinding is configured/mcp/editor→ Code Mode (editor, 20 methods — schema mutations blocked)- Standard MCP falls back when no loader binding is available
/openapi.json→ Auto-generated OpenAPI 3.1.0 spec from@effect/platformHttpApi
New dependencies
@cloudflare/codemode— V8 sandbox execution viaworker_loadersagents— MCP handler for Code Mode server
Configuration
Add worker_loaders to your wrangler config and pass loader: env.LOADER in CMS bindings:
Why
A typical CMS task (create model → add fields → create records → publish → verify) is 10-25 sequential MCP tool calls. Code Mode executes them as a single JavaScript function in a sandboxed V8 isolate — no intermediate round-trips through the LLM.