The Modal MCP Server is a specialized implementation designed to manage Modal applications and volumes directly from within the Cursor IDE. It provides a seamless way to interact with Modal's infrastructure, enabling developers to deploy applications, manage files, and perform volume operations without leaving their development environment.
shell
git clone https://github.com/smehmood/modal-mcp-server.git
cd modal-mcp-server
uv
:shell
uv sync
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.
uv
package manageruv
for dependency managementlist_modal_volumes
)Parameters: None
List Volume Contents (list_modal_volume_contents
)
Parameters:
volume_name
: Name of the Modal volumepath
: Path within volume (default: "/")Copy Files (copy_modal_volume_files
)
volume_name
: Name of the Modal volumepaths
: List of paths where last path is destinationExample: ["source.txt", "dest.txt"]
or ["file1.txt", "file2.txt", "dest_dir/"]
Remove Files (remove_modal_volume_file
)
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
)
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
)
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)local_destination
to write file contents to stdoutdeploy_modal_app
)absolute_path_to_app
: Absolute path to the Modal application fileuv
for dependency managementmodal
CLI installed in its virtual environmentAll 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
}
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
MCP Server for managing Modal applications.