mcp-webdav
WebDAV 文件管理 MCP 服务器,基于 webdav4。
配置(环境变量)
| 环境变量 | 必填 | 默认 | 说明 |
|---|---|---|---|
WEBDAV_URL |
是 | — | WebDAV 服务基础 URL,如 https://dav.jianguoyun.com/dav/ |
WEBDAV_USERNAME |
否 | — | Basic Auth 用户名(需与 WEBDAV_PASSWORD 同时设置) |
WEBDAV_PASSWORD |
否 | — | Basic Auth 密码(需与 WEBDAV_USERNAME 同时设置) |
WEBDAV_TIMEOUT |
否 | 30 |
请求超时秒数 |
配置校验延迟到工具调用时:缺失配置不会导致服务器启动失败,调用相应工具时返回错误信息。
工具
所有路径均相对于 WEBDAV_URL。read/write 仅支持文本(UTF-8);二进制文件请用 download/upload(经本地磁盘进出,不占用模型上下文)或 copy/move(远端搬运)。
| 工具 | 说明 |
|---|---|
list(path=".") |
列出目录条目(name/type/size/modified),返回 JSON |
read(path) |
读取文本文件;遇到二进制文件报错并提示大小 |
write(path, content) |
写入文本文件(存在则覆盖);父目录不存在时提示先 mkdir |
delete(path) |
删除文件或目录(递归) |
mkdir(path) |
创建目录 |
move(src, dst) |
移动/重命名 |
copy(src, dst) |
复制 |
stat(path) |
查询单个路径元数据,返回 JSON |
download(path, local_path) |
下载远程文件到本地路径,支持任意类型 |
upload(local_path, path) |
上传本地文件到远程路径(存在则覆盖),支持任意类型 |
Claude Code 配置示例(坚果云)
发布到 PyPI 后,使用 uvx(自动拉取并缓存到隔离环境):
{
"mcpServers": {
"webdav": {
"command": "uvx",
"args": ["mcp-webdav"],
"env": {
"WEBDAV_URL": "https://dav.jianguoyun.com/dav/",
"WEBDAV_USERNAME": "your-account@example.com",
"WEBDAV_PASSWORD": "your-app-password"
}
}
}
}
发布前或本地开发,从仓库 workspace 运行:
{
"mcpServers": {
"webdav": {
"command": "uv",
"args": ["run", "--package", "mcp-webdav", "mcp-webdav"],
"env": {
"WEBDAV_URL": "https://dav.jianguoyun.com/dav/",
"WEBDAV_USERNAME": "your-account@example.com",
"WEBDAV_PASSWORD": "your-app-password"
}
}
}
}
开发
uv sync --all-packages
uv run --package mcp-webdav pytest mcp_servers/mcp_webdav/tests
Metadata
Release files for mcp-webdav 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_webdav-0.1.0.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_webdav-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / mcp_webdav-0.1.0.tar.gz
| Download URL | mcp_webdav-0.1.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c3de62f725da16b51fcf96eaa6246569a8326a9932133e06f78a73e9af59099
|
|
BLAKE2b-256 checksum How to use checksums |
bdd7f463d8d7ec8c347139f80729678cf720529a3c21d901abb131d720f2603f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / mcp_webdav-0.1.0-py3-none-any.whl
| Download URL | mcp_webdav-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df2984f3bb47770a8d7bfb91567b2477e8da4e6491c1a222a7e638ceb9b8368a
|
|
BLAKE2b-256 checksum How to use checksums |
17a8eda38f740a4c158d9738fbeb5ce0bcdaba216629054b946d88769ba59946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log