Sandbox MCP

Sandbox MCP は、LLM (MCP ホスト/クライアント)が安全で分離された Docker コンテナー内でコードを実行できるようにするモデル コンテキスト プロトコル (MCP) サーバーです。
LLMはコード生成に非常に優れていますが、そのほとんどは生成したコードを実行できません。そのため、テストされていないコードをマシン上で直接実行することになり、予期せぬ重大な結果を招く可能性があります。
LLM にコードを安全にテストするためのツールを提供することで、このような問題を防ぎ、より少ない反復でより正確なコードを生成できるようになります。
サンドボックス MCP は、ローカルで実行されるシンプルな AI ネイティブ MCP サーバーを通じて誰でも作成および構成できる、使いやすい実行環境をLLM に提供します。
Codapiに触発されました。一部のサンドボックスはCodapi サンドボックスと同じです。
ユースケース
サンドボックス MCP は、次のようなさまざまなタスクに使用できます (ただし、これらに限定されません)。
安全なコード実行: LLM によって生成されたコードを安全で分離された環境で実行し、信頼できないコードや潜在的に有害なコードからシステムを保護します。
コード テスト: 大規模なプロジェクトや実稼働システムにコードを統合する前に、さまざまな言語やさまざまな環境の構成でコードを自動的にテストおよび検証します。
ユーザー コードの検証: ユーザーが送信したコードまたはスクリプトを安全に実行およびチェックし、期待どおりに動作し、悪意のあるアクションを実行しないことを確認します。
ネットワークのトラブルシューティング: システムを公開することなく、分離されたネットワーク ツールを使用して接続の問題を診断し、エンドポイントをテストし、ネットワーク パフォーマンスを分析します。
教育および面接のコーディング: 学習、指導、または技術面接用のコード スニペットを即座にコンパイルして実行し、安全な一時的な環境で即時のフィードバックを提供します。
自動コードレビューとフィードバック: LLM がコードを自動的に実行、テスト、レビューできるようにし、コードがマージまたはデプロイされる前に実用的なフィードバックや提案を提供します。
Related MCP server: Code Sandbox MCP Server
デモ
このデモでは、Sandbox MCP が Claude Desktop でどのように動作するかを示します。

GIF が鮮明でない場合は、ビデオをお試しください。
インストール
バイナリをダウンロード
リリース ページ( sandbox-mcp_Darwin_arm64.tar.gz ) から、オペレーティング システム ( Darwinなど) およびプロセッサ アーキテクチャ ( arm64 ) に適したバイナリをダウンロードできます。
Go経由でインストール
前提条件:
Go 1.24以上
go install github.com/pottekkat/sandbox-mcp/cmd/sandbox-mcp@latestsandbox-mcpバイナリへのパスを取得します。
which sandbox-mcpソースからビルド
開発セクションを参照してください。
使用法
初期化
LLM でsandbox-mcpを使用する前に、その設定を初期化する必要があります。
# Create the configuration directory in
# $XDG_CONFIG_HOME/sandbox-mcp and pull
# the default sandboxes from GitHub
sandbox-mcp --pull
# Build the Docker images for the sandboxes
sandbox-mcp --build[!NOTE] Docker がインストールされ、実行されていることを確認してください。
MCPホスト/クライアント
Claude Desktop の場合はclaude_desktop_config.jsonに、Cursor IDE の場合はmcp.jsonに以下を追加します。
{
"mcpServers": {
"sandbox-mcp": {
"command": "path/to/sandbox-mcp",
"args": [
"--stdio"
]
}
}
}[!NOTE]
path/to/sandbox-mcpsandbox-mcpバイナリへの実際のパスに置き換えてください。
利用可能なサンドボックス
サンドボックス | 説明 |
ネットワーク アクセスを必要としない軽量コマンドを実行するための、安全で分離された Linux 環境。 | |
安全で分離された環境で Python コードを安全に実行します。 | |
分離された環境で Rust コードをコンパイルして実行します。 | |
隔離されたLinuxサンドボックスで、様々なネットワークユーティリティを使用できます。ネットワーク診断とトラブルシューティングに最適です。利用可能なツールの一覧については、 https://github.com/jonlabelle/docker-network-toolsをご覧ください。 | |
ネットワーク アクセスが可能な分離された環境で Go コードを安全に実行します。 | |
Node.js を使用して、分離された環境で JavaScript コードを実行します。 | |
Apache APISIXの軽量インスタンスを実行します。このインスタンスはYAMLファイルで設定でき、main.shファイルで提供されるcurlコマンドで操作できます。例: curl -sI | |
隔離されたサンドボックス内で Java コードをコンパイルして実行します。Java プレビュー機能をサポートします。 |
[!重要]
自分だけのサンドボックス
$XDG_CONFIG_HOME/sandbox-mcp/sandboxesに独自のサンドボックスを作成・追加できます。サンドボックスは基本的にDockerfileとJSON設定ファイルで構成されます。詳細については、例とガイドをご覧ください。
発達
リポジトリをフォークしてクローンします。
git clone https://github.com/username/sandbox-mcp.git次のディレクトリに変更します:
cd sandbox-mcp依存関係をインストールします:
make depsプロジェクトをビルドします。
make buildMCP サーバーの構成を更新して、ローカル ビルドを指すようにします。
{
"mcpServers": {
"sandbox-mcp": {
"command": "/path/to/sandbox-mcp/dist/sandbox-mcp",
"args": [
"--stdio"
]
}
}
}ライセンス
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A Model Context Protocol server for Wix AI tools
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server designed to easily dump your codebase context into Large Language Models (LLMs).173Apache 2.0
- AlicenseBqualityDmaintenanceA secure Model Context Protocol server that allows AI assistants and LLM applications to safely execute Python and JavaScript code snippets in containerized environments.2203MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server implementation that can be run directly or through Docker, enabling AI assistants to interact with external systems through the MCP standard.2-
- AlicenseNot gradedqualityAmaintenanceMCP server that gives any LLM a managed Docker workspace with live browser, terminal, code execution, document skills, and autonomous sub-agents.1,628118MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/pottekkat/sandbox-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server