Skip to main content
Glama

E2B MCP Server

E2B Sandbox API를 Model Context Protocol 도구로 노출하는 MCP 서버입니다.

기능

이 서버는 현재 다음을 위한 도구를 제공합니다:

  • Sandboxes — 생성, 목록 조회, 연결, 일시 중지, 삭제, 타임아웃 관리, 새로 고침, 로그 조회

  • Templates — 생성, 목록 조회, 검사, 업데이트, 삭제, 빌드 시작, 빌드 상태 조회, 빌드 로그 조회

  • Filesystem — 디렉터리 목록 조회, 디렉터리 생성, 파일 이동 및 삭제, 파일 메타데이터 검사, 파일 읽기, 파일 업로드, 파일 감시자 관리

  • Processes — 명령 실행, 프로세스 목록 조회, 시그널 전송, stdin과 상호 작용, PTY 크기 조정

더 이상 사용되지 않는 E2B API 엔드포인트와 스냅샷 관련 기능은 프로젝트에서 제거되었습니다.

Related MCP server: code-sandbox-mcp

요구 사항

  • Node.js 22 이상

  • E2B API 키

설치

npm ci

구성

환경에 E2B API 키를 설정하세요:

export E2B_API_KEY="your-api-key"

사용법

다음 명령으로 서버를 시작하세요:

npm start

이 서버는 stdio를 통한 MCP 서버로 사용되도록 설계되었습니다. stdio 서버를 지원하는 모든 MCP 호환 클라이언트에 연결할 수 있습니다.

Docker

이미지를 빌드하세요:

docker build -t e2b-mcp-server .

실행하세요:

docker run --rm -i \
  -e E2B_API_KEY="$E2B_API_KEY" \
  e2b-mcp-server

개발

모든 소스 파일의 JavaScript 구문을 확인하세요:

for f in src/*.js; do node --check "$f"; done

스모크 테스트를 실행하세요:

npm run smoke

프로젝트 구조

src/
├── http.js
├── index.js
├── tools-common.js
├── tools-filesystem.js
├── tools-process.js
├── tools-sandboxes.js
└── tools-templates.js

라이선스

ISC

Available Tools

23 tools
e2b_close_stdinB

Close stdin (send EOF) for a non-PTY process running in a sandbox, selected by pid or tag.

Inputs: sandboxId (required), pid, tag, port, +2 more.

e2b_connect_sandboxB

Connect to a sandbox. If paused, resumes it and returns fresh sandbox details.

Inputs: timeout (required), sandboxId (required).

e2b_create_sandboxD

Create a sandbox from a template.

Inputs: templateId (required), secure, envVars, timeout, +5 more.

e2b_delete_sandboxC

Kill/delete a sandbox permanently.

Inputs: sandboxId (required).

e2b_get_sandbox_logsC

Get structured logs for a sandbox (v2 endpoint), with pagination/filtering.

Inputs: sandboxId (required), level, limit, cursor, +2 more.

e2b_get_templateD

Get a template and its builds.

Inputs: templateId (required), limit, nextToken.

e2b_get_template_by_aliasB

Check whether a template with the given alias/name exists and get its id.

Inputs: alias (required).

e2b_list_dirC

List the contents of a directory in a sandbox.

Inputs: path (required), sandboxId (required), port, depth, +2 more.

e2b_list_processesB

List running processes started via envd in a sandbox.

Inputs: sandboxId (required), port, username, accessToken.

e2b_list_sandboxes_v2C

List sandboxes (v2).

Inputs: metadata.

e2b_make_dirC

Create a directory in a sandbox (including parent directories).

Inputs: path (required), sandboxId (required), port, username, +1 more.

e2b_moveB

Move or rename a file/directory in a sandbox.

Inputs: source (required), sandboxId (required), destination (required), port, +2 more.

e2b_pause_sandboxB

Pause a running sandbox so it can be resumed later.

Inputs: sandboxId (required), memory.

e2b_read_fileC

Read a file from a sandbox. Returns its content as UTF-8 text or base64.

Inputs: path (required), sandboxId (required), port, encoding, +2 more.

e2b_refresh_sandboxB

Refresh a sandbox, extending its time to live.

Inputs: sandboxId (required), duration.

e2b_removeC

Remove a file or directory in a sandbox.

Inputs: path (required), sandboxId (required), port, username, +1 more.

e2b_resize_ptyB

Resize the PTY of a running process (cols/rows), selected by pid or tag. Note: shape inferred from process.PTY.Size; verify against E2B docs (api-reference/process/update) if it errors.

Inputs: cols (required), rows (required), sandboxId (required), pid, +4 more.

e2b_run_commandB

Run a command in a sandbox and wait (up to timeoutMs) for it to finish, returning collected stdout/stderr/exit status. Uses the streaming process.Process/Start RPC under the hood.

Inputs: cmd (required), sandboxId (required), cwd, args, +5 more.

e2b_send_signalA

Send SIGTERM or SIGKILL to a process running in a sandbox, selected by pid or tag.

Inputs: signal (required), sandboxId (required), pid, tag, +3 more.

e2b_send_stdinA

Send input to the stdin of a running process, selected by pid or tag. Note: field names are inferred from the related Start/SendSignal schemas; if this errors, check the E2B docs for the exact process.Process/SendInput request shape.

Inputs: input (required), sandboxId (required), pid, tag, +3 more.

e2b_set_sandbox_timeoutA

Set the sandbox timeout: it will expire N seconds from now. Overwrites any previous TTL.

Inputs: timeout (required), sandboxId (required).

e2b_statB

Get metadata (type, size, permissions, owner, mtime...) about a file or directory in a sandbox.

Inputs: path (required), sandboxId (required), port, username, +1 more.

e2b_upload_fileA

Upload/write a file into a sandbox, creating parent directories as needed. Overwrites if it already exists.

Inputs: path (required), content (required), sandboxId (required), port, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools clearly target distinct resources and actions, but a few overlap: refresh_sandbox and set_sandbox_timeout both adjust TTL, and get_template vs get_template_by_alias are similar. Overall, the purposes are still largely separable.

    Naming Consistency4/5

    All tools share the e2b_ prefix and snake_case verb_noun structure, making the set predictable. Minor deviations include list_sandboxes_v2 vs get_sandbox_logs, and make_dir vs create_sandbox, but these do not seriously harm usability.

    Tool Count3/5

    23 tools is on the heavy side and spans sandboxes, templates, filesystems, and process control. The count is defensible given the breadth, but it starts to feel large for an agent to scan.

    Completeness4/5

    Sandbox lifecycle, filesystem, and process interaction are well covered. The main gap is template management: only get operations exist, with no create/update/delete template tools, though this may be intentionally outside the server's scope.

    Related MCP Connectors

    Related MCP Servers