A

Alimail Admin MCP

by mfcompliance · io.github.mfcompliance/alimail-admin-mcp

Enables AI clients such as Claude, VS Code Copilot and Cursor to manage Alibaba Mail enterprise mailbox users and departments in natural language — creating, updating, freezing and deleting accounts, handling aliases, passwords, shared members and security phones, plus browsing department hierarchies and trees. Ships read-only by default, with two-step confirmation for destructive actions, domain scoping, rate limiting and audit logging.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-mfcompliance-alimail-admin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mfcompliance/alimail-admin-mcp"
      ],
      "env": {
        "ALIMAIL_CLIENT_ID": "<VALUE>",
        "ALIMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
        "ALIMAIL_READ_ONLY": "true",
        "ALIMAIL_API_BASE": "https://alimail-cn.aliyuncs.com",
        "ALIMAIL_TOOLSETS": "users,departments",
        "ALIMAIL_ALLOWED_DOMAINS": "",
        "LOG_LEVEL": "info",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3000",
        "MCP_AUTH_TOKEN": "",
        "ALIMAIL_MAX_QPS": "20",
        "ALIMAIL_AUDIT_LOG": "",
        "MCP_ALLOWED_HOSTS": "localhost,127.0.0.1,[::1]",
        "ALIMAIL_TIMEOUT_MS": "15000"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-mfcompliance-alimail-admin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mfcompliance/alimail-admin-mcp"
      ],
      "env": {
        "ALIMAIL_CLIENT_ID": "<VALUE>",
        "ALIMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
        "ALIMAIL_READ_ONLY": "true",
        "ALIMAIL_API_BASE": "https://alimail-cn.aliyuncs.com",
        "ALIMAIL_TOOLSETS": "users,departments",
        "ALIMAIL_ALLOWED_DOMAINS": "",
        "LOG_LEVEL": "info",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3000",
        "MCP_AUTH_TOKEN": "",
        "ALIMAIL_MAX_QPS": "20",
        "ALIMAIL_AUDIT_LOG": "",
        "MCP_ALLOWED_HOSTS": "localhost,127.0.0.1,[::1]",
        "ALIMAIL_TIMEOUT_MS": "15000"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-mfcompliance-alimail-admin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mfcompliance/alimail-admin-mcp"
      ],
      "env": {
        "ALIMAIL_CLIENT_ID": "<VALUE>",
        "ALIMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
        "ALIMAIL_READ_ONLY": "true",
        "ALIMAIL_API_BASE": "https://alimail-cn.aliyuncs.com",
        "ALIMAIL_TOOLSETS": "users,departments",
        "ALIMAIL_ALLOWED_DOMAINS": "",
        "LOG_LEVEL": "info",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3000",
        "MCP_AUTH_TOKEN": "",
        "ALIMAIL_MAX_QPS": "20",
        "ALIMAIL_AUDIT_LOG": "",
        "MCP_ALLOWED_HOSTS": "localhost,127.0.0.1,[::1]",
        "ALIMAIL_TIMEOUT_MS": "15000"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-mfcompliance-alimail-admin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mfcompliance/alimail-admin-mcp"
      ],
      "env": {
        "ALIMAIL_CLIENT_ID": "<VALUE>",
        "ALIMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
        "ALIMAIL_READ_ONLY": "true",
        "ALIMAIL_API_BASE": "https://alimail-cn.aliyuncs.com",
        "ALIMAIL_TOOLSETS": "users,departments",
        "ALIMAIL_ALLOWED_DOMAINS": "",
        "LOG_LEVEL": "info",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3000",
        "MCP_AUTH_TOKEN": "",
        "ALIMAIL_MAX_QPS": "20",
        "ALIMAIL_AUDIT_LOG": "",
        "MCP_ALLOWED_HOSTS": "localhost,127.0.0.1,[::1]",
        "ALIMAIL_TIMEOUT_MS": "15000"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-mfcompliance-alimail-admin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mfcompliance/alimail-admin-mcp"
      ],
      "env": {
        "ALIMAIL_CLIENT_ID": "<VALUE>",
        "ALIMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
        "ALIMAIL_READ_ONLY": "true",
        "ALIMAIL_API_BASE": "https://alimail-cn.aliyuncs.com",
        "ALIMAIL_TOOLSETS": "users,departments",
        "ALIMAIL_ALLOWED_DOMAINS": "",
        "LOG_LEVEL": "info",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3000",
        "MCP_AUTH_TOKEN": "",
        "ALIMAIL_MAX_QPS": "20",
        "ALIMAIL_AUDIT_LOG": "",
        "MCP_ALLOWED_HOSTS": "localhost,127.0.0.1,[::1]",
        "ALIMAIL_TIMEOUT_MS": "15000"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-mfcompliance-alimail-admin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mfcompliance/alimail-admin-mcp"
      ],
      "env": {
        "ALIMAIL_CLIENT_ID": "<VALUE>",
        "ALIMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
        "ALIMAIL_READ_ONLY": "true",
        "ALIMAIL_API_BASE": "https://alimail-cn.aliyuncs.com",
        "ALIMAIL_TOOLSETS": "users,departments",
        "ALIMAIL_ALLOWED_DOMAINS": "",
        "LOG_LEVEL": "info",
        "MCP_HTTP_HOST": "127.0.0.1",
        "MCP_HTTP_PORT": "3000",
        "MCP_AUTH_TOKEN": "",
        "ALIMAIL_MAX_QPS": "20",
        "ALIMAIL_AUDIT_LOG": "",
        "MCP_ALLOWED_HOSTS": "localhost,127.0.0.1,[::1]",
        "ALIMAIL_TIMEOUT_MS": "15000"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
ALIMAIL_CLIENT_ID Yes 必填,阿里邮箱应用 ID。
ALIMAIL_CLIENT_SECRET secret Yes 必填,阿里邮箱应用 Secret。
ALIMAIL_READ_ONLY No 设为 false 才会注册写操作和破坏性工具。 Default: true
ALIMAIL_API_BASE No API 地址,不同集群不能混用。 Default: https://alimail-cn.aliyuncs.com
ALIMAIL_TOOLSETS No 启用的工具集。 Default: users,departments
ALIMAIL_ALLOWED_DOMAINS No 限定可操作的邮箱域名,逗号分隔,子域名同样适用;默认为空表示不限制。
LOG_LEVEL No 日志级别:debug / info / warn / error。 Default: info
MCP_HTTP_HOST No HTTP 监听地址;Docker 镜像内为 0.0.0.0。 Default: 127.0.0.1
MCP_HTTP_PORT No HTTP 端口。 Default: 3000
MCP_AUTH_TOKEN No HTTP 模式下可选:设置后请求必须带 Authorization: Bearer <token>。
ALIMAIL_MAX_QPS No 本服务的请求速率上限(最大 40),需要给同域的其他应用留出余量。 Default: 20
ALIMAIL_AUDIT_LOG No 审计日志文件路径;默认为空,输出到 stderr。
MCP_ALLOWED_HOSTS No 允许的 Host 头,用于防御 DNS rebinding。 Default: localhost,127.0.0.1,[::1]
ALIMAIL_TIMEOUT_MS No 单次请求超时时间,单位毫秒。 Default: 15000

Similar servers