rclone mcp

MCP(模型上下文协议)服务器 Rclone RC API。使AI助手能够管理云存储远程、复制/同步文件、列出目录等,所有这些都可以通过自然语言实现。
先决条件
正在运行的rclone远程控制守护进程:
rclone rcd --rc-no-auth
# or with auth:
rclone rcd --rc-user=admin --rc-pass=secret安装
光标/克劳德桌面(stdio)
添加到您的 .cursor/mcp.json 或 claude_desktop_config.json:
{
"mcpServers": {
"rclone": {
"command": "npx",
"args": ["-y", "rclone-mcp"],
"env": {
"RCLONE_URL": "http://localhost:5572"
}
}
}
}通过身份验证
{
"mcpServers": {
"rclone": {
"command": "npx",
"args": ["-y", "rclone-mcp"],
"env": {
"RCLONE_URL": "http://localhost:5572",
"RCLONE_USER": "admin",
"RCLONE_PASS": "secret"
}
}
}
}码头工人
docker build -t rclone-mcp .
docker run -i --rm \
-e RCLONE_URL=http://host.docker.internal:5572 \
rclone-mcp可流式HTTP传输
对于远程托管或基于web的MCP客户端:
npx rclone-mcp http --port 3000配置
环境变量
| 变量 | 描述 | 默认值 |
|---|---|---|
RCLONE_URL | rclone RC守护程序URL | http://localhost:5572 |
RCLONE_USER | HTTP基本身份验证用户名 | -- |
RCLONE_PASS | HTTP基本身份验证密码 | -- |
RCLONE_TOOLSETS | 逗号分隔的工具集列表 | default |
RCLONE_READ_ONLY | 设置为 1 禁用写入工具 | -- |
CLI参数
rclone-mcp [command]
Commands:
rclone-mcp stdio Run with stdio transport (default)
rclone-mcp http Run with Streamable HTTP transport
Options:
--toolsets Comma-separated list of toolsets
--read-only Only expose read-only tools
--port HTTP port (http command only, default: 3000)工具集
工具按API路径前缀分组。仅启用保持工具列表集中所需的功能。
| 工具集 | 路径 | 默认值 |
|---|---|---|
core | /core/*, /rc/* | 是的 |
config | /config/* | 是的 |
operations | /operations/* | 是的 |
sync | /sync/* | 是的 |
jobs | /job/* | 没有 |
vfs | /vfs/* | 没有 |
mount | /mount/* | 没有 |
serve | /serve/* | 没有 |
cache | /cache/* | 没有 |
debug | /debug/* | 没有 |
backend | /backend/* | 没有 |
options | /options/* | 没有 |
plugins | /pluginsctl/* | 没有 |
fscache | /fscache/* | 没有 |
特殊值:
default--四个默认工具集(核心、配置、操作、同步)all--每个工具集
例子
# Default toolsets (55 tools)
npx rclone-mcp
# Everything (98 tools)
RCLONE_TOOLSETS=all npx rclone-mcp
# Just file operations and config
npx rclone-mcp --toolsets operations,config
# Default + mount
npx rclone-mcp --toolsets default,mount
# Read-only mode (no copy, delete, sync, etc.)
npx rclone-mcp --read-only只读模式
当 --read-only 或 RCLONE_READ_ONLY=1 设置后,只注册非变异工具。这不包括文件复制/移动/删除、同步、配置创建、挂载/卸载等操作。有助于为AI助手提供安全、只读的访问权限。
许可证
麻省理工学院
Made with ☁️ for the rclone community

