Skip to main content
Glama
fuyouai

@fuyouai/email-mcp

Official
by fuyouai

@fuyouai/email-mcp

通过 MCP 读写邮箱:收信用 IMAP,发信用 SMTP。默认参数适配腾讯企业邮箱(exmail.qq.com)。

工具

Tool

说明

list_folders

列出文件夹

list_messages

列出邮件摘要

search_messages

按条件搜索

get_message

读取单封正文与附件信息

send_message

发送邮件(环境变量 SMTP_ENABLED=false 时不注册)

Related MCP server: Email Server

要求

  • Node.js 18+

  • 邮箱已开启 IMAP;发信需开启 SMTP

  • 腾讯企业邮开启安全登录时,使用客户端专用密码IMAP 说明

在 Cursor 中使用

npx -y @fuyouai/email-mcp

mcp.json 示例(把账号与密码换成你自己的;密码不要提交到仓库):

{
  "mcpServers": {
    "email": {
      "command": "npx",
      "args": ["-y", "@fuyouai/email-mcp"],
      "env": {
        "IMAP": "imap.exmail.qq.com:993",
        "MAIL_USER": "you@yourcompany.com",
        "MAIL_PASSWORD": "客户端专用密码",
        "IMAP_SECURE": "true",
        "SMTP": "smtp.exmail.qq.com:465",
        "SMTP_SECURE": "true",
        "SMTP_ENABLED": "true"
      }
    }
  }
}

安装到全局后,可执行 CLI:email-mcp

环境变量

变量

说明

默认

IMAP

收信 host:port

imap.exmail.qq.com:993

MAIL_USER

登录邮箱(收/发共用)

必填

MAIL_PASSWORD

密码或客户端专用密码

必填

IMAP_SECURE

IMAP 使用 TLS

true

MAX_BODY_CHARS

读信正文最大长度

8000

SMTP

发信 host:port

smtp.exmail.qq.com:465

SMTP_SECURE

SMTP 使用 TLS

true

SMTP_ENABLED

是否注册发信工具

true

SMTP_USER / SMTP_PASSWORD

发信账号与收信不同时填写

默认同 MAIL_*

SMTP_FROM

发件人显示地址

默认同发信登录账号

海外机房可将 IMAP / SMTP 改为 hwimap.exmail.qq.com:993hwsmtp.exmail.qq.com:465

send_message 参数示例

{
  "to": "colleague@company.com",
  "subject": "会议提醒",
  "text": "明天下午 3 点开会。"
}

多个收件人:"to": "a@x.com, b@x.com""to": ["a@x.com", "b@x.com"]texthtml 至少填一项。

Available Tools

5 tools
get_messageA

获取单封邮件的完整内容(主题、正文、附件元数据)

ParametersJSON Schema
NameRequiredDescriptionDefault
uidYes邮件 UID
folderNo文件夹路径,默认 INBOX

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only describes the retrieved data and does not mention side effects, error conditions (e.g., on invalid UID), permissions/authentication, or whether the operation is read-only. This is insufficient for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that immediately states the action and scope. It is front-loaded with the verb and resource, and every word contributes to understanding the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with 2 parameters and no output schema. The description covers the return content (subject, body, attachments) but omits details like error handling, folder defaulting behavior beyond what the schema states, or response format. It is minimally complete but lacks depth for a no-annotation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (both 'uid' and 'folder' have detailed descriptions including default). The tool description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '获取单封邮件的完整内容' (fetch complete content of a single email) and enumerates the returned data (subject, body, attachment metadata). This verb+resource pairing differentiates it from siblings like list_messages or search_messages, which operate at a different level of detail.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for retrieving full email content via the phrase '完整内容', but it does not explicitly state when to use this tool over alternatives like list_messages or search_messages, nor does it provide exclusions or prerequisites. Usage context is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_foldersA

列出邮箱中的所有文件夹(IMAP LIST)

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not mention the read-only nature, performance implications, or any other behavioral traits beyond the basic listing action. The IMAP LIST mention adds implementation detail but not behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the primary purpose. Every word contributes value, and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema, the description should clarify the return format or any limitations. It only states that all folders are listed, without explaining what the response looks like (e.g., folder names, hierarchy, or truncation). While the tool is simple, this leaves some ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema reflects this. The description correctly implies no inputs are needed, which aligns with the baseline of 4 for parameter-less tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('list') and resource ('all folders in the mailbox'), and explicitly names the protocol (IMAP LIST). This distinguishes it from sibling tools that deal with messages rather than folders.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus alternatives, nor are there any exclusions or prerequisites. The description simply states what it does without contextual placement among sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_messagesA

列出指定文件夹中的邮件(默认 INBOX,按 UID 倒序)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo返回条数,默认 20,最大 100
folderNo文件夹路径,如 INBOX
unseen_onlyNo仅未读邮件

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds behavioral details not in annotations: default INBOX and UID descending order. However, it does not disclose the return format (e.g., metadata vs full content), error handling, or whether it is read-only. With no annotations, the description carries the full burden but covers only basic behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that front-loads the core action and includes key default/sort behavior. No redundant or extraneous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool, the description covers the essential context: the action, default folder, and sort order. The schema documents all parameters. However, with no output schema, the description does not explain what the response will contain (e.g., message IDs, subjects, pagination), leaving a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal extra meaning beyond the schema, such as the default folder (INBOX) and sort order, but does not elaborate on parameter usage or edge cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('列出' = list) and resource ('邮件' = emails) with a scope ('指定文件夹' = specified folder), and it distinguishes this from siblings like search_messages and get_message by focusing on listing all messages in a folder.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use the tool (to list emails in a folder) but does not explicitly mention alternatives or exclusions. It lacks guidance such as 'for searching, use search_messages' which would clarify selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_messagesB

按条件搜索邮件(IMAP SEARCH)

ParametersJSON Schema
NameRequiredDescriptionDefault
fromNo发件人包含的字符串
limitNo返回条数,默认 20
sinceNo起始日期,ISO 8601,如 2025-01-01
folderNo文件夹路径,默认 INBOX
subjectNo主题包含的字符串
unseen_onlyNo仅未读

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the tool performs an IMAP SEARCH, but does not disclose whether it is read-only, what the return format is, or any limitations. This lack of behavioral context is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise phrase that conveys the core purpose without wasted words. It is appropriately front-loaded, though it could potentially include more detail without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema and annotations, the description is expected to compensate for missing behavioral details. It fails to explain what the search returns, how results are ordered, or any constraints beyond the parameter schema. This makes it incomplete for a tool that likely has nuanced behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 6 parameters. The description does not add any meaning beyond what the schema provides, which matches the baseline of 3 for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '按条件搜索邮件(IMAP SEARCH)' clearly states the verb 'search', the resource '邮件' (emails), and the scope '按条件' (by conditions). It distinguishes this tool from siblings like list_messages and get_message by emphasizing conditional search, which is a unique capability.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a user needs to search emails by specific criteria, but it does not explicitly state when to use this tool versus alternatives. There is no mention of alternatives or exclusions, so the guidance remains implicit rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_messageA

通过 SMTP 发送邮件(环境变量 SMTP,如 smtp.exmail.qq.com:465)。text 与 html 至少填一项。

ParametersJSON Schema
NameRequiredDescriptionDefault
ccNo抄送
toYes收件人,多个用逗号分隔或传数组
bccNo密送
htmlNoHTML 正文
textNo纯文本正文
subjectYes邮件主题
reply_toNo回复地址 Reply-To

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses the SMTP environment dependency and the text/html constraint, but does not mention return values, error behavior, or side effects like sending delays or recipient validation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the primary action ('通过 SMTP 发送邮件') and then provides necessary constraints. It is concise with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's 7 parameters and no output schema, the description provides essential operational context (SMTP env var, body condition) that complements the schema. It lacks explicit return/error information, but for a send tool this is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters, so baseline is 3. The description adds the crucial constraint 'text 与 html 至少填一项' (at least one of text/html required), which is not captured in the schema and clarifies parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '通过 SMTP 发送邮件' (send email via SMTP) clearly identifies the action (send) and resource (email), with a specific mechanism (SMTP). This distinguishes it from sibling tools focused on listing or searching messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context such as using the SMTP environment variable and the requirement that at least one of text/html must be filled. It doesn't explicitly name alternatives, but the purpose is distinct enough from siblings to imply when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.0
    • First observedget_message
    • First observedlist_folders
    • First observedlist_messages
    • First observedsearch_messages
    • First observedsend_message

TDQS

A3.8/5.0
Disambiguation5/5

Each tool has a distinct purpose: listing folders, listing messages, searching messages, fetching a single message, and sending. Even though list_messages and search_messages both return messages, their usage is clearly differentiated by the description (folder browsing vs. condition-based search).

Naming Consistency5/5

All tool names follow the consistent verb_noun pattern: list_folders, list_messages, search_messages, get_message, send_message. There are no mixed conventions or vague verbs, making the API predictable.

Tool Count5/5

With exactly 5 tools, the server is well-scoped for basic email operations. It covers the core actions (list, search, read, send) without unnecessary bloat or an overly thin surface.

Completeness3/5

The toolset covers reading and sending email, but lacks common email management operations such as deleting, moving, or marking messages as read/unread. This is a notable gap for a full email workflow, though an agent can still accomplish basic tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Provides IMAP and SMTP capabilities, enabling developers to manage email services with seamless integration and automated workflows.
    18
    321
    BSD 3-Clause
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables email management through IMAP and SMTP protocols, supporting reading, sending, replying to emails with proper threading, and downloading attachments. Supports multiple email accounts with flexible configuration options.
    1
    BSD 3-Clause
  • F
    license
    B
    quality
    D
    maintenance
    Enables comprehensive interaction with IMAP email accounts through 38 tools for reading, searching, and organizing messages. It supports advanced features like real-time mailbox monitoring via IDLE watch and automated email archiving.
    41
    -
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI to send and receive emails via SMTP/IMAP, supporting auto-configuration for major email providers like QQ, 163, Gmail, Outlook, and enterprise mail.
    7
    577
    3
    MIT

Latest Blog Posts

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/fuyouai/email-mcp'

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