E2B MCP Tools for AI Agents
Let an agent run code in a sandbox, return the output, and generate static matplotlib charts from provided Python code.
Available Tools
2 tools available in this integration
E2b.CreateStaticMatplotlibChart Run the provided Python code to generate a static matplotlib chart.
E2b.RunCode Run code in a sandbox and return the output.
Why agent-optimized tools matter
Built for intent, not API schemas
Ask the agent to "run this analysis, check the output, and turn the result into a chart." Arcade helps it use the right E2B actions without piecing together sandbox setup or chart-generation calls.
Up to 100x fewer tokens
E2B execution returns the code's output directly, so the agent can inspect a result without loading an unrelated project or session into context. That keeps analysis focused on the logs, values, and errors it needs.
Complete the workflow end to end
Prepare the code, run it in an isolated sandbox, inspect the output, generate a static chart, and return the findings through one toolkit designed around the complete code-execution task.
Make actions predictable and controlled
Arcade tools return structured results and useful errors across users and runs. Teams can apply scope restrictions, redaction, and approval policies so agents follow the same controls every time.
Securing E2B
The more capabilities agents get, the more useful they are. However, more capabilities bring more risks of undesired effects such as data loss and exfiltration.
This is why Arcade provides you with contextual rules that dictate how and when a tool is allowed to run. Arcade’s contextual access lets you govern tool visibility and behavior at every stage of execution and control who can see a tool, what inputs are allowed, and what comes back.
Learn about Contextual Access PoliciesFor E2B, you can implement some of these policies:
- Hide E2b.CreateStaticMatplotlibChart from agents without the roles your IDP marks as data-visualization operators, so unapproved code cannot run in your sandbox.
- Require human approval before E2b.CreateStaticMatplotlibChart runs, so an agent cannot execute unreviewed Python code or consume sandbox resources.
- Filter what comes back before the model reads it, so sensitive fields never reach the context window.
How to use E2B with your agent
Connect E2B to your MCP client and follow the setup from authentication to your first sandbox run. Configure the shared API key once, then let your agent call both actions through Arcade.
Your questions, answered
An E2B MCP server exposes sandbox code execution as structured tools that an AI agent can call through the Model Context Protocol. With Arcade's integration, an agent can run code and generate static matplotlib charts in E2B sandboxes.
E2B does not need to provide a separate MCP server for this integration: Arcade provides the MCP endpoint and runtime around E2B code execution. Arcade handles the shared credential, approval policies, redaction, and access from supported clients.
Arcade agents can run code in an E2B sandbox and receive its output. They can also run Python code to generate a static matplotlib chart.
Arcade uses one shared E2B API key or secret configured for the integration. The key determines which E2B resources and execution capacity are available; this integration does not use per-user OAuth scopes.
No. A shared E2B API key or secret is configured once for the integration, rather than having each user connect an individual E2B account. Arcade brokers the credential, and the model does not receive it.
Yes. Contextual Access policies can require human approval before running code or generating a chart, especially when the code can change data, access sensitive resources, or incur external side effects. The call proceeds only after the policy's conditions have been satisfied.
Arcade proxies E2B API calls and does not persist your code or execution content as part of normal tool execution. The E2B credential is brokered and stored encrypted at rest, and the model never receives it.
Any framework or client that can connect to Arcade's MCP gateway or tool APIs works, including LangChain, OpenAI Agents, CrewAI, Claude Desktop, Claude Code, Cursor, Visual Studio Code, Microsoft Copilot Studio, and GitHub Copilot.
Arcade can use the shared E2B credential while it remains valid. If the key is revoked, rotated, or can no longer be used, code execution stops until the credential is updated or reconnected.
E2B's sandbox, execution, account, and API limits still apply to calls made through Arcade. Specific limits can vary by E2B plan and execution environment; Arcade does not remove those provider-side quotas.