Skip to main content
Glama

Mailcow MCP Server

by leolilley

📧 Mailcow MCP Server

Model Context Protocol (MCP) server for complete Mailcow email server management

A comprehensive TypeScript implementation that provides AI models with full control over Mailcow email servers through the Model Context Protocol. Manage domains, mailboxes, queues, sync jobs, and send emails - all with a single, secure API.

✨ Features

🎯 Complete Email Management - 20 MCP tools for full Mailcow control
🔒 Enterprise Security - API key authentication with granular permissions
High Performance - Built with TypeScript for speed and reliability
📊 Comprehensive Logging - Full audit trail and monitoring capabilities
🧪 Well Tested - Extensive test suite with >85% coverage on core modules
🚀 Production Ready - Used in production environments

🚀 Quick Start

# 1. Install dependencies npm install # 2. Configure environment cp .env.example .env # Edit .env with your Mailcow server details # 3. Start the server npm run build && npm start

🎉 That's it! Your MCP server is now running with 20 tools ready for AI integration.

👉 Detailed setup: Quick Start Guide

🛠️ Available Tools

Email Management (18 tools)

  • Domains (5): List, create, update, delete, get details
  • Mailboxes (5): List, create, update, delete, get details
  • Email Sending (3): Send emails, check delivery status, get templates
  • Queue Management (6): List, flush, delete, hold, release queue items
  • Sync Jobs (7): Manage email migration and synchronization
  • Log Analysis (4): System, error, performance, and access logs

System Tools (3 tools)

  • Health Check: Server status and metrics
  • Configuration: Current settings (sanitized)
  • API Test: Validate Mailcow connectivity

📊 Current Status

🟢 MVP Complete - Full email server management capability
🟢 Production Ready - Deployed and tested in live environments
🟢 Well Documented - Comprehensive guides and API reference

ComponentStatusCoverageTools
Domain Management✅ Complete85%5 tools
Mailbox Management✅ Complete87%5 tools
Email System✅ CompleteMVP3 tools
Queue Management✅ CompleteNew6 tools
Sync Jobs✅ CompleteNew7 tools
Log Management✅ CompleteNew4 tools
System Tools✅ Complete100%3 tools

🏗️ Architecture

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ AI Models │ │ MCP Client │ │ Your App │ │ (Claude, etc) │◄──►│ (Claude CLI) │◄──►│ Integration │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ ▼ ┌─────────────────┐ │ MCP Protocol │ │ (JSON-RPC) │ └─────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────┐ │ Mailcow MCP Server │ │ ┌───────────────┐ ┌───────────────┐ ┌───────────────────────┐ │ │ │ Tool Registry │ │ Auth Manager │ │ 20 MCP Tools │ │ │ │ & Validation │ │ & Security │ │ • Domain Management │ │ │ │ │ │ │ │ • Mailbox Management │ │ │ │ │ │ │ │ • Email & Queues │ │ │ └───────────────┘ └───────────────┘ └───────────────────────┘ │ │ │ │ │ ▼ │ │ ┌───────────────────────┐ │ │ │ API Client │ │ │ │ (HTTP + Auth) │ │ │ └───────────────────────┘ │ └─────────────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────┐ │ Mailcow Server │ │ REST API │ └─────────────────┘

📚 Documentation

DocumentPurpose
Quick StartGet running in 5 minutes
ArchitectureSystem design and components
API ReferenceComplete tool documentation
ConfigurationEnvironment setup guide
Testing GuideTesting framework and practices

Developer Resources

🔧 Development

# Development mode with auto-reload npm run dev # Run tests npm test # View test coverage npm run test:coverage # Lint and format npm run lint npm run format # Build for production npm run build

🌟 Example Usage

Send an Email

// Send welcome email with template const result = await mcp.call('send_email', { from: 'admin@company.com', to: ['user@company.com'], subject: 'Welcome to our service!', body: 'Your account is ready to use.', body_type: 'plain' }); // Check delivery status await mcp.call('check_email_status', { queue_id: result.email_details.queue_id });

Manage Domains

// List all active domains const domains = await mcp.call('list_domains', { active_only: true }); // Create new domain await mcp.call('create_domain', { domain: 'newclient.com', description: 'New client domain', quota: 5368709120 // 5GB });

Monitor System

// Check server health const health = await mcp.call('health_check'); // Get recent error logs const errors = await mcp.call('get_error_logs', { limit: 50, start_time: '2023-12-01T00:00:00.000Z' });

🔒 Security

  • API Key Authentication with Mailcow integration
  • Granular Permissions system (read/write/delete by resource)
  • Input Validation with JSON Schema enforcement
  • Audit Logging for all operations
  • HTTPS Enforcement and SSL certificate validation
  • Rate Limiting to prevent abuse

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Add tests for your changes
  4. Ensure all tests pass: npm run test:all
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

🙏 Acknowledgments


-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables complete management of Mailcow email servers through 20 MCP tools including domain management, mailbox operations, email sending, queue management, sync jobs, and system monitoring. Provides AI models with full control over email server infrastructure through secure API integration.

  1. ✨ Features
    1. 🚀 Quick Start
      1. 🛠️ Available Tools
        1. Email Management (18 tools)
        2. System Tools (3 tools)
      2. 📊 Current Status
        1. 🏗️ Architecture
          1. 📚 Documentation
            1. Developer Resources
          2. 🔧 Development
            1. 🌟 Example Usage
              1. Send an Email
              2. Manage Domains
              3. Monitor System
            2. 🔒 Security
              1. 🤝 Contributing
                1. 📄 License
                  1. 🆘 Support
                    1. 🙏 Acknowledgments

                      Related MCP Servers

                      • A
                        security
                        A
                        license
                        A
                        quality
                        Provides tools for interacting with Gmail and Calendar APIs. This server enables you to manage your emails and calendar events programmatically through the MCP interface.
                        Last updated -
                        8
                        25
                        JavaScript
                        MIT License
                      • -
                        security
                        A
                        license
                        -
                        quality
                        MCP server that integrates with Gmail to enable sending, reading, and managing emails through tools like send-email, trash-email, get-unread-emails, and read-email.
                        Last updated -
                        56
                        Python
                        GPL 3.0
                        • Apple
                      • A
                        security
                        F
                        license
                        A
                        quality
                        An MCP-based email tool that enables AI models to access email services through standardized interfaces, allowing AI assistants to perform various email operations like sending emails, reading inboxes, and handling attachments.
                        Last updated -
                        17
                        30
                        TypeScript
                        • Apple
                        • Linux
                      • -
                        security
                        A
                        license
                        -
                        quality
                        An MCP server that enables Gmail integration, allowing users to manage emails (send, receive, read, trash, mark as read) directly through MCP clients like Claude Desktop.
                        Last updated -
                        Python
                        MIT License

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/leolilley/mailcow_mcp'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server