SL

scooter-lacroix/sandbox-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

11 stars 6 forks 品質 75 トレンド 18Apache-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)
GitHub で README 全文を見る

インストール

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 } } }