Back to Home
agent0ai icon

code-execution-mcp

by agent0ai

Overview

Provides AI agents with robust capabilities to execute terminal commands and Python code on the host system.

Installation

Run Command
uvx code-execution-mcp

Environment Variables

  • CODE_EXEC_EXECUTABLE
  • CODE_EXEC_INIT_COMMANDS
  • CODE_EXEC_FIRST_OUTPUT_TIMEOUT
  • CODE_EXEC_BETWEEN_OUTPUT_TIMEOUT
  • CODE_EXEC_DIALOG_TIMEOUT
  • CODE_EXEC_MAX_EXEC_TIMEOUT
  • CODE_EXEC_LOG_DIR

Security Notes

This server explicitly enables full code execution on the host system, making it inherently high-risk if exposed to untrusted agents or environments. While it uses `shlex.quote` for Python code, this primarily protects the command execution context, not the code content itself. There are no obvious unintended vulnerabilities like hardcoded secrets or arbitrary `eval` within the server's own logic beyond its stated purpose. However, its core function is to execute arbitrary commands/code, which is a significant security risk by design. The README explicitly warns about this inherent risk.

Similar Servers

Stats

Interest Score40
Security Score4
Cost ClassMedium
Avg Tokens1000
Stars9
Forks2
Last Update2025-11-26

Tags

Code ExecutionTerminalPythonMCP ServerAI Agent Tool