From b64f06e58ffd8f06f8051443ff78d94d77b59965 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Tue, 25 Aug 2026 22:23:51 -0700 Subject: [PATCH 1/2] docs: compare with Cloudflare's Code Mode --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index b2b677a..152107e 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,26 @@ Compared to a conventional MCP server with one tool per function: - Each program runs in a fresh worker process under execution budgets, and only the program's final value is returned to the caller. +## How this differs from Cloudflare's Code Mode + +Cloudflare's [Code Mode](https://blog.cloudflare.com/code-mode/) and CodeMode +share a thesis: models are better at writing code than at emitting tool +calls. They apply it on opposite sides of the protocol. + +Cloudflare's Code Mode is agent-side. Their Agents SDK converts the tool +schemas of the MCP servers an agent already uses into a TypeScript API; the +model writes TypeScript that runs in a V8 isolate on the Workers platform, +and each call proxies back to the original servers. + +CodeMode is server-side. You author the server itself: capabilities are +native typed Go functions, not wrapped remote tools, and the server runs the +agent's program in a local worker process. Because code execution is part of +the server's own contract, any MCP client gets one-round-trip composition +without a special agent framework or hosting platform. The server also +enforces its own policy: every capability call is authorized before it +dispatches, and a deployment can disable capabilities it does not want to +expose. + ## Install ```sh From c5d07c1ea841f5f4abf3fef6ea2a17fc3f7a9be5 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Tue, 25 Aug 2026 22:26:22 -0700 Subject: [PATCH 2/2] docs: move comparison below Documentation --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 152107e..330caf6 100644 --- a/README.md +++ b/README.md @@ -30,26 +30,6 @@ Compared to a conventional MCP server with one tool per function: - Each program runs in a fresh worker process under execution budgets, and only the program's final value is returned to the caller. -## How this differs from Cloudflare's Code Mode - -Cloudflare's [Code Mode](https://blog.cloudflare.com/code-mode/) and CodeMode -share a thesis: models are better at writing code than at emitting tool -calls. They apply it on opposite sides of the protocol. - -Cloudflare's Code Mode is agent-side. Their Agents SDK converts the tool -schemas of the MCP servers an agent already uses into a TypeScript API; the -model writes TypeScript that runs in a V8 isolate on the Workers platform, -and each call proxies back to the original servers. - -CodeMode is server-side. You author the server itself: capabilities are -native typed Go functions, not wrapped remote tools, and the server runs the -agent's program in a local worker process. Because code execution is part of -the server's own contract, any MCP client gets one-round-trip composition -without a special agent framework or hosting platform. The server also -enforces its own policy: every capability call is authorized before it -dispatches, and a deployment can disable capabilities it does not want to -expose. - ## Install ```sh @@ -108,6 +88,26 @@ Shorter compile-checked examples: [`example_test.go`](example_test.go) and - [MCP tools](docs/docs/reference/mcp-tools.md) - [Security model](docs/docs/explanation/security-model.md) +## How this differs from Cloudflare's Code Mode + +Cloudflare's [Code Mode](https://blog.cloudflare.com/code-mode/) and CodeMode +share a thesis: models are better at writing code than at emitting tool +calls. They apply it on opposite sides of the protocol. + +Cloudflare's Code Mode is agent-side. Their Agents SDK converts the tool +schemas of the MCP servers an agent already uses into a TypeScript API; the +model writes TypeScript that runs in a V8 isolate on the Workers platform, +and each call proxies back to the original servers. + +CodeMode is server-side. You author the server itself: capabilities are +native typed Go functions, not wrapped remote tools, and the server runs the +agent's program in a local worker process. Because code execution is part of +the server's own contract, any MCP client gets one-round-trip composition +without a special agent framework or hosting platform. The server also +enforces its own policy: every capability call is authorized before it +dispatches, and a deployment can disable capabilities it does not want to +expose. + ## Security boundary Each `execute` request runs Starlark in a fresh worker process that CodeMode