Modal Toolbox
Facilitates running Python code in a sandbox and generating images using the FLUX model via an MCP server compatible with clients like Goose and the Claude Desktop App.
What is Modal Toolbox?
Modal Toolbox is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to facilitates running python code in a sandbox and generating images using the flux model via an mcp server compatible with clients like goose and the claude desktop app.
Facilitates running Python code in a sandbox and generating images using the FLUX model via an MCP server compatible with clients like Goose and the Claude Desktop App.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Facilitates running Python code in a sandbox and generating
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx modal-mcp-toolboxConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Modal Toolbox
Modal MCP Toolbox connects MCP clients like Claude Desktop and Goose to the Modal cloud platform, exposing two powerful tools: running arbitrary Python code in an isolated sandbox and generating images using the FLUX diffusion model. It requires a Modal account and uses uvx for zero-install startup, making it one of the simplest ways to give Claude the ability to execute real Python code and produce AI-generated images on demand without any local GPU or compute.
Prerequisites
- A Modal account at modal.com with the Modal CLI installed and authenticated ('modal token new')
- uv package manager installed (astral.sh/uv) — required to run 'uvx modal-mcp-toolbox'
- An MCP-compatible client such as Claude Desktop or Goose
- Internet access for Modal to spin up cloud sandboxes
Install and authenticate the Modal CLI
Install the Modal Python package and authenticate your account so the toolbox can provision cloud sandboxes.
pip install modal
modal token newInstall uv if not already present
The toolbox is run via uvx, which requires uv. Install it with the official installer.
curl -LsSf https://astral.sh/uv/install.sh | shAdd the Modal MCP Toolbox to Claude Desktop config
Configure Claude Desktop to start the toolbox server using uvx. No separate installation is needed — uvx downloads and runs the package automatically.
{
"mcpServers": {
"modal-toolbox": {
"command": "uvx",
"args": ["modal-mcp-toolbox"]
}
}
}Restart Claude Desktop
Restart the client to load the new MCP server. Two new tools will be available: run_python_code_in_sandbox and generate_flux_image.
Or install via Smithery for automated client setup
Use the Smithery CLI to automatically add the toolbox to your Claude Desktop configuration.
npx -y @smithery/cli install @philipp-eisen/modal-mcp-toolbox --client claudeModal Toolbox Examples
Client configuration
Minimal claude_desktop_config.json entry for Modal MCP Toolbox using uvx.
{
"mcpServers": {
"modal-toolbox": {
"command": "uvx",
"args": ["modal-mcp-toolbox"]
}
}
}Prompts to try
Example prompts that exercise both the Python sandbox and the FLUX image generation tool.
- "Run this Python code in a sandbox and show me the output: import pandas as pd; print(pd.__version__)"
- "Generate an image of a futuristic city at night with neon lights using FLUX"
- "Execute a Python script that downloads the NASDAQ CSV from Yahoo Finance and plots a 30-day price chart"
- "Create a FLUX image of a photorealistic golden retriever on a mountain summit at sunrise"
- "Run Python to compute the first 20 Fibonacci numbers and return them as a list"Troubleshooting Modal Toolbox
Tool call fails with 'not authenticated' or 'token not found' error
Run 'modal token new' in your terminal to authenticate the Modal CLI. The toolbox uses your Modal account credentials, which are stored in ~/.modal/credentials. Ensure you have run this command before starting Claude Desktop.
'uvx' command not found when Claude Desktop tries to start the server
Install uv with 'curl -LsSf https://astral.sh/uv/install.sh | sh' and ensure the uv binary directory (~/.local/bin or ~/.cargo/bin) is on the PATH that Claude Desktop uses. You may need to specify the full path in the 'command' field, e.g. '/Users/yourname/.local/bin/uvx'.
Python sandbox executions time out on large workloads
Modal sandboxes have default timeout limits. For long-running computations, split the work into smaller chunks or check the Modal dashboard for timeout settings on your account tier.
Frequently Asked Questions about Modal Toolbox
What is Modal Toolbox?
Modal Toolbox is a Model Context Protocol (MCP) server that facilitates running python code in a sandbox and generating images using the flux model via an mcp server compatible with clients like goose and the claude desktop app. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Modal Toolbox?
Follow the installation instructions on the Modal Toolbox GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Modal Toolbox?
Modal Toolbox works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Modal Toolbox free to use?
Yes, Modal Toolbox is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Modal Toolbox Alternatives — Similar Cloud Services Servers
Looking for alternatives to Modal Toolbox? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Modal Toolbox in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Modal Toolbox?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.