
agent0ai/code-execution-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
agent0ai/code-execution-mcp は [https://github.com/agent0ai/code-execution-mcp.] からインポートされた MCP サーバーの候補です
概要
agent0ai/code-execution-mcp は [https://github.com/agent0ai/code-execution-mcp.] からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
エージェントゼロの戦いテストされたコード実行機能を公開するモデルコンテキストプロトコル(MCP)サーバー。
このMCPサーバーは、Agent Zeroの実証済みの実装を使用して、ホストシステム上のターミナルコマンドとPythonコードを実行するAIエージェント(Claude、Cursor、Windsurfなど)を使用できます。
##特徴
- Execute Terminal Commands:フルセッションの永続性でシェルコマンドを実行 -Execute Python Code:セッション管理でPythonコードを実行
- 複数のセッション:別の実行コンテキストを維持 -スマート出力処理:自動プロンプト検出、タイムアウト管理、およびダイアログ検出
- Cross-Platform:Linux、macOS、Windows上で動作します(実験的)
MCP クライアント構成(インストール不要)
アプリケーション MCP 設定に追加します。
-
uvxを使用したシンプルなケース
-
または uvx がインストールされていない場合の pipx
追加構成
MCP サーバーは、環境変数から構成できます。
###追加例
-
カスタムシェルとPython環境でセッションを開始+ロギング
-
オーバーライドタイムアウト
手動取付け
config で実行します。
利用可能なツール
実行 ターミナル
指定されたセッションでターミナルコマンドを実行します.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Code Execution MCP Server
A Model Context Protocol (MCP) server that exposes Agent Zero’s battle-tested code execution capabilities.
This MCP server allows any AI agent (Claude, Cursor, Windsurf, etc.) to execute terminal commands and Python code on the host system using Agent Zero’s proven implementation.
Features
- Execute Terminal Commands: Run shell commands with full session persistence
- Execute Python Code: Run Python code via IPython with session management
- Multiple Sessions: Maintain separate execution contexts
- Smart Output Handling: Automatic prompt detection, timeout management, and dialog detection
- Cross-Platform: Works on Linux, macOS, and Windows (experimental)
MCP Client Configuration (no installation needed)
Add to your application MCP config:
- simple case using uvx
{
"mcpServers": {
"code-execution": {
"command": "uvx",
"args": ["code-execution-mcp"]
}
}
}
- or pipx if uvx is not installed
{
"mcpServers": {
"code-execution": {
"command": "pipx",
"args": ["run", "code-execution-mcp"]
}
}
}
Additional configuration
The MCP server can be configured via environment variables:
# Shell executable (default: /bin/bash on Unix, powershell.exe on Windows)
export CODE_EXEC_EXECUTABLE=/bin/bash
# Init commands (semicolon-separated, run when creating new sessions, empty by default)
export CODE_EXEC_INIT_COMMANDS="source /path/to/venv/bin/activate;export PATH=\$PATH:/custom/bin"
# Timeout configuration (in seconds)
export CODE_EXEC_FIRST_OUTPUT_TIMEOUT=30 # Wait for first output
export CODE_EXEC_BETWEEN_OUTPUT_TIMEOUT=15 # Wait between output chunks
export CODE_EXEC_DIALOG_TIMEOUT=5 # Detect dialog prompts
export CODE_EXEC_MAX_EXEC_TIMEOUT=180 # Maximum execution time
# Log directory (default empty = logging disabled)
export CODE_EXEC_LOG_DIR=/path/to/logs
Additional examples
- start sessions with custom shell and python environment + logging
{
"mcpServers": {
"code-execution-mcp": {
"command": "uvx",
"args": ["code-execution-mcp"],
"env": {
"CODE_EXEC_EXECUTABLE": "/bin/zsh",
"CODE_EXEC_INIT_COMMANDS": "source /Users/lazy/Projects/code-execution-mcp/.venv/bin/activate",
"CODE_EXEC_LOG_DIR": "/Users/lazy/Projects/code-execution-mcp/logs"
}
}
}
}
- override timeouts
{
"mcpServers": {
"code-execution-mcp": {
"command": "uvx",
"args": ["code-execution-mcp"],
"env": {
"CODE_EXEC_FIRST_OUTPUT_TIMEOUT": "60",
"CODE_EXEC_MAX_EXEC_TIMEOUT": "300"
}
}
}
}
Manual installation
# Clone or download this package, then navigate to the directory
git clone https://github.com/agent0ai/code-execution-mcp.git
cd /code-execution-mcp
# Install dependencies
pip install -e .
インストール
uvx code-execution-mcp設定
{
"mcpServers": {
"code-execution": {
"command": "uvx",
"args": ["code-execution-mcp"]
}
}
}