E2B Code Sandbox MCP Server Configuration & Usage Guide

📦
Installationnpx
⚠️
Risk LevelMedium Risk
🔑
API KeyRequired
💻
Clients3 supported

E2B 安全云端代码执行沙箱,在隔离环境中运行代码片段

Medium Risk Category: File & Local System Verified: 2026-05-18 状态:部分核验

Supported Clients

Installation Command

npx -y @e2b/mcp-server

Configuration Example

{
  "mcpServers": {
    "e2b": {
      "command": "npx",
      "args": [
        "-y",
        "@e2b/mcp-server"
      ],
      "env": {
        "E2B_API_KEY": "<your-e2b-api-key>"
      }
    }
  }
}

Environment variable required:E2B_API_KEY。Do not commit these values to public repositories.

Permission Scope & Security Notes

代码在 E2B 云端沙箱中执行,与本地系统隔离,相对安全但Required API Key

Risk Score:4/10

Common Errors

API Key 无效
在 e2b.dev 注册并在 Dashboard 中获取 API Key
沙箱超时
免费版沙箱有时间限制,代码执行时间不要过长

Sources

Recently Verified:2026-05-18。Client versions and configuration formats may change. Please refer to official documentation before use.

Related Tools