Modal MCP Server
Allows managing Modal deployments, apps, containers, volumes, secrets, and environments via MCP tools.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Modal MCP Server list my deployed apps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Modal MCP Server
Servidor MCP (Model Context Protocol) que conecta agentes de IA (como o Google Antigravity) à infraestrutura da Modal.com, permitindo gerenciar deployments, apps, containers, volumes, secrets e ambientes via ferramentas MCP.
Arquitetura
O projeto usa o SDK oficial do MCP para expor comandos da CLI modal como ferramentas MCP. A comunicação é feita via stdio (StdioServerTransport), ideal para integração com agentes que suportam subprocessos MCP.
Agente de IA (ex: Antigravity)
|
[MCP - stdio]
|
Modal MCP Server (Node.js)
|
[CLI: modal]
|
Modal.com APIRelated MCP server: Modal MCP Server
Estrutura do Projeto
modal-mcp/
├── build/ # Código compilado (TypeScript → JavaScript)
│ ├── index.js
│ ├── tools/
│ │ ├── deploy.js
│ │ ├── container.js
│ │ ├── volume.js
│ │ ├── secret.js
│ │ ├── app.js
│ │ └── environment.js
│ └── utils/
│ └── exec.js
├── src/ # Código-fonte TypeScript
│ ├── index.ts # Entry point do servidor MCP
│ ├── tools/ # Módulos de ferramentas MCP
│ │ ├── deploy.ts # Deploy e execução de apps
│ │ ├── container.ts # Gerenciamento de containers
│ │ ├── volume.ts # Gerenciamento de volumes persistentes
│ │ ├── secret.ts # Gerenciamento de secrets
│ │ ├── app.ts # Gerenciamento de apps
│ │ └── environment.ts # Gerenciamento de ambientes
│ └── utils/
│ └── exec.ts # Utilitário de execução da CLI modal
├── package.json
├── tsconfig.json
└── README.mdPré-requisitos
Node.js 18+
Conta no Modal.com e token de autenticação configurado (
modal token set)CLI do Modal instalada (
pip install modaloumodaldisponível no PATH)
Instalação
npm install
npm run buildUso
Iniciar o servidor
npm start
# ou diretamente:
node build/index.jsO servidor escuta comandos MCP via stdin/stdout e se comunica com seu agente de IA.
Integração com Antigravity (opencode.json)
Exemplo de configuração no seu opencode.json para conectar o agente do Google Antigravity ao Modal MCP Server:
{
"antigravityAgents": {
"meu-agente": {
"mcpServers": {
"modal": {
"command": "node",
"args": ["caminho/para/modal-mcp/build/index.js"]
}
}
}
}
}Ferramentas MCP Disponíveis
Deploy & Run
Ferramenta | Descrição |
| Deploy de uma aplicação Modal a partir de um script Python |
| Execução de função ou entrypoint local no Modal |
App Management
Ferramenta | Descrição |
| Lista apps em execução, deployed ou parados |
| Histórico de deploys de um app |
| Logs de um app |
| Para permanentemente um app |
| Redeploy de versão anterior |
| Redeploy sem mudanças de código (novos containers) |
Container Management
Ferramenta | Descrição |
| Lista containers em execução |
| Executa comando dentro de um container |
| Logs de um container específico |
| Termina um container |
Volume Management
Ferramenta | Descrição |
| Lista volumes |
| Cria um volume persistente |
| Deleta um volume |
| Lista arquivos/diretórios dentro de um volume |
| Upload de arquivo/diretório para um volume |
| Download de arquivos de um volume |
| Remove arquivo/diretório de um volume |
| Renomeia um volume |
Secret Management
Ferramenta | Descrição |
| Lista secrets publicados |
| Cria um novo secret |
| Deleta um secret |
Environment Management
Ferramenta | Descrição |
| Lista ambientes do workspace |
| Cria um novo ambiente |
| Deleta um ambiente |
| Atualiza configurações de ambiente |
| Lista membros de ambiente restrito |
| Adiciona/atualiza papel de membro |
| Remove membro de ambiente restrito |
Fluxo de Funcionamento
O agente de IA (ex: Google Antigravity) envia requisições MCP via stdio
O servidor MCP recebe a requisição e identifica qual ferramenta foi chamada
A ferramenta monta o comando
modal <subcomando>apropriadoO comando é executado via
child_process.execO stdout do comando é retornado como resposta MCP
Scripts
Comando | Descrição |
| Compila TypeScript para JavaScript ( |
| Compila em modo watch ( |
| Inicia o servidor MCP |
Available Tools
30 toolsmodal_app_historyB
Show an App's deployment history.
Inputs: appIdentifier (required), env.
modal_app_listA
List Apps that are running, deployed or recently stopped.
Inputs: env.
modal_app_logsC
Fetch logs for an App.
Inputs: appIdentifier (required), env, tail, since, +1 more.
modal_app_rollbackC
Redeploy a previous version of an App.
Inputs: appIdentifier (required), env, version.
modal_app_rolloverA
Redeploy an App to get new containers without code changes.
Inputs: appIdentifier (required), env, strategy.
modal_app_stopA
Permanently stop an App and terminate its running containers.
Inputs: appIdentifier (required), env.
modal_container_execB
Execute a command in a container.
Inputs: command (required), containerId (required).
modal_container_listA
List all containers that are currently running.
Inputs: env, appId.
modal_container_logsB
Fetch logs for a specific container.
Inputs: containerId (required), tail, since, source.
modal_container_stopB
Terminate a running container.
Inputs: containerId (required).
modal_deployC
Deploy a Modal application.
Inputs: appRef (required), env, tag, name, +1 more.
modal_env_createB
Create a new environment in the current workspace.
Inputs: name (required), restricted.
modal_env_deleteB
Delete an environment in the current workspace.
Inputs: name (required).
modal_env_listB
List all environments in the current workspace.
Inputs: env.
modal_env_members_listA
List the members of a restricted Environment.
Inputs: environment (required).
modal_env_members_removeB
Remove a member from a restricted Environment.
Inputs: member (required), environment (required), serviceUser.
modal_env_members_updateA
Add or update a member's role in a restricted Environment.
Inputs: role (required), member (required), environment (required), serviceUser.
modal_env_updateC
Update environment-level settings.
Inputs: currentName (required), newName, webSuffix.
modal_runC
Run a Modal function or local entrypoint.
Inputs: appRef (required), env, detach.
modal_secret_createC
Create a new secret.
Inputs: name (required), env, force, keyValues.
modal_secret_deleteC
Delete a named Secret.
Inputs: name (required), env.
modal_secret_listA
List your published secrets.
Inputs: env.
modal_volume_createB
Create a named, persistent modal.Volume.
Inputs: name (required), env.
modal_volume_deleteA
Delete a named Volume and all of its data.
Inputs: name (required), env.
modal_volume_getB
Download files from a modal.Volume object.
Inputs: remotePath (required), volumeName (required), env, localDest.
modal_volume_listB
List the details of all modal.Volume volumes in an Environment.
Inputs: env.
modal_volume_lsB
List files and directories in a modal.Volume volume.
Inputs: volumeName (required), env, path.
modal_volume_putB
Upload a file or directory to a modal.Volume.
Inputs: localPath (required), volumeName (required), env, force, +1 more.
modal_volume_renameB
Rename a modal.Volume.
Inputs: newName (required), oldName (required), env.
modal_volume_rmB
Delete a file or directory from a modal.Volume.
Inputs: remotePath (required), volumeName (required), env, recursive.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Each tool targets a distinct resource and action, with no overlapping purposes. The few similar operations (e.g., app_stop vs. container_stop) are clearly differentiated by resource scope and descriptions.
The predominant pattern modal_<resource>_<action> is consistent across most tools. Two tools (modal_deploy, modal_run) omit the resource prefix, causing minor deviation, but the overall scheme remains predictable and readable.
With 30 tools, the set is above the ideal 3-15 range and falls into the heavy category. However, the broad scope of Modal (environments, apps, secrets, volumes, containers, deployments) justifies the number, even though it feels dense.
The tool surface covers most lifecycle operations for each resource: environments have full CRUD, apps have management and deployment actions, volumes include file operations, and containers have exec/logs/stop. A notable gap is the lack of a secret update operation, but agents can work around by deleting and recreating.
Maintenance
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables AI agents to interact with Modal, allowing them to deploy apps and run functions in a serverless cloud environment.73MIT
- AlicenseAqualityCmaintenanceExposes Modal cloud functions as MCP tools for video rendering, voice synthesis, and app management. Enables LLM agents to execute Remotion renders, F5-TTS voice cloning, and monitor Modal applications via Supabase-backed infrastructure.6MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables programmatic control of Cursor's cloud-based AI agents for automated code generation and repository management via standardized MCP tools.27 npm6MIT
- AlicenseAqualityBmaintenanceAn MCP server for managing Modal — apps, containers, volumes, and secrets — and for deploying & running Modal apps directly from Claude Code and other MCP clients.1285 PyPI4MIT