dav-mcp
Authenticated proxy for forwarding WebDAV requests to DAV servers, supporting CalDAV and CardDAV operations.
README
dav-mcp
An MCP (Model Context Protocol) server written in TypeScript that handles authentication and forwards WebDAV requests to DAV servers. This server acts as an authenticated proxy, allowing MCP clients to send properly-formed WebDAV requests while the server handles authentication.
Features
- WebDAV Request Forwarding: Forward any WebDAV request (PROPFIND, GET, PUT, DELETE, MKCOL, etc.) to configured servers
- Authentication Handling: Support for Basic and Bearer token authentication
- Simple Design: No parsing - just forward requests with authentication headers
- TypeScript: Fully typed implementation with comprehensive error handling
- MCP Integration: Compatible with MCP clients and Claude Desktop
Installation
npm install
npm run build
Usage
As an MCP Server
The server can be used with any MCP-compatible client. For Claude Desktop, add to your configuration:
{
"mcpServers": {
"dav-mcp": {
"command": "node",
"args": ["/path/to/dav-mcp/dist/index.js"]
}
}
}
Available Tools
1. Configure WebDAV Server
Configure a connection to a WebDAV server:
{
"name": "configure_webdav_server",
"arguments": {
"name": "my-server",
"baseUrl": "https://dav.example.com/remote.php/dav/",
"username": "user@example.com",
"password": "your-password",
"authType": "basic"
}
}
2. Test WebDAV Connection
Test if the configured server is accessible:
{
"name": "test_webdav_connection",
"arguments": {
"serverName": "my-server"
}
}
3. WebDAV Request
Forward any WebDAV request to the configured server:
{
"name": "webdav_request",
"arguments": {
"serverName": "my-server",
"method": "PROPFIND",
"path": "/calendars/user@example.com/personal/",
"headers": {
"Content-Type": "application/xml; charset=utf-8",
"Depth": "1"
},
"body": "<?xml version=\"1.0\" encoding=\"utf-8\" ?><d:propfind xmlns:d=\"DAV:\"><d:prop><d:displayname /><d:resourcetype /></d:prop></d:propfind>"
}
}
Supported WebDAV Methods
The server can forward any HTTP method, including WebDAV-specific methods:
- GET: Retrieve resources
- PUT: Create/update resources
- DELETE: Remove resources
- PROPFIND: Get properties of resources
- PROPPATCH: Modify properties of resources
- MKCOL: Create collections (folders)
- COPY: Copy resources
- MOVE: Move resources
- LOCK: Lock resources
- UNLOCK: Unlock resources
- REPORT: Extended queries (CalDAV/CardDAV)
Example WebDAV Operations
List Calendars (CalDAV)
{
"name": "webdav_request",
"arguments": {
"serverName": "my-server",
"method": "PROPFIND",
"path": "/calendars/user@example.com/",
"headers": {
"Content-Type": "application/xml; charset=utf-8",
"Depth": "1"
},
"body": "<?xml version=\"1.0\" encoding=\"utf-8\" ?><d:propfind xmlns:d=\"DAV:\" xmlns:c=\"urn:ietf:params:xml:ns:caldav\"><d:prop><d:displayname /><d:resourcetype /><c:calendar-description /></d:prop></d:propfind>"
}
}
Get Calendar Events
{
"name": "webdav_request",
"arguments": {
"serverName": "my-server",
"method": "REPORT",
"path": "/calendars/user@example.com/personal/",
"headers": {
"Content-Type": "application/xml; charset=utf-8",
"Depth": "1"
},
"body": "<?xml version=\"1.0\" encoding=\"utf-8\" ?><c:calendar-query xmlns:d=\"DAV:\" xmlns:c=\"urn:ietf:params:xml:ns:caldav\"><d:prop><d:getetag /><c:calendar-data /></d:prop><c:filter><c:comp-filter name=\"VCALENDAR\"><c:comp-filter name=\"VEVENT\"></c:comp-filter></c:comp-filter></c:filter></c:calendar-query>"
}
}
List Address Books (CardDAV)
{
"name": "webdav_request",
"arguments": {
"serverName": "my-server",
"method": "PROPFIND",
"path": "/addressbooks/user@example.com/",
"headers": {
"Content-Type": "application/xml; charset=utf-8",
"Depth": "1"
},
"body": "<?xml version=\"1.0\" encoding=\"utf-8\" ?><d:propfind xmlns:d=\"DAV:\" xmlns:card=\"urn:ietf:params:xml:ns:carddav\"><d:prop><d:displayname /><d:resourcetype /><card:addressbook-description /></d:prop></d:propfind>"
}
}
Supported DAV Servers
This MCP server works with any WebDAV-compatible server, including:
- Nextcloud: Full CalDAV/CardDAV support
- ownCloud: Calendar and contacts
- Radicale: Lightweight CalDAV/CardDAV server
- Apple Calendar/Contacts Server: macOS Server
- Google Calendar/Contacts: Via DAV interface (with app passwords)
- Generic WebDAV: Any RFC 4918 compliant server
Authentication
Basic Authentication
Username and password authentication:
{
"authType": "basic",
"username": "your-username",
"password": "your-password"
}
Bearer Token Authentication
For OAuth or API token authentication:
{
"authType": "bearer",
"token": "your-access-token"
}
Development
Building
npm run build
Testing
npm test
Development Mode
npm run dev
Linting
npm run lint
Architecture
The server is designed as a simple authenticated proxy:
src/index.ts: Main MCP server implementation with 3 toolssrc/types/: TypeScript type definitionssrc/utils/dav-client.ts: WebDAV client for authenticated request forwardingsrc/__tests__/: Test files
Design Philosophy
This server follows the principle of simplicity:
- No Parsing: The server doesn't parse or interpret WebDAV responses
- Raw Forwarding: Requests are forwarded exactly as received from the client
- Authentication Only: The server only adds authentication headers
- Client Responsibility: MCP clients must send properly-formed WebDAV requests
This approach provides maximum flexibility and compatibility with any WebDAV server while keeping the server implementation simple and reliable.
Security Notes
- Credentials are stored in memory only during the session
- HTTPS is recommended for all DAV server connections
- Bearer tokens should be preferred over basic auth when available
License
ISC
Contributing
Contributions are welcome! Please ensure all tests pass and follow the existing code style.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。