run_python_code_in_sandbox
Execute Python code securely in an isolated environment with the Modal MCP Toolbox. Specify version, dependencies, and optional file handling for safe code testing and execution.
Instructions
Copy
print(requests.get('https://icanhazip.com').text)", requirements=["requests"])
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | The python code to run. | |
mount_directory | No | Allows you to make a local directory available at `/mounted-dir` for the code in `code`. Needs to be an absolute path. Writes to this directory will NOT be reflected in the local directory. | |
pull_files | No | List of tuples (absolut_path_sandbox_file, absolute_path_local_file). When provided downloads the file(s) from the sandbox to the local file(s). | |
python_version | No | The python version to use. If not provided defaults to 3.13 | 3.13 |
requirements | No | The requirements to install. |
Input Schema (JSON Schema)
This server cannot be installed
Other Tools from Modal MCP Toolbox
Related Tools
- @e2b-dev/mcp-server
- @maxim-saplin/mcp_safe_local_python_executor
- @nkkko/daytona-mcp-interpreter
- @yzfly/mcp-python-interpreter
- @yzfly/mcp-python-interpreter