Oct 6, 2025
MCP code execution tool

Max Murin
Software Engineer
A new code execution tool is now available for Stainless generated MCP servers. Instead of exposing one tool per API method, the server can now expose a single tool that accepts TypeScript code and executes it in a secure Deno sandbox against your generated SDK.
Code execution reduces context window usage and is often faster and more accurate than exposing dozens of discrete tools. The feature is currently supported for local MCP servers, with remote support coming soon.
Check out docs for more info.