Code Executor MCP Server
Enables Docker isolation for code execution in the Pro tier, providing enhanced security and environment control for running untrusted code.
Supports execution of JavaScript code with safety checks, output capture, and blocking of dangerous patterns like child_process and eval().
Allows running Jest test suites with pass/fail summaries, enabling AI agents to execute and validate JavaScript tests programmatically.
Enables execution of pytest test suites with pass/fail summaries, allowing AI agents to run and validate Python tests programmatically.
Provides Python code execution with safety checks, output capture, and blocking of dangerous patterns like os.system and subprocess calls.
Enables execution of shell commands with destructive-pattern blocking, output capture, and safety filters to prevent harmful operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Code Executor MCP Serverrun a Python script to calculate factorial of 10"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Executor MCP Server
By MEOK AI Labs — Sandboxed code execution for Python, JavaScript, and shell commands with safety guards
Installation
pip install code-executor-mcpUsage
python server.pyTools
execute_code
Execute code in a sandboxed environment with safety checks. Dangerous patterns (os.system, eval, exec) are blocked.
Parameters:
code(str): Code to executelanguage(str): Language — 'python' or 'javascript' (default 'python')timeout(int): Timeout in seconds (max 60, default 30)
run_command
Execute a shell command with safety filters. Destructive commands are blocked.
Parameters:
command(str): Shell commandtimeout(int): Timeout in seconds (max 60)
run_tests
Run a test suite and return results with pass/fail summary.
Parameters:
test_command(str): Test command (default 'python -m pytest')working_dir(str): Working directorytimeout(int): Timeout in seconds (default 60)
read_file
Read file contents from allowed directories (Desktop, Documents, Downloads, /tmp, sandbox).
Parameters:
path(str): File pathlimit(int): Max lines to read (default 200)
list_sandbox_files
List files in the sandbox working directory.
get_safety_rules
Get current safety rules and blocked patterns.
execute_code_docker
Execute code inside a temporary Docker container for full isolation.
Parameters:
code(str): Code to executelanguage(str): Language — 'python', 'node', 'bash'timeout_sec(int): Timeout in seconds (default 30)
Authentication
Free tier: 50 calls/day. Upgrade at meok.ai/pricing for unlimited access.
License
MIT — MEOK AI Labs
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/CSOAI-ORG/code-executor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server