Skip to main content
Glama

Mailtrap Email Sending

by railsware

TypeScript

MCP 邮件陷阱服务器

提供通过 Mailtrap 发送交易电子邮件工具的 MCP 服务器

设置

Claude 桌面或光标

添加以下配置:

{ "mcpServers": { "mailtrap": { "command": "npx", "args": ["-y", "mcp-mailtrap"], "env": { "MAILTRAP_API_TOKEN": "your_mailtrap_api_token", "DEFAULT_FROM_EMAIL": "your_sender@example.com" } } } }

如果您使用asdf来管理 Node.js,则必须使用可执行文件的绝对路径(例如 Mac)

{ "mcpServers": { "mailtrap": { "command": "/Users/<username>/.asdf/shims/npx", "args": ["-y", "mcp-mailtrap"], "env": { "PATH": "/Users/<username>/.asdf/shims:/usr/bin:/bin", "ASDF_DIR": "/opt/homebrew/opt/asdf/libexec", "ASDF_DATA_DIR": "/Users/<username>/.asdf", "ASDF_NODEJS_VERSION": "20.6.1", "MAILTRAP_API_TOKEN": "your_mailtrap_api_token", "DEFAULT_FROM_EMAIL": "your_sender@example.com" } } } }
Claude Desktop 配置文件位置

Mac~/Library/Application Support/Claude/claude_desktop_config.json

Windows%APPDATA%\Claude\claude_desktop_config.json

光标配置文件位置

Mac~/.cursor/mcp.json

Windows%USERPROFILE%\.cursor\mcp.json

VS 代码

在命令面板中运行: Preferences: Open User Settings (JSON)

然后,在设置文件中,添加以下配置:

{ "mcp": { "servers": { "mailtrap": { "command": "npx", "args": ["-y", "mcp-mailtrap"], "env": { "MAILTRAP_API_TOKEN": "your_mailtrap_api_token", "DEFAULT_FROM_EMAIL": "your_sender@example.com" } } } } }

[!TIP] 更改“env”部分后,请不要忘记重新启动 MCP 服务器。

用法

配置完成后,您可以要求代理发送电子邮件,例如:

可用工具

发送电子邮件

通过 Mailtrap 发送交易电子邮件。

参数:

  • to (必填):收件人的电子邮件地址
  • subject (必填):电子邮件主题行
  • from (可选):发件人的电子邮件地址,如果没有提供,将使用“DEFAULT_FROM_EMAIL”
  • text (可选):电子邮件正文,如果“html”为空则需要
  • html (可选):电子邮件正文的 HTML 版本,如果“文本”为空则必填
  • cc (可选):抄送收件人电子邮件地址数组
  • bcc (可选):BCC 收件人电子邮件地址数组
  • category (可选):用于跟踪的电子邮件类别

发展

  1. 克隆存储库:
git clone https://github.com/railsware/mailtrap-mcp.git cd mailtrap-mcp
  1. 安装依赖项:
npm install

使用 Claude Desktop 或 Cursor 进行配置

[!TIP] 请参阅“设置”部分中配置文件的位置。

添加以下配置:

{ "mcpServers": { "mailtrap": { "command": "node", "args": ["/path/to/mailtrap-mcp/dist/index.js"], "env": { "MAILTRAP_API_TOKEN": "your_mailtrap_api_token", "DEFAULT_FROM_EMAIL": "your_sender@example.com" } } } }

如果您使用asdf来管理 Node.js,则应该使用可执行文件的绝对路径:

(以 Mac 为例)

{ "mcpServers": { "mailtrap": { "command": "/Users/<username>/.asdf/shims/node", "args": ["/path/to/mailtrap-mcp/dist/index.js"], "env": { "PATH": "/Users/<username>/.asdf/shims:/usr/bin:/bin", "ASDF_DIR": "/opt/homebrew/opt/asdf/libexec", "ASDF_DATA_DIR": "/Users/<username>/.asdf", "ASDF_NODEJS_VERSION": "20.6.1", "MAILTRAP_API_TOKEN": "your_mailtrap_api_token", "DEFAULT_FROM_EMAIL": "your_sender@example.com" } } } }

VS 代码

[!TIP] 请参阅“设置”部分中配置文件的位置。

{ "mcp": { "servers": { "mailtrap": { "command": "node", "args": ["/path/to/mailtrap-mcp/dist/index.js"], "env": { "MAILTRAP_API_TOKEN": "your_mailtrap_api_token", "DEFAULT_FROM_EMAIL": "your_sender@example.com" } } } } }

测试

您可以使用MCP 检查器测试服务器:

npm run dev

贡献

欢迎在GitHub上提交 Bug 报告和拉取请求。本项目旨在打造一个安全友好的协作空间,并希望贡献者遵守行为准则

执照

根据MIT 许可证的条款,该软件包可以作为开源软件使用。

行为守则

希望参与 Mailtrap 项目代码库、问题跟踪器、聊天室和邮件列表的每个人都遵守行为准则

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

与 Mailtrap 电子邮件平台集成,以便通过 API 发送交易电子邮件。

  1. 设置
    1. Claude 桌面或光标
    2. VS 代码
  2. 用法
    1. 可用工具
      1. 发送电子邮件
    2. 发展
      1. 使用 Claude Desktop 或 Cursor 进行配置
      2. VS 代码
    3. 测试
      1. 贡献
        1. 执照
          1. 行为守则

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              Integrates with Gmail to enable sending, reading, drafting, and managing emails via the Model Context Protocol (MCP), allowing users to interact with email tasks through automated client prompts.
              Last updated -
              Python
              GPL 3.0
            • -
              security
              F
              license
              -
              quality
              Allows sending emails through the Resend service using a standardized Model Context Protocol (MCP) interface, with TypeScript support.
              Last updated -
              13
              5
              TypeScript
            • -
              security
              A
              license
              -
              quality
              Provides IMAP and SMTP capabilities, enabling developers to manage email services with seamless integration and automated workflows.
              Last updated -
              35
              Python
              BSD 3-Clause
              • Apple
              • Linux
            • A
              security
              F
              license
              A
              quality
              A simple MCP server that enables users to send emails using Resend's API, integrating with tools like Cursor and Claude Desktop for seamless email composition and delivery.
              Last updated -
              1
              6
              321
              TypeScript
              • Apple

            View all related MCP servers

            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/railsware/mailtrap-mcp'

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