home / mcp / modal mcp server

Modal MCP Server

MCP Server for managing Modal applications

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "smehmood-modal-mcp-server": {
      "command": "uv",
      "args": [
        "--project",
        "/path/to/modal-mcp-server",
        "run",
        "/path/to/modal-mcp-server/src/modal_mcp/server.py"
      ]
    }
  }
}

This MCP server enables you to interact with Modal volumes and deploy Modal applications directly from Cursor. It provides a programmatic interface to list and manage Modal volumes, transfer files, and deploy Modal apps inside a controlled environment, making it easier to automate workflows within Cursor.

How to use

You use this MCP server by running it as a local process and exposing a standardized set of operations to your MCP client. You can list volumes, inspect and modify their contents, transfer files in and out, and deploy Modal applications. Each operation returns a structured response indicating success and any data or logs produced during the action.

How to install

Prerequisites You need Python 3.11 or higher and the uv package manager installed on your system. You also should have the Modal CLI configured with valid credentials to enable deployment features.

Install steps Follow these steps to set up the MCP server locally and make it available to Cursor.

Clone the server repository to a location on your machine. This step prepares the source for use with the uv tool and Cursor.

Install dependencies with uv to complete the setup before running.

Configure Cursor to use the MCP server by adding a configuration block that points to the local server executable and script.

Additional notes and configuration

Configuration details you will use in Cursor map to a local MCP server. The following example shows how to reference the local project path and specify the command and arguments required to start the server.

{
  "mcpServers": {
    "modal_mcp": {
      "command": "uv",
      "args": [
        "--project", "/path/to/modal-mcp-server",
        "run", "/path/to/modal-mcp-server/src/modal_mcp/server.py"
      ]
    }
  }
}

Security and notes

Ensure the Modal CLI credentials are securely managed and not shared. The MCP server relies on the local environment to access Modal resources, so protect your API keys and session tokens accordingly.

Examples of capabilities

Modal Volume Operations include listing volumes, inspecting contents, copying, removing, uploading, and downloading files within Modal volumes. Modal Deployment supports deploying a Modal app from a given absolute path, given the project uses uv for dependency management and has the modal CLI installed in its virtual environment.

Troubleshooting

If you encounter connection or permission errors, verify that the uv project path and the server script path are correct, that Python 3.11+ is installed, and that the Modal CLI is configured correctly in your environment. Check for missing dependencies and ensure your environment variables required by Modal are available to the process running the MCP server.

Available tools

list_modal_volumes

Lists all Modal volumes in your environment and returns JSON-formatted information about each volume.

list_modal_volume_contents

Lists files and directories inside a specified Modal volume; accepts a volume name and an optional path (default is "/").

copy_modal_volume_files

Copies files within a Modal volume given a list of source paths and a destination path.

remove_modal_volume_file

Deletes a file or directory from a Modal volume with an option for recursive deletion.

put_modal_volume_file

Uploads a local file or directory into a Modal volume at a specified destination.

get_modal_volume_file

Downloads a file or directory from a Modal volume to a local destination, with an option to write to stdout.

deploy_modal_app

Deploys a Modal application from an absolute path, ensuring the project uses uv for dependencies and has modal CLI installed in its virtual environment.