A0 Code Exec Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited A0 Code Exec Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that exposes Agent Zero's battle-tested code execution capabilities.
This MCP server allows any AI agent (Claude, GPT-4, etc.) to execute terminal commands and Python code on the host system using Agent Zero's proven implementation.
# Clone or download this package
cd code-execution-mcp
# Install dependencies
pip install -e .
# For Windows support
pip install -e ".[windows]"The MCP server can be configured via environment variables:
# Shell executable (default: /bin/bash on Unix, cmd.exe on Windows)
export CODE_EXEC_EXECUTABLE=/bin/bash
# Init commands (semicolon-separated, run when creating new sessions)
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 timeAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"code-execution": {
"command": "python",
"args": ["/Users/lazy/Projects/A0-code-tool-MCP/code-execution-mcp/main.py"],
"env": {
"CODE_EXEC_EXECUTABLE": "/bin/bash",
"CODE_EXEC_INIT_COMMANDS": "source /Users/lazy/Projects/A0-code-tool-MCP/code-execution-mcp/.venv/bin/activate"
}
}
}
}Execute a terminal command in the specified session.
Parameters:
command (string, required): The shell command to executesession (integer, optional): Session number (default: 0)Example:
await execute_terminal(command="ls -la", session=0)Execute Python code via IPython in the specified session.
Parameters:
code (string, required): The Python code to executesession (integer, optional): Session number (default: 0)Example:
await execute_python(code="import sys; print(sys.version)", session=0)Get accumulated output from a terminal session.
Parameters:
session (integer, optional): Session number (default: 0)Example:
await get_output(session=0)Reset a terminal session, closing and reopening it.
Parameters:
session (integer, optional): Session number (default: 0)reason (string, optional): Reason for the resetExample:
await reset_terminal(session=0, reason="Environment corrupted")Sessions allow maintaining separate execution contexts:
Each session maintains:
Important: When the MCP server is launched from a virtual environment, shell sessions may NOT automatically inherit the venv activation.
Solution: Use init commands to explicitly activate your virtual environment:
{
"env": {
"CODE_EXEC_INIT_COMMANDS": "source /path/to/venv/bin/activate"
}
}pip install -e ".[windows]"cmd.exe or powershell.exe as executableThis MCP server is a minimal wrapper around Agent Zero's code execution tool:
tty_session.py - TTY session managementshell_local.py - Local shell interfaceprint_style.py - Output styling and loggingstrings.py - String manipulation utilitiesWARNING: This MCP server allows full code execution on the host system. Security is the responsibility of the MCP client.
Only use with trusted AI agents and in controlled environments.
MIT License
This project wraps and reuses code from Agent Zero (Copyright (c) 2025 Agent Zero, s.r.o), which is licensed under the MIT License.
See the LICENSE file for full license text and attribution details.
Built on Agent Zero's proven code execution implementation.
This MCP server preserves and reuses Agent Zero's battle-tested code:
code_execution_tool.pytty_session.py, shell_local.py, print_style.py, strings.pyAll credit for the robust code execution implementation goes to the Agent Zero team.
Uses FastMCP for MCP protocol handling.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.