-
Notifications
You must be signed in to change notification settings - Fork 2.7k
docs: blog for code mode MCP #6126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,67 @@ | ||||||||||
| --- | ||||||||||
| title: "Code Mode MCP in goose" | ||||||||||
| description: An emerging approach to MCP tool calling gets an open source implementation in goose | ||||||||||
| authors: | ||||||||||
| - alexhancock | ||||||||||
| --- | ||||||||||
|
|
||||||||||
|  | ||||||||||
|
|
||||||||||
| # Code Mode MCP | ||||||||||
|
|
||||||||||
| There is an emerging approach to MCP tool calling referred to as "sandbox mode" or "code mode". These ideas were initially | ||||||||||
| presented by Cloudflare in their [Code Mode: the better way to use MCP](https://blog.cloudflare.com/code-mode/) post and Anthropic | ||||||||||
| in their [Code execution with MCP: Building more efficient agents](https://www.anthropic.com/engineering/code-execution-with-mcp) | ||||||||||
| posts. Since the approach and the benefits are clearly laid out in those posts I will summarize them here. | ||||||||||
|
|
||||||||||
angiejones marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| <!-- truncate --> | ||||||||||
|
|
||||||||||
| ## The approach | ||||||||||
|
|
||||||||||
| ### Summary | ||||||||||
|
|
||||||||||
| * Instead of exposing the tools directly to the model an MCP client application can: | ||||||||||
| * Generate a programmatic interface to these same tools (typically JS or TS powered) | ||||||||||
| * Provide a limited set of tools to the model (search available modules/tool source code, read the source code for a tool, and then a tool to execute some code) | ||||||||||
| * Run the code the model generates to call the programmatic API in a sandboxed environment for safety | ||||||||||
|
|
||||||||||
| ### Benefits | ||||||||||
|
|
||||||||||
| * The model can progressively discover relevant tools, without all server and tool definitions in the context window from the beginning | ||||||||||
| * The model can chain tool call results into inputs to further tool calls without the intermediate results needing to flow back to the model - this saves on tokens and avoids exposing potentially sensitive data to the model unnecessarily | ||||||||||
| * The models pre-training datasets have made them very efficient at analyzing large programmatic APIs and writing code to call them, as compared to having been trained only on contrived examples of MCP tool calling | ||||||||||
|
||||||||||
| * The models pre-training datasets have made them very efficient at analyzing large programmatic APIs and writing code to call them, as compared to having been trained only on contrived examples of MCP tool calling | |
| * The models' pre-training datasets have made them very efficient at analyzing large programmatic APIs and writing code to call them, as compared to having been trained only on contrived examples of MCP tool calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not out yet..so we should make it clear to people that it's coming up.
Because the blog is going to merge and go live immediately..and people will say where is code mode, but we're all on 1.16.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah agreed! going to wait for release
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent capitalization of "JavaScript". The term should be consistently capitalized as "JavaScript" (capital S) throughout the document, but line 38 uses "Javascript".
| against it in [boa](https://github.com/boa-dev/boa) which is an embeddable Javascript engine. One neat feature of boa we were able | |
| against it in [boa](https://github.com/boa-dev/boa) which is an embeddable JavaScript engine. One neat feature of boa we were able |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL path in the og:url meta tag references "2025/12/15" which is inconsistent with the future date issue. This should match the actual publication date of the blog post.
| <meta property="og:url" content="https://block.github.io/goose/blog/2025/12/15/code-mode-mcp-in-goose" /> | |
| <meta property="og:url" content="https://block.github.io/goose/blog/2024/12/15/code-mode-mcp-in-goose" /> |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The og:url metadata uses "code-mode-mcp-in-goose" but the folder is named "code-mode-mcp". Based on other blog posts, the URL slug should match the folder name. The URL should be "https://block.github.io/goose/blog/2025/12/15/code-mode-mcp" instead of "code-mode-mcp-in-goose".
| <meta property="og:url" content="https://block.github.io/goose/blog/2025/12/15/code-mode-mcp-in-goose" /> | |
| <meta property="og:url" content="https://block.github.io/goose/blog/2025/12/15/code-mode-mcp" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADD THE WORDS CODE MODE ON HERE..BIG LETTERS ..or share the canva file with me so i can edit. this is one we want people to click a ton 🔥 thank you for writing this!!!