by instavm
A secure local sandbox to run LLM-generated code using Apple containers
# Add to your Claude Code skills
git clone https://github.com/instavm/coderunnerCodeRunner is an MCP (Model Context Protocol) server that executes AI-generated code in a sandboxed environment on your Mac using Apple's native containers.
Key use case: Process your local files (videos, images, documents, data) with remote LLMs like Claude or ChatGPT without uploading your files to the cloud. The LLM generates code that runs locally on your machine to analyze, transform, or process your files.
| Without CodeRunner | With CodeRunner | | :--- | :--- | | LLM writes code, you run it manually | LLM writes and executes code, returns results | | Upload files to cloud for AI processing | Files stay on your machine, processed locally | | Install tools and dependencies yourself | Tools available in sandbox, auto-installs others | | Copy/paste scripts to run elsewhere | Code runs immediately, shows output/files | | LLM analyzes text descriptions of files | LLM directly processes your actual files | | Manage Python environments and packages | Pre-configured environment ready to use |
Prerequisites: Mac with macOS and Apple Silicon (M1/M2/M3/M4), Python 3.10+
git clone https://github.com/instavm/coderunner.git
cd coderunner
chmod +x install.sh
./install.sh
MCP server will be available at: http://coderunner.local:8222/mcp
Install required packages (use virtualenv and note the python path):
<details> <summary>Configure Claude Desktop to use CodeRunner as an MCP server:</summary>No comments yet. Be the first to share your thoughts!
pip install -r examples/requirements.txt



Copy the example configuration:
cd examples
cp claude_desktop/claude_desktop_config.example.json claude_desktop/claude_desktop_config.json
Edit the configuration file and replace the placeholder paths:
/path/to/your/python with your actual Python path (e.g., /usr/bin/python3 or /opt/homebrew/bin/python3)/path/to/coderunner with the actual path to your cloned repositoryExample after editing:
{
"mcpServers": {
"coderunner": {
"command": "/opt/homebrew/bin/python3",
"args": ["/Users/yourname/coderunner/examples/claude_desktop/mcpproxy.py"]
}
}
}
Update Claude Desktop configuration:
**Start using CodeRunner in Clau...