Modal MCP Server
Interact with Modal volumes and deploy Modal applications from within Cursor.
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-server
- Install dependencies using
uv:
uv sync
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 manager- Modal CLI configured with valid credentials
- For Modal deploy support:
- Project being deployed must use
uvfor dependency management - Modal must be installed in the project's virtual environment
- Project being deployed must use
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 management - Have the
modalCLI installed in its virtual environment
- Use
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.
Related Servers
Databox MCP
Talk to your data with Databox MCP by enabling agentic analytics, automated data ingestion, and real-time conversational analytics to get proactive recommendations and instant BI answers, not just charts.
Kubernetes MCP
A read-only MCP server for retrieving information and diagnosing issues in Kubernetes clusters.
Remote MCP Server on Cloudflare
A self-hostable MCP server for Cloudflare Workers with OAuth login support, using Cloudflare KV for storage.
Coolify
Integrate with the Coolify API to manage your servers, applications, and databases.
CData Twitter Ads
An MCP server for accessing Twitter Ads data, powered by the CData JDBC Driver.
Google Ads
MCP server acting as an interface to the Google Ads, enabling programmatic access to Google Ads data and management features.
Ntropy MCP server
Enrich banking data using the Ntropy API.
CData Salesloft Server
A read-only MCP server by CData that enables LLMs to query live data from Salesloft.
LeadFuze MCP Server
Enrich contacts and companies via email/LinkedIn enrichment and email validation through LeadFuze (API key required).
Ultrahuman
Fetch health and fitness metrics like heart rate, sleep, and steps from the Ultrahuman API.