Skip to main content

MCP Server for email template management

Project description

Email MCP Server

自动化获取/更新邮件模板信息的 MCP (Model Context Protocol) 服务器。

项目简介

Email MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器实现,用于自动化管理邮件模板系统。它提供了三个核心工具,让 AI 助手(如 Claude)能够直接与邮件系统交互,实现邮件模板的获取、更新和审核规则查询。

功能特性

提供的 Tools

  1. get_email_template_info - 获取邮件模板信息

    • 输入:模板ID(如 1345、2133、2344)
    • 输出:邮件模板的详细信息,包括标题、正文、状态、敏感词等
  2. update_email_template_status - 更新邮件模板状态

    • 输入:模板ID和更新内容(支持全部字段)
    • 输出:更新成功或失败的状态信息
  3. fetch_review_rules - 获取审核规则

    • 输入:无
    • 输出:结构化的审核规则,包括可用变量和规则说明

快速开始

安装

pip install email-mcp-server

在 Claude Desktop 中使用

配置文件位置:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

添加配置:

{
  "mcpServers": {
    "email-mcp-server": {
      "command": "python",
      "args": ["-m", "email_mcp_server.server"],
      "env": {
        "EMAIL_SYSTEM_URL": "https://system_url.com",
        "EMAIL_SYSTEM_USERNAME": "your_email@example.com",
        "EMAIL_SYSTEM_PASSWORD": "your_password"
      }
    }
  }
}

使用示例

在 Claude 中使用

请帮我获取邮件模板 1509 的信息
请更新邮件模板 1509 的状态为审核通过
请告诉我邮件模板的审核规则

审核规则说明

可用变量

标题变量

  • {{ Greeting }} - 问候语

正文变量

  • {{ Salutation }} - 称呼语(如:Dear Prof. xxx)
  • {{ Opening }} - 开场白
  • {{ ClosingPhrase }} - 结束寒暄语
  • {{ ClosingSalutation }} - 结束称呼语

其他变量

  • {{ Email }} - 邮箱地址
  • {{ First name }} - 名
  • {{ Middle name }} - 中间名
  • {{ Last name }} - 姓
  • {{ Title }} - 职称
  • {{ Affiliation }} - 单位/机构
  • {{ Roles }} - 角色
  • {{ Note }} - 备注

审核规则

  1. 邮件主体内容要放在 {{ Opening }}{{ ClosingPhrase }} 中间
  2. 最后 {{ ClosingSalutation }} 下面放落款
  3. 所有邮件变量必须用 {{}} 包裹
  4. 邮件模板内容不能和邮件变量名重复
  5. 敏感词不能超过10个
  6. 敏感词不能同时包含涉及"政治、金钱、利益、暴力"等其中两种类型
  7. text正文和HTML正文的主体内容必须保持相同
  8. 邮件正文和变量之间语义不得冲突

许可证

MIT License - 详见 LICENSE 文件

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

email_mcp_server-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

email_mcp_server-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file email_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: email_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for email_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd5736379c1a490c0dfac65a2389d6b722295851ae1fbf1b028e925ba9fb33b8
MD5 3b8118f4183049d4a2e60176dbcd55ee
BLAKE2b-256 8b3f6f0249045fb1c90099250ce95b7ca5a1c41e61f47f1b72148b604a6b69ac

See more details on using hashes here.

File details

Details for the file email_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for email_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 462fb9821567b30f25b0e0c4308efe0b76dd2a45fbdfeb71b68b31f57c149b88
MD5 8c72f2e46f3570acacb4dca249d21d15
BLAKE2b-256 9ab8439dfa5de6ad5107d500f428ee59118424216ef0ce0fcab4f098c3556ae9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page