Python MCP Sandbox Tool
Click on "Deploy 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., "@Python MCP Sandbox ToolRun a Python script to compute the first 10 Fibonacci numbers."
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.
Python MCP Sandbox Tool
This tool provides a secure sandbox environment for executing Python scripts via the MCP (Model Communication Protocol). It runs scripts in isolated Docker containers with security constraints.
Features
Secure Sandboxing: Runs Python scripts in isolated Docker containers
Resource Limits:
Memory limit: 4096MB
CPU Cores: 4
Timeout: 120 seconds
Package Allowlist: Only some curated packages are allowed
Read-Only Filesystem: Container filesystem is read-only
Artifact Support: Returns artifacts created during execution
Related MCP server: py-sandbox
Usage
The tool expects a JSON request with a script field containing the Python code to execute.
Example request:
{
"script": "print('Hello from sandbox!')\nprint('This is a test script')"
}Installation
pip install -r requirements.txtRunning
python mcp_sandbox_tool.pyResponse Format
The tool returns a JSON response with:
status: "success" or "error"stdout: Standard output from the scriptstderr: Standard error from the scriptreturn_code: Exit code of the scriptartifacts: Files created during execution (if any)
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP catalog with 30 tenant-isolated browser, RAG, AI, mail and media tools.
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
A paid remote MCP for HyperFrames, built to return verdicts, receipts, usage logs, and audit-ready J
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables code execution in isolated Docker containers with persistent IPython, Node.js, or R kernels, supporting file import/export and cross-session transfers via MCP tools.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to execute arbitrary Python code securely in a sandboxed environment with resource limits and security constraints via MCP protocol.MIT
- FlicenseNot gradedqualityBmaintenanceEnables secure execution of Python code, SQL queries, and metric fetching through MCP with ephemeral Docker sandboxing.-
- AlicenseAqualityCmaintenanceRun Python, JavaScript, or shell snippets in secure, resource-limited Docker containers with no network access, exposed as MCP tools.2Apache 2.0