Home / MCP / WebDAV MCP Server
Exposes WebDAV file operations as MCP resources and tools for CRUD interactions over stdio or HTTP/SSE.
Configuration
View docs{
"mcpServers": {
"webdav": {
"command": "npx",
"args": [
"-y",
"webdav-mcp-server"
],
"env": {
"WEBDAV_ROOT_URL": "<WEBDAV_ROOT_URL>",
"WEBDAV_ROOT_PATH": "<WEBDAV_ROOT_PATH>",
"WEBDAV_AUTH_ENABLED": "true|false",
"WEBDAV_USERNAME": "<WEBDAV_USERNAME>",
"WEBDAV_PASSWORD": "<WEBDAV_PASSWORD>",
"AUTH_ENABLED": "true|false",
"AUTH_USERNAME": "<AUTH_USERNAME>",
"AUTH_PASSWORD": "<AUTH_PASSWORD>",
"AUTH_REALM": "<AUTH_REALM>"
}
}
}
}You can connect a WebDAV file system to Claude Desk/other MCP clients through this WebDAV MCP Server. It exposes WebDAV operations as MCP resources and tools, allowing you to perform CRUD actions on files and directories using natural language or scripted prompts. You can run it in stdio mode for Claude Desktop integration or in HTTP/SSE mode for web-based clients, with optional authentication for both WebDAV and MCP access.
Start by choosing your transport: stdio for Claude Desktop or HTTP/SSE for a web-based workflow. In stdio mode, you run the MCP server as a local process and connect via the Claude integration or your own client. In HTTP mode, you expose the MCP API over HTTP so clients can communicate using standard web protocols.
Once running, you can list, read, create, update, move, copy, and delete files and directories on your WebDAV server through MCP prompts and tools. For Claude Desktop, configure the MCP connection to launch the server process and pass the required WebDAV connection details securely. You can also run the server from source or via a Docker container if you prefer containerized deployment.
Prerequisites: you need Node.js 18 or later and npm or yarn. You also need access to a WebDAV server to perform real operations.
Option 1: Install from npm package
# Global installation
npm install -g webdav-mcp-server
# Or with npx
npx webdav-mcp-serverCreate a configuration file with WebDAV and MCP settings. WebDAV password must be plain text, while MCP server authentication can use a bcrypt hash. You can optionally enable basic authentication for both the WebDAV connection and the MCP server.
# Example .env file
# WebDAV configuration
WEBDAV_ROOT_URL=http://localhost:4080
WEBDAV_ROOT_PATH=/webdav
# WebDAV authentication (optional)
WEBDAV_AUTH_ENABLED=true
WEBDAV_USERNAME=admin
WEBDAV_PASSWORD=password # plain text
# MCP server authentication (optional)
AUTH_ENABLED=true
AUTH_USERNAME=user
AUTH_PASSWORD=pass
AUTH_REALM=MCP WebDAV Server
# If you prefer bcrypt for MCP auth, use a hash:
# AUTH_PASSWORD={bcrypt}$2y$10$CyLKnUwn9fqqKQFEbxpZFuE9mzWR/x8t6TE7.CgAN0oT8I/5jKJByYou can run the MCP server in two ways. Use stdio transport for direct Claude Desktop integration or run HTTP transport for web clients that support Server-Sent Events.
# Running with npx (stdio, no authentication shown here)
# Command is launched to connect via stdio
npx webdav-mcp-server -y
# Running with node after building from source (stdio)
node dist/index.js
# Running with HTTP transport (example, http flag shown in start commands)
webdav-mcp-server --httpThe quickest way to get started with both WebDAV and MCP is via Docker Compose. This setup runs a WebDAV server and the MCP server together in containers.
# Start both WebDAV and MCP servers
cd docker
docker-compose up -dCreate a new file on a remote WebDAV server via MCP command or prompt.
Retrieve the content of a remote WebDAV file via MCP.
Update an existing remote WebDAV file on the WebDAV server.
Delete a file or directory on the remote WebDAV server.
Create a new directory on a remote WebDAV server.
Move or rename a remote item on the WebDAV server.
Copy a file or directory to a new location on the WebDAV server.
List contents of a remote directory on the WebDAV server.