WebDAV MCP Server

by LaubPlusCo

17 369 downloads Not rated yet MIT

About

Model Context Protocol (MCP) server that enables CRUD operations on a WebDAV endpoint with basic authentication.

Details

License
MIT

Explore

- Connect to any WebDAV server with optional authentication
- Perform CRUD operations on files and directories
- Expose file operations as MCP resources and tools
- Run via stdio transport (for Claude Desktop integration) or HTTP/SSE transport
- Secure access with optional basic authentication
- Support for bcrypt-encrypted passwords for MCP server authentication (WebDAV passwords must be plain text due to protocol limitations)
- Connection pooling for better performance with WebDAV servers
- Configuration validation using Zod
- Structured logging for better troubleshooting

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name WebDAV MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Node.js 18 or later
- npm or yarn
- WebDAV server (for actual file operations)


npm install -g webdav-mcp-server

npm install

docker run -p 3000:3000 \
-e WEBDAV_ROOT_URL=http://your-webdav-server \
-e WEBDAV_ROOT_PATH=/webdav \
webdav-mcp-server

docker run -p 3000:3000 \
-e WEBDAV_ROOT_URL=http://your-webdav-server \
-e WEBDAV_ROOT_PATH=/webdav \
-e WEBDAV_AUTH_ENABLED=true \
-e WEBDAV_USERNAME=admin \
-e WEBDAV_PASSWORD=password \
-e AUTH_ENABLED=true \
-e AUTH_USERNAME=user \
-e AUTH_PASSWORD=pass \
webdav-mcp-server

WEBDAV_ROOT_URL=http://localhost:4080
WEBDAV_ROOT_PATH=/webdav

WEBDAV_AUTH_ENABLED=true
WEBDAV_USERNAME=admin

SERVER_PORT=3000

AUTH_ENABLED=true
AUTH_USERNAME=user
AUTH_PASSWORD=pass
AUTH_REALM=MCP WebDAV Server

For enhanced security of the MCP server (not WebDAV connections), you can use bcrypt-encrypted passwords instead of storing them in plain text:

1. Generate a bcrypt hash:


This mode is ideal for direct integration with Claude Desktop.

bash

webdav-mcp-server

This mode enables the server to be accessed over HTTP with Server-Sent Events for real-time communication.


The easiest way to get started with both the WebDAV server and the MCP server is to use Docker Compose:

bash

The webdav_config.yml file configures the hacdias/webdav server used in the Docker Compose setup. Here's what you can customize:


You can also use this package programmatically in your own projects:

javascript
import { startWebDAVServer } from 'webdav-mcp-server';

// For stdio transport without authentication
await startWebDAVServer({
webdavConfig: {
rootUrl: 'http://your-webdav-server',
rootPath: '/webdav',
authEnabled: false
},
useHttp: false
});

// For stdio transport with WebDAV authentication (password must be plain text)
await startWebDAVServer({
webdavConfig: {
rootUrl: 'http://your-webdav-server',
rootPath: '/webdav',
authEnabled: true,
username: 'admin',
password: 'password'
},
useHttp: false
});

// With bcrypt hash for MCP server password (HTTP auth only)
await startWebDAVServer({
webdavConfig: {
rootUrl: 'http://your-webdav-server',
rootPath: '/webdav',
authEnabled: true,
username: 'admin',
password: 'password' // WebDAV password must be plain text
},
useHttp: true,
httpConfig: {
port: 3000,
auth: {
enabled: true,
username: 'user',
password: '{bcrypt}$2y$10$CyLKnUwn9fqqKQFEbxpZFuE9mzWR/x8t6TE7.CgAN0oT8I/5jKJBy'
}
}
});

// For HTTP transport with MCP authentication
await startWebDAVServer({
webdavConfig: {
rootUrl: 'http://your-webdav-server',
rootPath: '/webdav',
authEnabled: true,
username: 'admin',
password: 'password'
},
useHttp: true,
httpConfig: {
port: 3000,
auth: {
enabled: true,
username: 'user',
password: 'pass',
realm: 'MCP WebDAV Server'
}
}
});

// For HTTP transport without authentication
await startWebDAVServer({
webdavConfig: {
rootUrl: 'http://your-webdav-server',
rootPath: '/webdav',
authEnabled: false
},
useHttp: true,
httpConfig: {
port: 3000,
auth: {
enabled: false
}
}
});
```

webdav_create_remote_file

Create a new file on a remote WebDAV server at the specified path

webdav_get_remote_file

Retrieve content from a file stored on a remote WebDAV server

webdav_update_remote_file

Update an existing file on a remote WebDAV server with new content

webdav_delete_remote_item

Delete a file or directory from a remote WebDAV server

webdav_create_remote_directory

Create a new directory on a remote WebDAV server

webdav_move_remote_item

Move or rename a file or directory on a remote WebDAV server

webdav_copy_remote_item

Copy a file or directory to a new location on a remote WebDAV server

webdav_list_remote_directory

List files and directories at the specified path on a remote WebDAV server

- webdav_create_remote_file - Create a new file on a remote WebDAV server
- webdav_get_remote_file - Retrieve content from a file stored on a remote WebDAV server
- webdav_update_remote_file - Update an existing file on a remote WebDAV server
- webdav_delete_remote_item - Delete a file or directory from a remote WebDAV server
- webdav_create_remote_directory - Create a new directory on a remote WebDAV server
- webdav_move_remote_item - Move or rename a file/directory on a remote WebDAV server
- webdav_copy_remote_item - Copy a file/directory to a new location on a remote WebDAV server
- webdav_list_remote_directory - List files and directories on a remote WebDAV server

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "webdav mcp server": {
            "mpc-webdav-server": {
                "command": "npx",
                "args": [
                    "webdav-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "mpc-webdav-server": {
        "command": "npx",
        "args": [
            "webdav-mcp-server"
        ]
    }
}

A Model Context Protocol (MCP) server that enables CRUD operations on a WebDAV endpoint with basic authentication. This server enables Claude Desktop and other MCP clients to interact with WebDAV file systems through natural language commands.

Features

- Connect to any WebDAV server with optional authentication
- Perform CRUD operations on files and directories
- Expose file operations as MCP resources and tools
- Run via stdio transport (for Claude Desktop integration) or HTTP/SSE transport
- Secure access with optional basic authentication
- Support for bcrypt-encrypted passwords for MCP server authentication (WebDAV passwords must be plain text due to protocol limitations)
- Connection pooling for better performance with WebDAV servers
- Configuration validation using Zod
- Structured logging for better troubleshooting

Prerequisites

- Node.js 18 or later
- npm or yarn
- WebDAV server (for actual file operations)

Installation

Option 1: Install from npm package

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.