Labsco
MCP SERVER

Modal MCP

by george-bobby

Deploy, run and debug Modal apps from your assistant, using the Modal CLI credentials already on your machine.

PaaS Deployment & App Hosting
Summary
Log search with context is the tool you'll actually reach for.

Deploy and run are the headline, but the one that changes a debugging session is `search_modal_logs`: it pulls the logs once and greps them locally, so you get surrounding lines, regex and match counts rather than the bare matching line the CLI's own search returns. The repository is candid that a few tools are escalation paths — `deploy_modal_app`, `put_modal_volume_file`, `exec_modal_container` — and says to keep them behind your client's approval prompts.

What it is

A server that drives the Modal platform — apps, containers, volumes and secrets — by shelling out to your local `modal` CLI. Because it uses whatever profile is already configured in `~/.modal.toml`, there is no second set of credentials to issue or rotate.

What you get
  • 26 tools grouped by area, most of them taking an optional `env` argument to target a specific Modal environment
  • `deploy_modal_app` deploys an app and returns live, shareable endpoint `urls`; `run_modal_app` runs one function or entrypoint and streams the output
  • `get_modal_app_logs` and `get_modal_container_logs` fetch or follow logs with `since`, `until`, `tail`, `search`, `source` and `timestamps`
  • `search_modal_logs` greps an app's or container's logs and returns each hit with `context_lines` around it (default 3), plus a `match_count` — regex, case control and an `exclude` filter included
  • Containers: `list_modal_containers`, `exec_modal_container`, `stop_modal_container`
  • Volumes: `list_modal_volumes`, `list_modal_volume_contents`, `copy_modal_volume_files`, `put_modal_volume_file`, `get_modal_volume_file`, `remove_modal_volume_file`, plus `create_modal_volume`, `rename_modal_volume`, `delete_modal_volume`
  • Secrets and discovery: `list_modal_secrets`, `create_modal_secret` (values redacted from the echoed command), `delete_modal_secret`, `get_modal_profile`, `list_modal_environments`
Requirements

Python 3.11 or higher, `uv` for `uvx`, and the Modal CLI 1.x already authenticated — run `modal setup` if not. Run it as `uvx mcp-modal` (PyPI package `mcp-modal`, version 0.2.4, stdio transport). Deploy and run support additionally requires the target project to use `uv` with `modal` installed in its virtualenv. Optionally set `MCP_MODAL_ALLOWED_LOCAL_PATHS` to a list of directories; the two volume tools that touch local files then refuse any path outside them.

Setup effort

One command — uvx mcp-modal