- Home
- MCP servers
- Sandbox
Sandbox
- python
6
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run and connect to an MCP server that powers enhanced Python sandbox execution, artifact management, interactive features, and optional web app hosting. You can access it locally via HTTP or run it directly as a local stdio server, enabling integration with editors and AI tooling for rapid experimentation and automation.
How to use
Use the MCP server by connecting your client or editor to either the HTTP endpoint or the local stdio interface. The HTTP mode exposes a remote MCP URL you can reach from web or desktop apps, while the stdio mode lets you launch the server locally and communicate through the standard input/output streams. Typical workflows include executing Python code, capturing artifacts like plots and images, running Manim animations, and launching web apps from within your development environment.
How to install
{
"mcpServers": {
"sandbox_http": {
"type": "http",
"name": "sandbox_http",
"url": "http://localhost:8765/mcp",
"args": []
}
}
}
{
"mcpServers": {
"sandbox_stdio": {
"type": "stdio",
"name": "sandbox_stdio",
"command": "sandbox-server-stdio",
"args": [],
"env": {}
}
}
}
Prerequisites you need before starting:
- Python 3.9+
- uvx or pip as your package manager
- Optional: a Python virtual environment tool available on your system
Then you can start either the HTTP MCP server or the stdio MCP server using the commands below.
Configuration and usage notes
HTTP mode: Run the HTTP server and connect your MCP-enabled client to the provided URL. The server discovers and exposes endpoints for tool execution and artifact retrieval, enabling automation and integration with editors or IDEs.
Stdio mode: Start the local server and interact via standard input/output. This mode is ideal for direct integration with development environments that can spawn and communicate with a background process.
Security and safety
The server implements command filtering to block dangerous operations, isolates execution in sandbox environments, and enforces configurable timeouts and resource monitoring. You can rely on these safeguards to run user-provided code with reduced risk to your system.
Examples of common tasks
Execute Python code and capture artifacts such as plots or images. Run web apps using Flask or Streamlit. Create Manim animations with built-in presets. Start an interactive REPL for exploration. All tasks return structured results and accessible artifact listings.
Notes on MCP tooling and integration
The server provides a set of MCP tools for code execution, artifact management, and environment inspection. You can list, run, and clean artifacts, start interactive sessions, and generate or manage animations programmatically through your MCP client.
Troubleshooting tips
If you encounter connection issues, verify that the HTTP URL is reachable or that the stdio process is running correctly. Check that the appropriate port (for HTTP) or the correct stdio command is used, and ensure your client is configured to communicate with the chosen transport.
Notes on examples and further usage
You can adapt the provided examples to your own code, artefact generation, and animation workflows. The server is designed to be extended with additional tools and workflows as your use cases grow.
Appendix: MCP JSON connection snippets
{
"mcpServers": {
"sandbox_http": {
"type": "http",
"name": "sandbox_http",
"url": "http://localhost:8765/mcp",
"args": []
},
"sandbox_stdio": {
"type": "stdio",
"name": "sandbox_stdio",
"command": "sandbox-server-stdio",
"args": [],
"env": {}
}
}
}
Security & Safety details
The sandboxed execution environment ensures isolation, with configurable limits to prevent abuse. You can tune timeouts and resource usage to align with your needs and security requirements.
Available tools
execute
Execute Python code with artifact capture
shell_execute
Safely execute shell commands with security filtering
list_artifacts
List generated artifacts from executions
cleanup_artifacts
Remove temporary artifacts and clean up workspace
get_execution_info
Retrieve environment diagnostics and execution context
start_repl
Launch an interactive Python REPL session
start_web_app
Launch Flask or Streamlit web applications and expose endpoints
cleanup_temp_artifacts
Maintain artifact storage by removing temporary files
create_manim_animation
Create Manim animations programmatically and render outputs
list_manim_animations
List available Manim animation artifacts and templates
cleanup_manim_animation
Clean up specific Manim animation artifacts
get_manim_examples
Provide example code snippets for Manim demonstrations