
laubplusco/mcp-webdav-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Model Context Protocol (MCP) server that enables CRUD operations on a WebDAV endpoint with basic authentication.
개요
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. - 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 - Node.js 18 or later - npm or yarn - WebDAV server (for actual file operations) Create a .
README
원문 README의 일부입니다. 원문 보기.
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
# Global installation
npm install -g webdav-mcp-server
# Or with npx
npx webdav-mcp-server
Option 2: Clone and build from source
# Clone repository
git clone https://github.com/yourusername/webdav-mcp-server.git
cd webdav-mcp-server
# Install dependencies
npm install
# Build the application
npm run build
Option 3: Docker
# Build the Docker image
docker build -t webdav-mcp-server .
# Run the container without authentication
docker run -p 3000:3000 \
-e WEBDAV_ROOT_URL=http://your-webdav-server \
-e WEBDAV_ROOT_PATH=/webdav \
webdav-mcp-server
# Run the container with authentication for both WebDAV and 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
Configuration
Create a .env file in the root directory with the following variables:
# WebDAV configuration
WEBDAV_ROOT_URL=http://localhost:4080
WEBDAV_ROOT_PATH=/webdav
# WebDAV authentication (optional)
WEBDAV_AUTH_ENABLED=true
WEBDAV_USERNAME=admin
# WebDAV password must be plain text (required when auth enabled)
# The WebDAV protocol requires sending the actual password to the server
WEBDAV_PASSWORD=password
# Server configuration (for HTTP mode)
SERVER_PORT=3000
# Authentication configuration for MCP server (optional)
AUTH_ENABLED=true
AUTH_USERNAME=user
AUTH_PASSWORD=pass
AUTH_REALM=MCP WebDAV Server
# Auth password for MCP server can be a bcrypt hash (unlike WebDAV passwords)
# AUTH_PASSWORD={bcrypt}$2y$10$CyLKnUwn9fqqKQFEbxpZFuE9mzWR/x8t6TE7.CgAN0oT8I/5jKJBy
Encrypted Passwords for MCP Server Authentication
For enhanced security of the MCP server (not WebDAV connections), you can use bcrypt-encrypted passwords instead of storing them in plain text:
설치
npx -y webdav-mcp-server설정
{
"mcpServers": {
"webdav": {
"command": "npx",
"args": [
"-y",
"webdav-mcp-server"
],
"env": {
"WEBDAV_ROOT_URL": "<WEBDAV_ROOT_URL>",
"WEBDAV_ROOT_PATH": "<WEBDAV_ROOT_PATH>",
"WEBDAV_USERNAME": "<WEBDAV_USERNAME>",
"WEBDAV_PASSWORD": "<WEBDAV_PASSWORD>",
"WEBDAV_AUTH_ENABLED": "true|false"
}
}
}
}