Python MCP server for IMAP/SMTP email, WebDAV, and CalDAV
Project description
mcp-email-webdav-caldav
Python MCP server for IMAP/SMTP email, WebDAV, and CalDAV.
Package Run
Publish the package to PyPI as mcp-email-webdav-caldav, then run it without cloning this repository:
For Claude:
claude-glm-5 mcp add --scope user mail-webdav-caldav \
--env MCP_SERVER_FULL_NAME=personal \
--env MCP_SERVER_FULL_NAME=Иван Иванов \
--env MCP_SERVER_EMAIL_ADDRESS=ivan@inbox.ru \
--env MCP_SERVER_PASSWORD=token \
-- uvx mcp-email-webdav-caldav
For Codex:
[mcp_servers.mail-webdav-python]
command = "uvx"
args = ["mcp-email-webdav-caldav"]
enabled = true
[mcp_servers.mail-webdav-python.env]
MCP_SERVER_FULL_NAME = "Jane Doe"
MCP_SERVER_EMAIL_ADDRESS = "jane@example.com"
MCP_SERVER_PASSWORD = "app_password_here"
Equivalent one-off run:
uvx mcp-email-webdav-caldav
Or install the package once and run the console script:
pipx install mcp-email-webdav-caldav
Then Codex can use:
command = "mcp-email-webdav-caldav"
args = []
Ready-made examples:
Build And Publish
Build source and wheel distributions:
uv build
Publish to PyPI:
uv publish
After publishing a new version, restart Codex so uvx creates or refreshes the package environment. To pin a specific version:
args = ["mcp-email-webdav-caldav==0.2.0"]
Runtime Environment Variables
Required:
MCP_SERVER_FULL_NAMEMCP_SERVER_EMAIL_ADDRESSMCP_SERVER_PASSWORD
MCP_SERVER_EMAIL_ADDRESS and MCP_SERVER_PASSWORD are reused as credentials for Email, WebDAV, and CalDAV.
Service Constants
Provider-specific settings live in src/mcp_email_webdav_caldav/constants.py:
- Email IMAP/SMTP host, port, SSL, sent-folder, and attachment-download settings.
- WebDAV account name, base URL, description, SSL verification, download, and upload settings.
- CalDAV account name, base URL, description, SSL verification, and write settings.
Email, WebDAV, and CalDAV accounts can also be saved to ~/.config/zerolib/mcp_email_webdav_caldav/config.json via the add_email_account, add_webdav_account, and add_caldav_account tools. Override the file location with MCP_EMAIL_WEBDAV_CALDAV_CONFIG_PATH.
Tools
Email:
add_email_accountlist_available_accountslist_mailboxeslist_emails_metadataget_emails_contentsend_emaildelete_emailsdownload_attachment
WebDAV:
add_webdav_accountlist_webdav_accountswebdav_listwebdav_get_textwebdav_download_filewebdav_put_textwebdav_upload_filewebdav_mkdirwebdav_deletewebdav_movewebdav_copy
CalDAV:
add_caldav_accountlist_caldav_accountscaldav_list_calendarscaldav_list_eventscaldav_get_eventcaldav_put_eventcaldav_create_eventcaldav_delete_event
list_emails_metadata returns mailbox together with each email_id; pass the same mailbox to get_emails_content, delete_emails, and download_attachment. Set all_mailboxes=true to search every selectable IMAP folder.
webdav_download_file and webdav_upload_file are disabled by default because they read/write local files. Enable them explicitly in constants.py.
caldav_put_event, caldav_create_event, and caldav_delete_event are disabled by default because they modify remote calendars. Enable them explicitly in constants.py.
Test
PYTHONPATH=src python3 -m unittest discover -s tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_email_webdav_caldav-0.2.0.tar.gz.
File metadata
- Download URL: mcp_email_webdav_caldav-0.2.0.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15750d0dd647c5b25445044b8be189801ff561a5e3040789344c7b50392de59d
|
|
| MD5 |
8d3042bfbdbeac1530110bfb774532f6
|
|
| BLAKE2b-256 |
968698bbf1ada0b8f5ac4cc91c76caf519c8507de10b64e020d43a43d0d28f26
|
File details
Details for the file mcp_email_webdav_caldav-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mcp_email_webdav_caldav-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d1398faccdf5c8da50819aed52d1f66809207e978085133ea2e5d17be08442f
|
|
| MD5 |
b910bc8f07fb2415857ba259f8c0cd99
|
|
| BLAKE2b-256 |
a8538e8f72f011a120b4c3566bbacf0f72537326a4e17b4016870da2e92dc77b
|