local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
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.
模态 MCP 服务器
用于与 Modal 卷交互并从 Cursor 内部部署 Modal 应用程序的 MCP 服务器实现。
安装
- 克隆此存储库:
- 使用
uv
安装依赖项:
配置
要在 Cursor 中使用此 MCP 服务器,请将以下配置添加到您的~/.cursor/mcp.json
:
将/path/to/modal-mcp-server
替换为克隆存储库的绝对路径。
要求
- Python 3.11 或更高版本
uv
包管理器- 使用有效凭证配置的模态 CLI
- 对于模态部署支持:
- 正在部署的项目必须使用
uv
进行依赖管理 - Modal 必须安装在项目的虚拟环境中
- 正在部署的项目必须使用
支持的工具
模态体积操作
- 列出模态体积(
list_modal_volumes
)- 列出您环境中的所有 Modal 卷
- 返回 JSON 格式的卷信息
- 参数:无
- 列出卷内容(
list_modal_volume_contents
)- 列出 Modal 卷中的文件和目录
- 参数:
volume_name
:Modal卷的名称path
:卷内的路径(默认值:“/”)
- 复制文件(
copy_modal_volume_files
)- 复制 Modal 卷内的文件
- 参数:
volume_name
:Modal卷的名称paths
:最后一条路径为目的地的路径列表
- 例如:
["source.txt", "dest.txt"]
或["file1.txt", "file2.txt", "dest_dir/"]
- 删除文件(
remove_modal_volume_file
)- 从 Modal 卷中删除文件或目录
- 参数:
volume_name
:Modal卷的名称remote_path
:要删除的文件/目录的路径recursive
:递归删除的布尔标志(默认值:false)
- 上传文件(
put_modal_volume_file
)- 将文件或目录上传到 Modal 卷
- 参数:
volume_name
:Modal卷的名称local_path
:要上传的本地文件/目录的路径remote_path
:要上传到的卷路径(默认值:“/”)force
:布尔标志,用于覆盖现有文件(默认值:false)
- 下载文件(
get_modal_volume_file
)- 从 Modal 卷下载文件
- 参数:
volume_name
:Modal卷的名称remote_path
:要下载的卷中的文件/目录的路径local_destination
:保存下载文件的本地路径(默认值:当前目录)force
:布尔标志,用于覆盖现有文件(默认值:false)
- 注意:使用“-”作为
local_destination
将文件内容写入 stdout
模态部署
- 部署模态应用程序(
deploy_modal_app
)- 部署一个 Modal 应用程序
- 参数:
absolute_path_to_app
:Modal 应用程序文件的绝对路径
- 注意:包含 Modal 应用的项目必须:
- 使用
uv
进行依赖管理 - 在其虚拟环境中安装
modal
CLI
- 使用
响应格式
所有工具都以标准化格式返回响应,但根据操作类型的不同略有不同:
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
This server cannot be installed
MCP 服务器使 AI 代理能够与 Modal 交互,从而允许它们在无服务器云环境中部署应用程序和运行功能。