modal-mcp
MCP (Model Context Protocol) server that exposes Modal cloud functions as tools for Claude and other LLM agents.
Tools
| Tool | Description |
|---|---|
modal_render | Render a Remotion composition on Modal (Chrome + FFmpeg), upload MP4 to Supabase Storage |
modal_render_list | List recent render jobs from Supabase memory |
modal_render_get | Get a single render job by ID |
modal_voice_clone | Synthesize speech via Modal F5-TTS voice clone endpoint |
modal_apps | List deployed Modal apps via CLI |
modal_logs | Tail logs from a Modal app |
Setup
1. Install dependencies
npm install
2. Configure environment variables
The server reads these from the environment (typically passed via Claude's settings.json):
| Variable | Required | Description |
|---|---|---|
SUPABASE_URL | Yes | Supabase project URL |
SUPABASE_KEY | Yes | Supabase service role key |
MODAL_REMOTION_RENDER_URL | No | Modal render endpoint URL |
MODAL_VOICE_CLONE_URL | No | Modal voice clone endpoint URL |
MODAL_BIN | No | Path to modal CLI binary (default: modal) |
3. Add to Claude settings
In your Claude settings.json, add under mcpServers:
{
"modal-mcp": {
"command": "node",
"args": ["/path/to/modal-mcp/server.js"],
"env": {
"SUPABASE_URL": "https://your-project.supabase.co",
"SUPABASE_KEY": "your-service-role-key",
"MODAL_REMOTION_RENDER_URL": "https://your-modal-endpoint.modal.run"
}
}
}
Modal Endpoint (modal_remotion_render.py)
The included modal_remotion_render.py is the Modal-side endpoint that this MCP server calls. It:
- Spins up a container with Node 20, Chromium, and FFmpeg
- Bundles and renders a Remotion composition
- Uploads the resulting MP4/PNG to Supabase Storage
- Returns a public URL
Deploy to Modal
# Set required env vars first
export SUPABASE_URL=https://your-project.supabase.co
export SUPABASE_SERVICE_ROLE_KEY=your-key
export SUPABASE_KEY=your-key
export REMOTION_LOCAL_PATH=/path/to/your/remotion/project
modal deploy modal_remotion_render.py
License
MIT