Modal MCP Server
Serves as the API framework for the MCP server, providing documentation at /docs endpoint and RESTful endpoints for tool invocation.
Provides repository access for the MCP server code, supporting installation via git clone from a GitHub repository.
Provides tools for deploying and running Modal applications in the cloud, allowing AI agents to deploy Modal apps and execute functions within Modal applications.
Serves as the runtime environment for the MCP server, requiring Python 3.11+ for server operation.
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 the contents of my data volume"
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
An MCP server implementation for interacting with Modal volumes and deploying Modal applications from within Cursor.
Installation
Clone this repository:
git clone https://github.com/smehmood/modal-mcp-server.git
cd modal-mcp-serverInstall dependencies using
uv:
uv syncRelated MCP server: Outsource MCP
Configuration
To use this MCP server in Cursor, add the following configuration to your ~/.cursor/mcp.json:
{
"mcpServers": {
"modal-mcp-server": {
"command": "uv",
"args": [
"--project", "/path/to/modal-mcp-server",
"run", "/path/to/modal-mcp-server/src/modal_mcp/server.py"
]
}
}
}Replace /path/to/modal-mcp-server with the absolute path to your cloned repository.
Requirements
Python 3.11 or higher
uvpackage managerModal CLI configured with valid credentials
For Modal deploy support:
Project being deployed must use
uvfor dependency managementModal must be installed in the project's virtual environment
Supported Tools
Modal Volume Operations
List Modal Volumes (
list_modal_volumes)Lists all Modal volumes in your environment
Returns JSON-formatted volume information
Parameters: None
List Volume Contents (
list_modal_volume_contents)Lists files and directories in a Modal volume
Parameters:
volume_name: Name of the Modal volumepath: Path within volume (default: "/")
Copy Files (
copy_modal_volume_files)Copies files within a Modal volume
Parameters:
volume_name: Name of the Modal volumepaths: List of paths where last path is destination
Example:
["source.txt", "dest.txt"]or["file1.txt", "file2.txt", "dest_dir/"]
Remove Files (
remove_modal_volume_file)Deletes a file or directory from a Modal volume
Parameters:
volume_name: Name of the Modal volumeremote_path: Path to file/directory to deleterecursive: Boolean flag for recursive deletion (default: false)
Upload Files (
put_modal_volume_file)Uploads a file or directory to a Modal volume
Parameters:
volume_name: Name of the Modal volumelocal_path: Path to local file/directory to uploadremote_path: Path in volume to upload to (default: "/")force: Boolean flag to overwrite existing files (default: false)
Download Files (
get_modal_volume_file)Downloads files from a Modal volume
Parameters:
volume_name: Name of the Modal volumeremote_path: Path to file/directory in volume to downloadlocal_destination: Local path to save downloaded files (default: current directory)force: Boolean flag to overwrite existing files (default: false)
Note: Use "-" as
local_destinationto write file contents to stdout
Modal Deployment
Deploy Modal App (
deploy_modal_app)Deploys a Modal application
Parameters:
absolute_path_to_app: Absolute path to the Modal application file
Note: The project containing the Modal app must:
Use
uvfor dependency managementHave the
modalCLI installed in its virtual environment
Response Format
All tools return responses in a standardized format, with slight variations depending on the operation type:
# JSON operations (list volumes, list contents):
{
"success": True,
"data": {...} # JSON data from Modal CLI
}
# File operations (put, get, copy, remove):
{
"success": True,
"message": "Operation successful message",
"command": "executed command string",
"stdout": "command output", # if any
"stderr": "error output" # if any
}
# Error case (all operations):
{
"success": False,
"error": "Error message describing what went wrong",
"command": "executed command string", # for file operations
"stdout": "command output", # if available
"stderr": "error output" # if available
}Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
7 toolscopy_modal_volume_filesA
Copy files within a Modal volume. Can copy a source file to a destination file
or multiple source files to a destination directory.
Args:
volume_name: Name of the Modal volume to perform copy operation in.
paths: List of paths for the copy operation. The last path is the destination,
all others are sources. For example: ["source1.txt", "source2.txt", "dest_dir/"]
Returns:
A dictionary containing the result of the copy operation.
Raises:
Exception: If the copy operation fails for any reason.
Inputs: volume_name (required), paths (required).
deploy_modal_appC
Deploy a Modal application using the provided parameters.
Args:
absolute_path_to_app: The absolute path to the Modal application to deploy.
Returns:
A dictionary containing deployment results.
Raises:
Exception: If deployment fails for any reason.
Inputs: absolute_path_to_app (required).
get_modal_volume_fileA
Download files from a Modal volume.
Args:
volume_name: Name of the Modal volume to download from.
remote_path: Path to the file or directory in the volume to download.
local_destination: Local path to save the downloaded file(s). Defaults to current directory.
Use "-" to write file contents to stdout.
force: If True, overwrite existing files. Defaults to False.
Returns:
A dictionary containing the result of the download operation.
Raises:
Exception: If the download operation fails for any reason.
Inputs: volume_name (required), remote_path (required), local_destination, force.
list_modal_volume_contentsB
List files and directories in a Modal volume.
Args:
volume_name: Name of the Modal volume to list contents from.
path: Path within the volume to list contents from. Defaults to root ("/").
Returns:
A dictionary containing the parsed JSON output of the volume contents.
Inputs: volume_name (required), path.
list_modal_volumesB
List all Modal volumes using the Modal CLI with JSON output.
Returns:
A dictionary containing the parsed JSON output of the Modal volumes list.
Inputs: no named parameters.
put_modal_volume_fileA
Upload a file or directory to a Modal volume.
Args:
volume_name: Name of the Modal volume to upload to.
local_path: Path to the local file or directory to upload.
remote_path: Path in the volume to upload to. Defaults to root ("/").
If ending with "/", it's treated as a directory and the file keeps its name.
force: If True, overwrite existing files. Defaults to False.
Returns:
A dictionary containing the result of the upload operation.
Raises:
Exception: If the upload operation fails for any reason.
Inputs: volume_name (required), local_path (required), remote_path, force.
remove_modal_volume_fileB
Delete a file or directory from a Modal volume.
Args:
volume_name: Name of the Modal volume to delete from.
remote_path: Path to the file or directory to delete.
recursive: If True, delete directories recursively. Required for deleting directories.
Returns:
A dictionary containing the result of the delete operation.
Raises:
Exception: If the delete operation fails for any reason.
Inputs: volume_name (required), remote_path (required), recursive.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Every tool has a clearly distinct purpose with no overlap: copy, deploy, get (download), list contents, list volumes, put (upload), and remove (delete) are all unique operations. The descriptions clearly differentiate between volume operations and app deployment, making tool selection straightforward for an agent.
All tools follow a consistent verb_noun pattern with 'modal' as a prefix (e.g., copy_modal_volume_files, deploy_modal_app, get_modal_volume_file). The naming is uniform throughout, using snake_case and clear action-object pairs, making the set predictable and easy to understand.
With 7 tools, this server is well-scoped for managing Modal volumes and applications. Each tool serves a specific, necessary function (e.g., CRUD operations for volumes, listing, and deployment), and there are no redundant or missing tools for the apparent domain, making the count ideal.
The tool surface provides complete coverage for Modal volume management (create via put, read via get and list, update via copy, delete via remove) and app deployment. There are no obvious gaps; agents can perform all core workflows without dead ends, ensuring effective operation within the domain.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- FlicenseDqualityFmaintenanceAn MCP server that allows users to deploy Python scripts to Modal directly from Claude, providing a link to the deployed application that can be shared with others.14-
- AlicenseAqualityDmaintenanceAn MCP server that enables AI applications to access 20+ model providers (including OpenAI, Anthropic, Google) through a unified interface for text and image generation.230MIT
- 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
- AlicenseBqualityDmaintenanceAn MCP server that enables LLM coding agents to deploy web applications to AWS serverless infrastructure, supporting backend, frontend, and fullstack deployments.522 npm1MIT