Skip to main content
Glama

E2B 샌드박스 MCP 서버

npm version license

Claude Code를 E2B 클라우드 샌드박스와 연결하는 MCP(Model Context Protocol) 서버입니다. 로컬 머신을 건드리지 않고도 모든 GitHub 저장소에서 작업할 수 있는 격리된 Linux VM을 제공합니다.

주요 기능

이 서버는 Claude Code에 클라우드 샌드박스 생성, 저장소 복제, 명령어 실행, 파일 관리 및 git 작업 수행을 위한 29가지 도구를 제공하며, 이 모든 작업은 안전하고 일회성인 Linux 환경에서 이루어집니다.

로컬 머신은 전혀 변경되지 않습니다. 모든 작업은 E2B 샌드박스 VM 내부에서 발생합니다.

Related MCP server: codex-cli-mcp-tool

토큰 절약

로컬 Bash 대신 E2B 샌드박스를 통해 명령어를 실행하면 대화당 소비되는 토큰이 줄어듭니다. 도구 출력은 구조화되고 잘리므로(스트림당 100KB, 총 200KB), 대규모 빌드/테스트 출력이 컨텍스트 창을 가득 채우지 않습니다.

프로젝트 규모

예시

로컬 Bash 토큰

E2B 샌드박스 토큰

절약률

소규모

Express API, 약 10개 파일

~15K-25K

~10K-18K

~20-30%

중규모

Next.js 앱, 50-100개 파일

~50K-100K

~25K-45K

~40-55%

대규모

모노레포, 500개 이상 파일

~200K-500K+

~60K-120K

~60-75%

확장성 이유: 모노레포에서 로컬 npm install을 실행하면 1만 줄 이상의 로그가 컨텍스트에 쌓일 수 있습니다. 전체 테스트 스위트는 수천 줄을 더 추가합니다. E2B를 사용하면 이러한 출력은 제한되고 구조화됩니다. 백그라운드 프로세스(sandbox_exec_background)는 프로세스 ID만 반환하므로 스트리밍 출력이 전혀 없습니다. 디렉토리 목록은 1000개 항목으로 제한됩니다. 결과적으로 터미널 노이즈에 컨텍스트 창을 낭비하지 않고 실제 작업에 집중할 수 있습니다.

사용 사례

모든 GitHub 저장소 원격 작업

저장소를 샌드박스로 복제하고, 빌드 및 테스트 스위트를 실행하고, 변경 사항을 적용하고, 푸시하세요. 프로젝트를 로컬에 설치할 필요가 없습니다.

You: "Clone github.com/fastify/fastify, run the tests, and find why test X fails"

Claude Code:
  → sandbox_create
  → sandbox_git_clone "https://github.com/fastify/fastify"
  → sandbox_exec "npm install"
  → sandbox_exec "npm test"
  → sandbox_file_read (inspect failing test)
  → sandbox_file_write (apply fix)
  → sandbox_exec "npm test" (verify)

안전한 실험

의존성 업그레이드, 대규모 리팩토링, 마이그레이션 스크립트 등 위험한 변경 사항을 일회성 환경에서 시도해 보세요. 문제가 발생하면 sandbox_kill로 삭제하고 새로 시작하면 됩니다.

지속적인 개발 세션

작업을 마칠 때 샌드박스를 일시 중지하고, 다음 날 모든 파일과 상태를 그대로 유지한 채 다시 시작하세요. 환경을 처음부터 다시 구축할 필요가 없습니다.

You: "Pause this sandbox, I'll continue tomorrow"

Claude Code:
  → sandbox_pause (saves state)

Next day:
  → sandbox_resume (picks up where you left off)

개발 서버 미리보기

샌드박스에서 웹 앱을 시작하고 공개 URL을 받아 브라우저에서 미리 보세요. 포트 포워딩이나 터널링이 필요 없습니다.

You: "Start the dev server and give me a URL to preview it"

Claude Code:
  → sandbox_exec_background "npm run dev"
  → sandbox_get_url 3000
  → Returns: https://abc123-3000.e2b.dev

다중 저장소 병렬 작업

여러 샌드박스를 실행하여 서로 다른 저장소를 복제하고 동시에 작업하세요. 각 샌드박스는 완전히 격리되어 있습니다.

CI와 유사한 깔끔한 테스트

전체 테스트 스위트를 깨끗한 Linux 환경에서 실행하세요. CI에 푸시하기 전에 "내 컴퓨터에서는 잘 되는데" 문제를 미리 파악하세요.

오픈 소스 기여

저장소를 포크하고 샌드박스에서 복제하여 변경 사항을 만들고 커밋한 뒤 포크한 저장소로 푸시하세요. 로컬 프로젝트 설정이 전혀 필요 없습니다.

라이브 환경에서의 코드 리뷰

PR 브랜치를 샌드박스로 복제하여 테스트를 실행하고, 변경 사항을 검사하고, 동작을 확인하세요. 브랜치를 로컬로 체크아웃할 필요가 없습니다.

시작하기

사전 요구 사항

1. Claude Code에 등록

별도의 설치가 필요 없습니다. npx를 사용하여 Claude Code에 npm 패키지를 지정하세요:

claude mcp add e2b-sandbox -s user \
  -e E2B_API_KEY=your-e2b-api-key \
  -e GITHUB_TOKEN=your-github-token \
  -- npx -y e2b-sandbox-mcp

서버를 추가한 후 Claude Code를 다시 시작하세요.

npx 대신 전역 설치를 선호하는 경우:

npm install -g e2b-sandbox-mcp

claude mcp add e2b-sandbox -s user \
  -e E2B_API_KEY=your-e2b-api-key \
  -e GITHUB_TOKEN=your-github-token \
  -- e2b-sandbox-mcp

2. 사용 방법

Claude Code를 시작하고 저장소에서 작업하도록 요청하세요:

"샌드박스를 만들고 https://github.com/expressjs/express를 복제한 다음 테스트 스위트를 실행해 줘"

Claude Code가 자동으로 MCP 도구를 호출합니다.

사용 가능한 도구

샌드박스 수명 주기

도구

설명

sandbox_create

새로운 클라우드 샌드박스(Linux VM) 생성

sandbox_list

활성 샌드박스 목록 조회

sandbox_info

특정 샌드박스 정보 조회

sandbox_kill

샌드박스 종료 및 삭제

sandbox_keep_alive

샌드박스 타임아웃 연장

sandbox_pause

샌드박스 일시 중지 (상태 보존)

sandbox_resume

일시 중지된 샌드박스 재개

네트워킹 및 파일 전송

도구

설명

sandbox_get_url

포트에 대한 공개 URL 획득 (브라우저에서 개발 서버 미리보기)

sandbox_upload_url

샌드박스에 파일을 업로드하기 위한 사전 서명된 URL 획득

sandbox_download_url

샌드박스에서 파일을 다운로드하기 위한 사전 서명된 URL 획득

명령어 실행

도구

설명

sandbox_exec

셸 명령어 실행 및 stdout/stderr/종료 코드 획득

sandbox_exec_background

백그라운드 프로세스 시작 (개발 서버, 감시자 등)

sandbox_process_list

실행 중인 모든 프로세스 및 PID 목록 조회

sandbox_process_kill

PID를 사용하여 실행 중인 프로세스 종료

파일 작업

도구

설명

sandbox_file_read

파일 내용 읽기

sandbox_file_write

파일 쓰기/생성

sandbox_file_list

디렉토리 내용 목록 조회

sandbox_file_mkdir

디렉토리 생성

sandbox_file_remove

파일 또는 디렉토리 삭제

sandbox_file_info

파일 메타데이터 조회 (크기, 유형, 권한)

sandbox_file_exists

파일 또는 디렉토리 존재 여부 확인

sandbox_file_rename

파일 또는 디렉토리 이름 변경/이동

Git 작업

도구

설명

sandbox_git_clone

저장소 복제 (GITHUB_TOKEN을 통한 비공개 저장소 지원)

sandbox_git_status

작업 트리 상태 조회

sandbox_git_commit

파일 스테이징 및 커밋

sandbox_git_push

원격 저장소로 커밋 푸시

sandbox_git_pull

원격 저장소에서 최신 변경 사항 가져오기

sandbox_git_branch

브랜치 목록 조회, 생성 또는 전환

sandbox_git_init

새로운 git 저장소 초기화

환경 변수

변수

필수

설명

E2B_API_KEY

예

e2b.dev/dashboard에서 발급받은 E2B API 키

GITHUB_TOKEN

아니오

비공개 저장소 접근 및 git push를 위한 GitHub 개인 액세스 토큰

아키텍처

src/
├── index.ts                  # MCP server entry point (stdio transport)
├── types.ts                  # Shared types and error helpers
├── services/
│   └── sandbox-manager.ts    # Sandbox registry (tracks active VMs)
└── tools/
    ├── sandbox.ts            # Lifecycle tools
    ├── commands.ts           # Command execution tools
    ├── filesystem.ts         # File operation tools
    └── git.ts                # Git operation tools

이 서버는 활성 샌드박스 인스턴스 레지스트리를 관리합니다. 각 도구는 ID로 샌드박스를 참조하므로 여러 격리된 환경에서 동시에 작업할 수 있습니다.

중요 참고 사항

  • 샌드박스는 실제 VM입니다. 명령어는 E2B 클라우드의 실제 Linux 머신에서 실행됩니다.

  • Git push는 실제입니다. 샌드박스에서 푸시하면 실제 원격 저장소에 반영됩니다.

  • 샌드박스는 자동 만료됩니다. 기본 타임아웃은 5분입니다. sandbox_keep_alive를 사용하여 연장하세요.

  • E2B 사용 비용이 발생합니다. E2B 요금제를 확인하세요. 무료 티어가 제공됩니다.

  • 샌드박스는 로컬 머신과 격리되어 있지만, 인터넷과는 격리되어 있지 않습니다. 네트워크 요청, git 푸시, npm 배포는 모두 실제 작업입니다.

라이선스

MIT

Available Tools

29 tools
sandbox_createA

Create a new E2B cloud sandbox (secure Linux VM). Returns a sandboxId to use with other tools.

Inputs: templateId, timeoutMs, metadata.

sandbox_download_urlA

Get a presigned URL to download a file from the sandbox. Use this to retrieve build artifacts, logs, or any file from the sandbox.

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

sandbox_execA

Execute a shell command in a sandbox and return stdout, stderr, and exit code. Use for running builds, tests, installs, or any CLI command.

Inputs: sandboxId (required), command (required), cwd, timeoutMs, +1 more.

sandbox_exec_backgroundA

Start a background process in a sandbox (e.g., dev server, file watcher). Returns immediately without waiting for completion.

Inputs: sandboxId (required), command (required), cwd, envs.

sandbox_file_existsA

Check if a file or directory exists in a sandbox. Returns true/false without throwing an error if not found.

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

sandbox_file_infoA

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

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

sandbox_file_listC

List files and directories in a sandbox path.

Inputs: sandboxId (required), path.

sandbox_file_mkdirB

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

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

sandbox_file_readB

Read the contents of a file in a sandbox.

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

sandbox_file_removeC

Delete a file or directory in a sandbox.

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

sandbox_file_renameC

Rename or move a file or directory in a sandbox.

Inputs: sandboxId (required), oldPath (required), newPath (required).

sandbox_file_writeA

Write content to a file in a sandbox. Creates parent directories automatically. Overwrites if file exists.

Inputs: sandboxId (required), path (required), content (required).

sandbox_get_urlA

Get the public URL for a port running inside a sandbox. Use this to access dev servers, web apps, or any HTTP service running in the sandbox from a browser.

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

sandbox_git_branchB

Manage git branches: list, create, or switch branches in a sandbox repository.

Inputs: sandboxId (required), repoPath (required), action (required), branchName.

sandbox_git_cloneA

Clone a GitHub repository into a sandbox. Supports private repos when GITHUB_TOKEN is configured.

Inputs: sandboxId (required), repoUrl (required), path, branch, +1 more.

sandbox_git_commitB

Stage files and create a git commit in a sandbox repository.

Inputs: sandboxId (required), repoPath (required), message (required), files, +2 more.

sandbox_git_initB

Initialize a new git repository in a sandbox directory.

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

sandbox_git_pullC

Pull latest changes from a remote repository in a sandbox.

Inputs: sandboxId (required), repoPath (required), remote, branch.

sandbox_git_pushA

Push commits to a remote repository. Requires GITHUB_TOKEN for authentication.

Inputs: sandboxId (required), repoPath (required), remote, branch, +1 more.

sandbox_git_statusA

Get the git status of a repository in a sandbox (current branch, modified/staged/untracked files).

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

sandbox_infoC

Get details about a specific sandbox.

Inputs: sandboxId (required).

sandbox_keep_aliveA

Extend a sandbox timeout to prevent it from being automatically terminated.

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

sandbox_killA

Terminate and clean up a sandbox. The sandbox and all its data will be destroyed.

Inputs: sandboxId (required).

sandbox_listA

List all active E2B sandboxes managed by this server.

Inputs: no named parameters.

sandbox_pauseA

Pause a sandbox to preserve its state. The sandbox can be resumed later with sandbox_resume using the same sandbox ID. Paused sandboxes persist across sessions and do not count against timeout.

Inputs: sandboxId (required).

sandbox_process_killA

Kill a running process in a sandbox by its PID. Use sandbox_process_list to find the PID.

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

sandbox_process_listA

List all running processes (commands and PTY sessions) in a sandbox. Shows PID, command, and arguments for each process.

Inputs: sandboxId (required).

sandbox_resumeA

Resume a previously paused sandbox. Reconnects to the sandbox and restores its state including filesystem and running processes.

Inputs: sandboxId (required), timeoutMs.

sandbox_upload_urlA

Get a presigned URL to upload a file to the sandbox. Send a POST request with the file as multipart/form-data to the returned URL.

Inputs: sandboxId (required), path.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 29 tools

    Disambiguation5/5

    Each tool targets a distinct operation on sandboxes (create, exec, file ops, git, lifecycle management, process control). No overlapping purposes; even similar operations like sandbox_exec vs sandbox_exec_background are clearly differentiated by synchronous vs background execution.

    Naming Consistency5/5

    All tools follow the consistent pattern of `sandbox_<action>`, using snake_case. Actions are clear verbs (create, exec, list, kill, etc.). This provides a predictable and intuitive naming scheme.

    Tool Count4/5

    29 tools is on the higher side but justified by the broad scope of sandbox management (execution, file system, git, process management, lifecycle). The count is reasonable for a comprehensive server, though could be slightly trimmed by merging some rare operations.

    Completeness5/5

    The tool set covers the full lifecycle of sandboxes: create, list, info, keep-alive, pause/resume, kill. It includes file operations (CRUD), execution (command + background), process management, git operations (init, clone, branch, status, commit, pull, push), and utilities like download/upload URLs. No obvious gaps for typical sandbox usage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server that spawns autonomous Claude Code agents in GitHub repos, enabling task delegation with persistent state, multi-step workflows, and job monitoring.
      47
      161 npm
      2
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that gives Claude live access to your GitHub workspace — PR reviews, issue triaging, repo search, and weekly digest reports through natural language.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A self-hosted MCP server that gives Claude access to your GitHub account — read files, browse repos, commit changes, and manage issues and pull requests, all from a conversation.
      330 npm
      ISC