Mailcow MCP Server

Mailcow MCP Server

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.

Category
访问服务器

README

📧 Mailcow MCP Server

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

TypeScript MCP Node.js License

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

Component Status Coverage Tools
Domain Management ✅ Complete 85% 5 tools
Mailbox Management ✅ Complete 87% 5 tools
Email System ✅ Complete MVP 3 tools
Queue Management ✅ Complete New 6 tools
Sync Jobs ✅ Complete New 7 tools
Log Management ✅ Complete New 4 tools
System Tools ✅ Complete 100% 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

Document Purpose
Quick Start Get running in 5 minutes
Architecture System design and components
API Reference Complete tool documentation
Configuration Environment setup guide
Testing Guide Testing 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


<div align="center"> <strong>Made with ❤️ for the AI and email community</strong><br> <em>Bringing AI and email servers together, one tool at a time.</em> </div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选