opencode-sandbox
opencode-sandbox
事前にビルドされた公開GHCRイメージから隔離されたopencodeインスタンスを立ち上げ、Claude CodeにMCPサーバーとして渡します。ビルド手順やopencodeフォークのチェックアウトは不要です。各インスタンスは独自のDocker Composeプロジェクトであり、独自の名前付きボリュームを持ち、そのワークスペースはホストバインドではなく名前付きボリュームであるため、ファイルシステムにアクセスできません。イメージは公開されており、匿名でプルされます。バックエンドはopencode 1.18.4を報告し、MCPブリッジは80のツールを公開します。
インストール
ソースからビルドし、バイナリをPATHに配置します:
bun run build
cp dist/opencode-sandbox ~/.local/bin/(bun run install-localで両方を1ステップで実行できます。)または、このリポジトリのGitHub Releasesから事前ビルドされたバイナリを入手します。
Related MCP server: Sandbox Agent
クイックスタート
インスタンスを作成します。シェルにすでにあるプロバイダAPIキー(ANTHROPIC_API_KEY、OPENAI_API_KEY、GOOGLE_GENERATIVE_AI_API_KEY、OPENROUTER_API_KEY)は、作成時にインスタンスに転送されます。UIログイン手順やauth.jsonの管理は不要です。
opencode-sandbox create scratch --seed ./my-project --config ./opencode.jsonc--seedは、インスタンスが最初に起動する前に、指定したディレクトリを新しいワークスペースにコピーします。--configは、そのインスタンス専用のopencode.jsoncを配置します。どちらもオプションです。
Claude Codeに登録します。createはこの行を出力し、urlは後で再度出力します:
opencode-sandbox url scratch
claude mcp add --transport http scratch http://127.0.0.1:4784/mcpこれで使用できます。インスタンスの80のツール(読み取り、書き込み、シェルコマンドの実行、すべて自身の/workspaceにスコープされます)がそのClaude Codeセッションで利用可能になります。終了したら:
opencode-sandbox destroy scratch --yesdestroyはコンテナとそのボリューム(ワークスペースを含む)を削除します。
Web UIも利用可能で、作成時に--webを指定すると有効になります。指定しない場合、MCPブリッジが唯一のインターフェースです。
セキュリティに関する注意
MCPブリッジには独自のインバウンド認証はありません。そのポートに到達できる人は誰でも、完全なopencodeツールサーフェス(そのインスタンスの/workspace内でのファイルの読み書きやシェルコマンドの実行)を利用できます。公開ポートはデフォルトで127.0.0.1にバインドされています。そのままにしておいてください。実際の認証レイヤーを前面に配置せずに、0.0.0.0に広げたり、公開リバースプロキシの背後に置いたりしないでください。
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP catalog with 30 tenant-isolated browser, RAG, AI, mail and media tools.
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
Create, deploy, and operate MCP servers directly from your GitHub repositories.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceRuns isolated AI agents in Docker containers with persistent workspaces and conversation history. Each agent has access to file operations, shell commands, GitHub integration, and can connect to external MCP servers for additional tools.3MIT
- AlicenseAqualityCmaintenanceEnables code execution in isolated Docker containers with persistent IPython, Node.js, or R kernels, supporting file import/export and cross-session transfers via MCP tools.6MIT
- FlicenseNot gradedqualityBmaintenanceContainerized MCP server for coding agents with tools for file editing, shell commands, process management, Git, browser automation, and project snapshots.-
- AlicenseAqualityCmaintenanceRun Python, JavaScript, or shell snippets in secure, resource-limited Docker containers with no network access, exposed as MCP tools.2Apache 2.0