Skip to main content
Glama
hsb3

opencode-sandbox

by hsb3

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: devcontainer-mcp

クイックスタート

インスタンスを作成します。シェルにすでにあるプロバイダAPIキー(ANTHROPIC_API_KEYOPENAI_API_KEYGOOGLE_GENERATIVE_AI_API_KEYOPENROUTER_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 --yes

destroyはコンテナとそのボリューム(ワークスペースを含む)を削除します。

Web UIも利用可能で、作成時に--webを指定すると有効になります。指定しない場合、MCPブリッジが唯一のインターフェースです。

セキュリティに関する注意

MCPブリッジには独自のインバウンド認証はありません。そのポートに到達できる人は誰でも、完全なopencodeツールサーフェス(そのインスタンスの/workspace内でのファイルの読み書きやシェルコマンドの実行)を利用できます。公開ポートはデフォルトで127.0.0.1にバインドされています。そのままにしておいてください。実際の認証レイヤーを前面に配置せずに、0.0.0.0に広げたり、公開リバースプロキシの背後に置いたりしないでください。

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    45+ first-class, OS and backend specific MCP tools that let AI coding agents create, manage, read, edit, and write files inside dev containers, keeping your machine clean and your environment reproducible and deploy-friendly. Use local Docker, GitHub Codespaces, Azure, AWS, Google Cloud or Kubernetes seamlessly!
    23
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    6
    MIT

View all related MCP servers

Related MCP Connectors

  • A MCP server built for developers enabling Git based project management with project and personal…

  • Hosted MCP server for structured code review passes on human- and AI-written code. Free tier.

  • An MCP server that gives your AI access to the source code and docs of all public github repos

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hsb3/opencode-sandbox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server