Modal Toolbox

v1.0.0Cloud Servicesstable

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.

modal-mcp-toolboxmcpai-integration
Share:
26
Stars
0
Downloads
0
Weekly
0/5

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

Run Python code in sandboxes via the Modal platform.
Generate images using the FLUX model through Claude.
Execute serverless workflows with cloud integration.
philipp-eisen

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedApr 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx modal-mcp-toolbox

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 new
2

Install 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 | sh
3

Add 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"]
    }
  }
}
4

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.

5

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 claude

Modal 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.

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.

Quick Config Preview

{ "mcpServers": { "modal-mcp-toolbox": { "command": "npx", "args": ["-y", "modal-mcp-toolbox"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides