Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Clarify CodeMode execution context (#5458)

Jeremiah Lowin61d82ac18bf1
diff --git a/docs/servers/transforms/code-mode.mdx b/docs/servers/transforms/code-mode.mdx
index 10fd8a2e1..3b3662ac0 100644
--- a/docs/servers/transforms/code-mode.mdx
+++ b/docs/servers/transforms/code-mode.mdx
@@ -290,6 +290,8 @@ mcp = FastMCP("Server", transforms=[code_mode])
## Sandbox Configuration
+The sandbox controls the Python environment used by the code submitted to `execute`. Calls to `call_tool()` dispatch registered tools through FastMCP in the current request context, with the same authorization checks as a normal tool call. Those tool functions run in the server environment and retain their configured access to files, networks, and other resources.
+
### Resource Limits
The default `MontySandboxProvider` enforces execution limits β€” timeouts, memory caps, recursion depth, and more.