SL

scooter-lacroix/sandbox-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 6 forks Качество 75 Тренд 8Apache-2.0

A MCP server for secure Python code execution with artifact capture, virtual environment support, and LM Studio integration

Обзор

General-purpose Python execution sandbox for MCP clients, with persistent execution, artifact capture, Manim rendering, guarded shell access, and lightweight web app workflows. Sandbox MCP is designed to stay broadly useful across coding assistants and MCP directories. It can run Python, generate plots and files, render Manim animations, launch or export small Flask/Streamlit demos, and expose prompts/resources that help an LLM discover how to use the sandbox well. See the Sandbox MCP server creating beautiful mathematical animations with Manim: Example: 3D mathematical animation generated automatically by the sandbox - : Automatic input validation and formatting - : Auto-detects and activates .

README

Показан фрагмент оригинального README. Открыть оригинал.

Sandbox MCP

General-purpose Python execution sandbox for MCP clients, with persistent execution, artifact capture, Manim rendering, guarded shell access, and lightweight web app workflows.

Sandbox MCP is designed to stay broadly useful across coding assistants and MCP directories. It can run Python, generate plots and files, render Manim animations, launch or export small Flask/Streamlit demos, and expose prompts/resources that help an LLM discover how to use the sandbox well.

🎬 Demo: Manim Animation in Action

See the Sandbox MCP server creating beautiful mathematical animations with Manim:

Alternative formats: MP4 Video | GIF Animation

Example: 3D mathematical animation generated automatically by the sandbox

🚀 Quick Start

# Clone the repository
git clone https://github.com/scooter-lacroix/sandbox-mcp.git
cd sandbox-mcp

# Install with uv (recommended)
uv venv && uv pip install -e .

# Run the MCP server
uv run sandbox-server-stdio

✨ Features

🔧 Enhanced Python Execution

  • Code Validation: Automatic input validation and formatting
  • Virtual Environment: Auto-detects and activates .venv
  • Persistent Context: Variables persist across executions
  • Enhanced Error Handling: Detailed diagnostics with colored output
  • Interactive REPL: Real-time Python shell with tab completion

🎨 Intelligent Artifact Management

  • Automatic Capture: Matplotlib plots and PIL images
  • Categorization: Smart file type detection and organization
  • Multiple Formats: JSON, CSV, and structured output
  • Recursive Scanning: Deep directory traversal
  • Smart Cleanup: Configurable cleanup by type or age

🎬 Manim Animation Support

  • Pre-compiled Examples: One-click animation execution
  • Quality Control: Multiple rendering presets
  • Video Generation: Auto-saves MP4 animations
  • Example Library: Built-in templates and tutorials
  • Environment Verification: Automatic dependency checking

🌐 Web Application Hosting

  • Flask & Streamlit: Launch web apps with auto port detection
  • Process Management: Track and manage running servers
  • URL Generation: Returns accessible endpoints

🔒 Security & Safety

  • Command Filtering: Blocks dangerous shell commands (configurable)
Открыть полный README на GitHub

Установка

uvx git+https://github.com/scooter-lacroix/sandbox-mcp.git
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "sandbox": { "command": "uvx", "args": ["git+https://github.com/scooter-lacroix/sandbox-mcp.git"], "env": {}, "start_on_launch": true } } }