Learning resourcesReviewed · E2B

E2B Custom MCP Server Guide

E2B’s custom server guide helps developers run custom tool servers in a sandbox, but its documented setup requires a public GitHub repository. It covers MCP over standard input/output, TypeScript and Python configuration, and command settings that determine whether server tools become available.

Researched 15 Nov 2026

In short.

E2B’s custom server guide helps developers run custom tool servers in a sandbox, but its documented setup requires a public GitHub repository. The gateway clones the repository, optionally installs dependencies and starts an MCP server using standard input/output. A consequential caveat is that Python configuration requires the camelCase keys installCmd and runCmd despite conflicting SDK type hints. Pricing and licensing are unknown from this page. No installation, server startup or tool call was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete Custom servers page at [https://docs.e2b.dev/mcp-gateway/custom-servers.md], including both SDK examples, the Python command-key caveat, the npx installation notice and troubleshooting instructions. The linked documentation index, MCP specification, GitHub repository, Docker catalog, console and other linked pages are excluded. No code, installation, sandbox session, server startup or tool call was executed. Pricing and licensing remain unknown; runtime behavior and security properties were not assessed.

The overview

Identity

Custom servers is an E2B documentation guide for configuring custom Model Context Protocol (MCP) servers through its MCP gateway. The source is [https://docs.e2b.dev/mcp-gateway/custom-servers.md]. It provides TypeScript and Python examples for starting a server from a public GitHub repository.

Assessment

The guide provides a concrete configuration pattern and explains two failure points: incorrect Python command keys and missing dependency installation for npx-based servers. This makes it useful for implementing or troubleshooting this specific integration. It does not establish successful execution, reliability or suitability for a production workload.

Users

The examples suit developers configuring an E2B sandbox who need an MCP server from a public repository. Beginners will need familiarity with SDK code, dependency installation and shell commands. Experienced developers get precise configuration details, particularly the mismatch between Python type hints and the gateway’s accepted keys.

Capabilities

The documented feature accepts a public GitHub repository identifier, an optional dependency-installation command and a required server-start command. It supports custom MCP servers alongside the pre-built servers mentioned in the guide. The page also identifies a gateway log for investigating failures.

Using it

Requirements

The documented path requires an E2B sandbox, the E2B SDK configuration shown for TypeScript or Python, a public GitHub repository and a runCmd that starts an MCP server using stdio. Stdio means the server communicates through its standard input and output streams.

The guide links the MCP specification dated 2025-06-18 [https://modelcontextprotocol.io/specification/2025-06-18]. Account setup, authentication, supported SDK versions and minimum sandbox resources are not specified.

Mechanism

When a repository is specified, E2B clones it into the sandbox, runs installCmd if supplied and then runs runCmd to start the server. The gateway reads these command names directly from the supplied configuration.

In Python, the SDK passes the mcp dictionary through unchanged. According to the guide, using install_cmd and run_cmd leaves the gateway without a recognized run command, so it skips the server and its tools are unavailable.

Setup

Pass an mcp mapping to Sandbox.create, with the repository identifier as its key. Supply runCmd and, where dependencies need installation, installCmd. Use these exact camelCase names in both TypeScript and Python.

Although installCmd is generally optional, the guide specifically requires npm install or an equivalent installation step when runCmd uses npx. It warns that otherwise npx tries to use the local repository and fails.

Example

Both supplied examples configure github/modelcontextprotocol/servers with installCmd set to npm install and runCmd set to sudo npx -y @modelcontextprotocol/server-filesystem /root. The TypeScript example imports Sandbox from e2b; the Python example imports Sandbox from the e2b package.

The example passes /root to the filesystem server. The page does not demonstrate a client discovering its tools, making a filesystem request or receiving a result. These commands were not executed.

Assessment & evidence

Limitations

The documented route covers public GitHub repositories and stdio servers. Private repositories, other transports, server authentication and environment-variable configuration are not explained on this page.

The examples specify no repository commit or package version, so version-specific reproducibility is not established. Startup latency, resource consumption, security properties and successful tool use were not assessed.

Reasoning

The documented mechanism suggests this approach fits a server that can be installed from a public repository and launched with a shell command using stdio. Its usefulness depends on those commands matching the repository’s actual requirements. A server needing private source access or a different transport cannot be evaluated from this guide alone.

Alternatives

The guide points to pre-built servers from the Docker MCP Catalog [https://hub.docker.com/mcp] as an alternative to supplying a custom GitHub repository. It does not compare individual catalog servers, configuration effort, capabilities or costs.

Evidence

The documentation supplies a three-step startup mechanism, two SDK examples, command-field definitions, a Python naming caveat, an npx installation warning and troubleshooting instructions. These support the configuration explanation, but the page contains no execution transcript, benchmark or demonstrated tool response.

Access & freshness

Costs

The page provides no prices, free allowances, billing units or usage limits. E2B sandbox charges and any charges associated with a chosen server or its dependencies are unknown from this evidence.

Rights

The page supplies no license or redistribution terms for the documentation, example repository, server package or dependencies. Public GitHub availability does not establish permission to reuse or redistribute those materials. Applicable licenses and service terms need separate confirmation.

Freshness

The documentation snapshot was captured on 15 November 2026. The page gives no publication date, last-update date, E2B SDK version or repository commit. Its link to a dated MCP specification does not establish when the page was updated or compatibility with later protocol revisions.

Actions

Before adopting the configuration, confirm that the chosen repository provides a stdio MCP server and determine its installation and startup commands. Keep installCmd and runCmd in camelCase, including in Python, and include dependency installation for npx-based startup.

For troubleshooting, the guide directs developers to the E2B console [https://console.e2b.dev/sign-in?signup_source=docs_console] or e2b connect <sandbox-id>, then to the gateway log using sudo cat /var/log/mcp-gateway/gateway.log. Confirm current pricing, applicable licenses and version compatibility separately.

Evidence for this report

selected-page.txtselected · checked 2026-11-15