Zimbra MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Zimbra MCP Server
MCP (Model Context Protocol) server for Zimbra to manage emails, tags, calendar, and contacts.
Installation
cd ~/Projets/MCP/zimbra-mcp
# With uv
uv sync
# Or with pip
pip install -e .Related MCP server: Zoho Mail MCP
Configuration
Create a .env file from the example:
cp .env.example .envConfigure your Zimbra credentials:
ZIMBRA_URL=https://zimbra.example.com/service/soap
ZIMBRA_USER=me@example.com
ZIMBRA_PASSWORD=your_password
ZIMBRA_TIMEOUT=30
ZIMBRA_ENABLE_SEND=falseVariable | Description | Default |
| Zimbra SOAP endpoint URL | (required) |
| Zimbra account email | (required) |
| Zimbra account password | (required) |
| Request timeout in seconds |
|
| Enable |
|
Usage
Start the server
uv run zimbra-mcpTest with MCP Inspector
mcp dev src/zimbra_mcp/server.pyAvailable Tools
Emails
Tool | Description |
| Search with Zimbra syntax (in:inbox, from:, tag:, etc.) |
| Retrieve an email by ID with full body |
| Download an attachment to a local file |
| List all mail folders |
| Search for a folder by name or path (case-insensitive partial match) |
| Move emails to a folder |
| Mark emails as read or unread |
| Delete emails (soft delete to Trash, or hard delete) |
| Create a draft with optional reply/forward support |
| Send an email directly (opt-in, requires |
Reply & Forward Drafts
create_draft and send_email support linking to an original message for replies and forwards:
Parameter | Description |
| ID of the original message |
|
|
|
|
Examples:
Simple draft:
create_draft(to=[...], subject="...", body="...")Reply with quote:
create_draft(to=[...], subject="Re: ...", body="...", orig_msg_id="123", reply_type="r", include_original="inline")Forward as attachment:
create_draft(to=[...], subject="Fwd: ...", body="...", orig_msg_id="123", reply_type="w", include_original="attachment")
Zimbra Search Syntax
Basic operators:
in:inbox- Emails in inboxfrom:john@example.com- Emails from Johnto:me- Emails sent to metag:important- Emails with "important" tagsubject:meeting- Subject containing "meeting"has:attachment- Emails with attachmentsafter:2024-01-01 before:2024-12-31- Date range (ISO or MM/DD/YYYY)is:unread- Unread emailsis:flagged- Flagged emails
Boolean operators:
from:john OR from:mary- Emails from John OR MaryNOT is:reador-is:read- Unread emails (exclusion)(from:john OR from:mary) subject:urgent- Parentheses for grouping
Combinations: in:inbox from:boss tag:urgent is:unread
Contacts
Tool | Description |
| Search contacts (all fields). Use |
| Retrieve a contact by ID |
| Create a contact (name, email, phone, company, etc.) |
| Update specific fields of an existing contact |
| Delete one or more contacts |
Tags
Tool | Description |
| List all tags with colors |
| Create a tag (name, color) |
| Delete a tag |
| Add a tag to emails |
| Remove a tag |
Available colors: blue, cyan, green, purple, red, yellow, pink, gray, orange
Calendar
Tool | Description |
| Events over a period |
| Full details of an event |
| Create an event |
| User availability |
Development
Running tests
# Install test dependencies
uv sync --extra test
# Run tests
uv run pytest
# Verbose output
uv run pytest -vTest structure
Tests use unittest.mock to mock the Zimbra SOAP client, so no Zimbra server is needed. The capture_tools fixture in conftest.py intercepts @mcp.tool() decorators to access tool functions directly.
Claude Code Integration
Add to your MCP configuration (~/.claude/settings.json):
{
"mcpServers": {
"zimbra": {
"command": "uv",
"args": ["run", "--directory", "/home/me/Projets/MCP/zimbra-mcp", "zimbra-mcp"],
"env": {
"ZIMBRA_URL": "https://zimbra.example.com/service/soap",
"ZIMBRA_USER": "me@example.com",
"ZIMBRA_PASSWORD": "your_password"
}
}
}
}Project Structure
zimbra-mcp/
├── pyproject.toml
├── README.md
├── CLAUDE.md
├── .env.example
├── src/
│ └── zimbra_mcp/
│ ├── __init__.py
│ ├── server.py # FastMCP entry point
│ ├── config.py # Configuration
│ ├── client.py # Zimbra SOAP client
│ ├── errors.py # Exceptions
│ └── tools/
│ ├── __init__.py
│ ├── emails.py # Email tools
│ ├── tags.py # Tag tools
│ ├── contacts.py # Contact tools
│ └── calendar.py # Calendar tools
└── tests/
├── conftest.py # Shared fixtures
├── test_config.py
├── test_errors.py
├── test_client.py
└── tools/
├── test_emails.py
├── test_tags.py
├── test_contacts.py
└── test_calendar.pyThis server cannot be deployed
Maintenance
Related MCP Connectors
Search connected email, read and manage messages, draft and send, and manage rules for new mail.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.10314 npm11MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, search, send, and reply to Zoho Mail via IMAP/SMTP using an application-specific password.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, send, search, reply to, and delete emails directly from a Zoho Mail account.8MIT
- AlicenseAqualityDmaintenanceEnables reading, sending, and managing emails via IMAP/SMTP through natural language, including listing folders, searching, moving emails, and sending attachments.84 npmMIT