#1899·E2B

Python SDK/docs spell custom MCP server keys install_cmd/run_cmd but the gateway only accepts installCmd/runCmd

Author: aimable100Created Sep 26, 2026Updated Sep 27, 2026
LabelsbugdocssdkMCP Server

Summary: the Python SDK's type hints and the docs spell the custom MCP server config keys install_cmd / run_cmd, but the sandbox's mcp-gateway only recognizes installCmd / runCmd. The SDK passes the dict through verbatim, so the documented Python form is silently ignored and the server never starts.

Versions: e2b 2.50.0 (Python), mcp-gateway template on 2026-09-19.

Repro

python
from e2b import AsyncSandbox

sbx = await AsyncSandbox.create(
    mcp={
        "github/tenuo-ai/tenuo-demos": {
            "install_cmd": "echo hi > /tmp/installed.txt",
            "run_cmd": "cat",
        }
    }
)

Inside the sandbox, /var/log/mcp-gateway/gateway.log:

{"level":"warn","caller":"gateway/tools.go:81","msg":"GitHub server missing run command","component":"TOOLS","server":"github/tenuo-ai/tenuo-demos"}

/tmp/installed.txt is never created and tools/list does not include the server. With the same dict spelled installCmd / runCmd, the gateway clones the repo, runs the install command, and advertises the tool as github/tenuo-ai/tenuo-demos-<tool>.

Where the snake_case spelling comes from

  • e2b/sandbox/sandbox_api.py: GitHubMcpServerConfig declares run_cmd: str and install_cmd: NotRequired[str].
  • Docs, "Custom MCP servers" page, Python example: "install_cmd": "npm install", "run_cmd": "sudo npx ...".

The SDK starts the gateway with mcp-gateway --config <json.dumps(mcp)> (see Sandbox.create), i.e. the keys reach the gateway exactly as typed.

Suggested fix (either):

  1. Have the SDK map install_cmd → installCmd and run_cmd → runCmd before serializing, the way other snake_case fields are mapped to wire names; or
  2. Change the type hints and the Python docs to the camelCase keys the gateway accepts.

Option 1 keeps the documented Python form working. A gateway-side warning that names the offending key would also have made this a two-minute find instead of a log dive.