← 返回 Skills 市场
wildbyteai

Exmail MCP Setup

作者 wildbyte · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
40
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install exmail-mcp-setup
功能描述
Set up a Tencent enterprise email MCP connector for WorkBuddy. Use this when the user wants to connect exmail to read and search emails. Replaces the broken...
使用说明 (SKILL.md)

Tencent Enterprise Email MCP Setup

Set up a custom MCP server to connect Tencent enterprise email (exmail.qq.com) to WorkBuddy. Provides three tools: get_recent_emails, search_emails, get_email_content.

Prerequisites

Two pieces of information are required from the user:

  1. Email address: e.g. [email protected]
  2. Auth code (客户端专用密码): generated in exmail admin panel, NOT the login password. Path: exmail.qq.com → Settings → Account → Client-specific password → Generate

Ask for these if not provided. The email type is always exmail, do not ask about it.

Why Not Use the mcp-email npm Package

The mcp-email package on npm is broken for WorkBuddy:

  1. stdout pollution: Contains console.log() calls that write to stdout, corrupting MCP's JSON-RPC protocol over stdio. MCP requires stdout to carry only JSON-RPC messages.
  2. NODE_OPTIONS conflict: WorkBuddy's runtime sets NODE_OPTIONS=--use-system-ca which modern Node.js rejects, killing the process immediately.
  3. Old MCP SDK: Uses SDK v0.6.1, incompatible with current WorkBuddy's MCP client.

Do NOT use mcp-email. Always deploy the custom server below.

Deployment Steps

Step 1: Create the MCP server directory

mkdir -p ~/.workbuddy/mcp-servers/exmail-mcp

Step 2: Copy the reference server code

The working server code is at references/index.js in this skill. Copy it:

cp \x3Cskill-path>/references/index.js ~/.workbuddy/mcp-servers/exmail-mcp/index.js

Step 3: Install dependencies

Use the managed Node.js binary, NOT the system one:

cd ~/.workbuddy/mcp-servers/exmail-mcp
~/.workbuddy/binaries/node/versions/22.12.0/bin/npm init -y
~/.workbuddy/binaries/node/versions/22.12.0/bin/npm pkg set type=module
~/.workbuddy/binaries/node/versions/22.12.0/bin/npm install @modelcontextprotocol/sdk imap mailparser nodemailer dotenv

Step 4: Configure mcp.json

Read ~/.workbuddy/mcp.json first to check for existing MCP servers. Add the exmail entry to the mcpServers object:

{
  "mcpServers": {
    "exmail": {
      "command": "$HOME/.workbuddy/binaries/node/versions/22.12.0/bin/node",
      "args": [
        "$HOME/.workbuddy/mcp-servers/exmail-mcp/index.js"
      ],
      "env": {
        "EMAIL_USER": "\[email protected]>",
        "EMAIL_PASSWORD": "\x3Cauth-code>",
        "NODE_OPTIONS": "",
        "NODE_TLS_REJECT_UNAUTHORIZED": "0"
      }
    }
  }
}

Key points:

  • Use absolute paths to the managed Node.js binary. Never use npx.
  • "NODE_OPTIONS": "" is CRITICAL — clears the --use-system-ca that crashes the process.
  • "NODE_TLS_REJECT_UNAUTHORIZED": "0" avoids TLS issues on exmail IMAP.

Step 5: Tell the user to enable the connector

After writing mcp.json, tell the user:

  • Open WorkBuddy connector management page
  • Find exmail entry
  • Click "Trust" (信任) to enable

Step 6: Verify

After the user enables it, test with the mcp__exmail__get_recent_emails tool (or search_emails / get_email_content).

Common Errors

Error Cause Fix
Connection closed (-32000) stdout polluted or NODE_OPTIONS conflict Verify NODE_OPTIONS: "" in env and no console.log in index.js
Process exits immediately stdin EOF Normal — WorkBuddy keeps pipe open, only fails in manual \x3C /dev/null tests
imap module not found Missing dependency Re-run npm install in the server directory
Login failed Wrong password Use auth code (客户端专用密码), not login password

How to Test Before Enabling (Optional)

Use a Node.js spawn test script instead of piping to stdin — piping won't work because the MCP server reads from stdin and a pipe that closes will kill it:

import { spawn } from 'child_process';
const s = spawn(nodePath, [serverPath], {
  env: { EMAIL_USER: '...', EMAIL_PASSWORD: '...', NODE_OPTIONS: '', NODE_TLS_REJECT_UNAUTHORIZED: '0' },
  stdio: ['pipe', 'pipe', 'pipe']
});
s.stdout.on('data', d => console.log(d.toString()));
s.stderr.on('data', d => console.error('STDERR:', d.toString()));
s.stdin.write(JSON.stringify({jsonrpc:'2.0',id:1,method:'initialize',params:{protocolVersion:'2024-11-05',capabilities:{},clientInfo:{name:'test',version:'1.0'}}}) + '\
');

If the response includes "result":{"protocolVersion":"2024-11-05"...}, the server is working.

安全使用建议
Review this carefully before installing. Only use it if you are comfortable giving the connector persistent access to your Exmail account, including the ability to send email as you. Prefer a version that removes send_email unless you explicitly need it, keeps TLS certificate verification enabled, and stores or rotates the auth code securely.
能力评估
Purpose & Capability
The stated purpose is to connect Tencent Exmail for reading and searching email and the instructions claim three read/search tools, but the reference MCP server also exposes a send_email tool that sends mail through SMTP as the configured user.
Instruction Scope
The setup instructions do not clearly disclose outbound email authority, do not require confirmation before sending, and present disabled TLS verification as a normal fix rather than a risky workaround.
Install Mechanism
The install flow copies a local reference server, installs normal Node dependencies, and adds a WorkBuddy mcp.json entry. That is coherent for an MCP connector, but it stores mailbox credentials in environment configuration without secure-storage or rotation guidance.
Credentials
Reading email requires mailbox credentials and network access, but disabling certificate verification for IMAP/SMTP and adding SMTP sending exceed the disclosed read/search use case.
Persistence & Privilege
The skill creates a persistent WorkBuddy MCP server entry with the user's email auth code, giving ongoing mailbox read access and under-disclosed send access after the connector is trusted.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install exmail-mcp-setup
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /exmail-mcp-setup 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Custom MCP server for Tencent enterprise email (exmail.qq.com). Provides get_recent_emails, search_emails, get_email_content tools. Replaces broken mcp-email npm package.
元数据
Slug exmail-mcp-setup
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Exmail MCP Setup 是什么?

Set up a Tencent enterprise email MCP connector for WorkBuddy. Use this when the user wants to connect exmail to read and search emails. Replaces the broken... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 40 次。

如何安装 Exmail MCP Setup?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install exmail-mcp-setup」即可一键安装,无需额外配置。

Exmail MCP Setup 是免费的吗?

是的,Exmail MCP Setup 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Exmail MCP Setup 支持哪些平台?

Exmail MCP Setup 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Exmail MCP Setup?

由 wildbyte(@wildbyteai)开发并维护,当前版本 v1.0.0。

💬 留言讨论