GS

ghostwriternr/sandbox-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

24 stars 6 forks 품질 69 트렌드 10MIT

Sandboxes에서 OpenCode를 실행하는 먼 MCP

개요

MCP 서버는 AI 조수가 복잡하고 긴 실행 코딩 작업을 해준다. OpenCode는 보안 Cloudflare Sandboxes에서 실행됩니다. 모바일 또는 짧은 세션에서 AI 조수를 사용할 때, 당신은 할 수 없습니다: - Clone 저장소 및 멀티 파일 코드 변경을 만들 - 실행 테스트, 빌드, 및 풀 요청 생성 - 긴 실행 작업을 실행 (분에서 시간) - 차단을 통해 상태를 유지 - 코딩 작업을 시작, 나중에 다시 확인 - 세션은 분리 및 장치 스위치를 생존 - 웹 UI 또는 결과에 대한 poll를 통해 진행 상황을 모니터링 - OpenCode는 복잡성을 자율적으로 처리 기본적으로 이 서버는 Anthropic을 AI 공급자로 사용합니다. 다른 공급자 (OpenAI, Azure, Google 등)를 사용하려면 공급자를 사용자 정의하십시오. - Workers, R2 및 Container를 사용한 Cloudflare 계정 - Anthropic API 키 - GitHub 토큰 (git 작업용) 이 서버를 MCP 클라이언트 구성에 추가합니다. Claude 데스크탑을 위해: 연결되면 AI Assistant는 이러한 도구에 액세스합니다

개요(AI 번역)

MCP 서버는 AI 조수가 복잡하고 긴 실행 코딩 작업을 해준다. OpenCode는 보안 Cloudflare Sandboxes에서 실행됩니다.

왜?

모바일 또는 짧은 세션에서 AI 조수를 사용할 때, 당신은 할 수 없습니다:

  • Clone 저장소 및 다중 파일 코드 변경
  • Run test, build 및 Pull 요청 생성
  • 긴 실행 작업 (시간에 분)
  • 차단을 통한 상태 유지

이 MCP 서버는 ** Fire-and-forget 작업 위임**:

  • 코딩 작업을 시작, 나중에 다시 확인
  • 세션은 분리 및 장치 스위치를 생존
  • 웹 UI 또는 결과에 대한 설문 조사 진행
  • OpenCode는 복잡성을 자율적으로 취급합니다.

주: 기본적으로 이 서버는 Anthropic을 AI 공급자로 사용합니다. 다른 공급자 (OpenAI, Azure, Google 등)를 사용하려면 공급자를 사용자 정의하십시오.

Cloudflare에 배포

# 필수품

  • 작업자, R2, 용기가 있는 Cloudflare 계정
  • Anthropic API 키
  • GitHub 토큰 (git 작업용)

설정

  1. 복제 및 설치 :

  2. 비밀 설정:

  3. 배포:

# MCP 클라이언트 연결

이 서버를 MCP 클라이언트 구성에 추가합니다. Claude 데스크탑을 위해:

사용법

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

sandbox-mcp

An MCP server that enables AI assistants to delegate complex, long-running coding tasks to OpenCode running in secure Cloudflare Sandboxes.

Why?

When using AI assistants on mobile or in short sessions, you can’t:

  • Clone repositories and make multi-file code changes
  • Run tests, builds, and create pull requests
  • Execute long-running tasks (minutes to hours)
  • Maintain state across disconnections

This MCP server solves that with fire-and-forget task delegation:

  • Start a coding task, check back later
  • Sessions survive disconnections and device switches
  • Watch progress via web UI or poll for results
  • OpenCode handles the complexity autonomously

Note: By default, this server uses Anthropic as the AI provider. To use other providers (OpenAI, Azure, Google, etc.), see Customizing the Provider.

Deploy to Cloudflare

Prerequisites

Setup

  1. Clone and install:
git clone https://github.com/ghostwriternr/sandbox-mcp.git
cd sandbox-mcp
npm install
  1. Set up secrets:
wrangler secret put PROXY_JWT_SECRET    # Any random string for signing tokens
wrangler secret put ANTHROPIC_API_KEY   # sk-ant-xxx
wrangler secret put GITHUB_TOKEN        # ghp_xxx
  1. Deploy:
npm run deploy

Connect Your MCP Client

Add this server to your MCP client configuration. For Claude Desktop:

{
  "mcpServers": {
    "sandbox": {
      "url": "https://sandbox-mcp.you.workers.dev/mcp"
    }
  }
}

Usage

Once connected, your AI assistant has access to these tools:

opencode_run_task

Start a coding task. Returns immediately with a runId to check later.

{
  task: string,           // What you want done
  repository?: string,    // Git repo URL to clone
  branch?: string,        // Branch to checkout
  sessionId?: string,     // Continue existing session
}

opencode_get_result

Check the status and result of a task.

{
  runId: string           // The run ID from run_task
}

opencode_list_runs

List past task runs.

{
  sessionId?: string,     // Filter by session
  status?: string,        // Filter: started, running, completed, failed
  limit?: number,         // Max results (default 10)
}

Local Development

For local development and testing:

cp .dev.vars.example .dev.vars  # Then fill in your secrets
npm run dev                      # Start local server
npm run dev:inspect              # With MCP Inspector
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "sandbox": { "url": "https://sandbox-mcp.you.workers.dev/mcp" } } }