mailu-mcp
MCP server to administer a Mailu mail server from Claude — domains, mailboxes, aliases and forwards.
README
<div align="center">
mailu-mcp
MCP server to administer a Mailu mail server from Claude — domains, mailboxes, aliases and forwards, without leaving the conversation.
Installation · Tools · Examples · Limitations · 🇫🇷 Français
</div>
Overview
This MCP server exposes Mailu's admin REST API as tools Claude can call. Ask in natural language, Claude executes:
You: List the domains managed by Mailu, then the aliases of
example.com.Claude: (calls
mailu_list_domainsthenmailu_list_aliases_by_domain) 3 domains:example.com,example.org,example.net. Aliases ofexample.com:contact@→team@gmail.com,info@→team@gmail.com.
Requirements
Enable the REST API on the Mailu server (mailu.env, Mailu ≥ 1.9, tested on 2.0):
API=true
WEB_API=/api
API_TOKEN=<generate with: openssl rand -hex 32>
Then recreate the containers: cd /mailu && docker compose up -d.
Verify: curl -H "Authorization: <API_TOKEN>" https://mail.example.com/api/v1/domain.
Auth: the token goes raw in the
Authorizationheader (apiKey scheme, noBearerprefix).
Installation
Claude Code
claude mcp add mailu \
--env MAILU_API_URL=https://mail.example.com/api/v1 \
--env MAILU_API_TOKEN=your_token \
-- npx -y @manganate06/mailu-mcp
Claude Desktop / Cursor
Add to claude_desktop_config.json (or Cursor's MCP config):
{
"mcpServers": {
"mailu": {
"command": "npx",
"args": ["-y", "@manganate06/mailu-mcp"],
"env": {
"MAILU_API_URL": "https://mail.example.com/api/v1",
"MAILU_API_TOKEN": "your_token"
}
}
}
}
Tested with Claude Code and Claude Desktop.
Configuration
| Variable | Purpose | Required | Where to get it |
|---|---|---|---|
MAILU_API_URL |
API base URL (with /api/v1) |
✅ | your Mailu instance |
MAILU_API_TOKEN |
API token | ✅ | API_TOKEN in mailu.env |
MAILU_MCP_DEBUG |
Debug logs on stderr | ❌ | true / false |
Tools
32 tools, mailu_ prefix (omitted in the table). Parameter details: src/index.ts.
| Area | Tools |
|---|---|
| Domains | list_domains, get_domain, create_domain, update_domain, delete_domain, generate_domain_dkim, list_domain_users, list_domain_managers, create_domain_manager, get_domain_manager, delete_domain_manager |
| Mailboxes | list_users, get_user, create_user, update_user, delete_user |
| Aliases | list_aliases, get_alias, list_aliases_by_domain, create_alias, update_alias, delete_alias |
| Alternatives | list_alternatives, get_alternative, create_alternative, delete_alternative |
| Relays | list_relays, get_relay, create_relay, update_relay, delete_relay |
| Generic | mailu_request (method, path, body) — escape hatch for any endpoint |
Examples
- "List the Mailu domains"
- "Show the aliases of
example.com" - "Create the mailbox
contact@example.comwith a 2 GB quota" - "Add an alias
info@example.comforwarding tojean@gmail.com" - "Regenerate the DKIM keys for
example.com"
Limitations
- Mirrors the Mailu admin REST API — anything the API doesn't expose (fetched accounts, webmail/antispam settings…) isn't available; reach any un-wrapped endpoint via
mailu_request. - No bulk helpers — one object per call (the assistant can loop over a list).
MAILU_API_TOKENis a full-admin credential — scope it and restrict network access to the API.
Transport
stdio — works with Claude Code, Claude Desktop, Cursor and any MCP client.
Development
git clone https://github.com/manganate006/mailu-mcp
cd mailu-mcp && npm install
npm run build && npm run bundle # dist/bundle.js (single file, e.g. for NFS)
npm test # unit tests (mocked HTTP, no live server)
npm run test:integration # end-to-end CRUD self-test (needs live MAILU_API_URL/TOKEN)
npx @modelcontextprotocol/inspector node dist/bundle.js
License
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。