Skip to main content
Glama

AgentMail

by agentmail-to

AgentMail MCP 集成

一个简单的**模型上下文协议 (MCP)**服务器,与AgentMail集成,可动态管理电子邮件收件箱、列出邮件以及发送或回复邮件——所有这些都通过 Claude 等 AI 助手完成。此参考实现演示了如何在 MCP 服务器中使用 AgentMail 的 API 来动态编排电子邮件收件箱。

关于 AgentMail

AgentMail 是一家 API 优先的电子邮件服务提供商,允许 AI 代理动态创建收件箱,用于发送、接收和处理电子邮件。我们在电子邮件层之上构建了智能层,并针对代理工作流程进行了优化,使数据易于 LLM 消化。点击此处申请 API 密钥!


重要提示

由于 MCP 协议仍在不断发展,因此这是一个正在开发中的软件包。一旦添加新功能,我们将立即更新。加入我们的 Discord,加入社区! Discord

特征

  • 动态创建新的收件箱
  • 列出并检索收件箱以查看哪些是活动的
  • 从任何 AgentMail 收件箱发送电子邮件
  • 回复现有主题内的消息
  • 列出所选收件箱中的线程和消息
  • 检索邮件附件

先决条件

  • Python 3.10+
  • AgentMail API 密钥
  • (可选) Claude Desktop或任何其他支持 MCP 命令的前端

安装

该项目有一个 PyPi 包。安装后,您可以在 Claude Desktop 配置中引用它(或直接运行它)以启用电子邮件管理工具。

PIP(本地或 PyPI)

如果您维护自己的 Python 环境,只需从虚拟环境(来自 PyPI 或本地源)安装包:

pip install agentmail-mcp

然后运行:

agentmail-mcp --api-key="YOUR_AGENTMAIL_API_KEY"

这将使服务器在您的本地机器上运行。

选项 1:使用 Claude Desktop

如果您想从 Claude Desktop 与服务器进行交互,请按照以下步骤操作。

  1. 激活您的虚拟环境。
source .venv/bin/activate
  1. 运行以下命令查找 Agentmail MCP 服务器软件包的位置。如果您在虚拟环境中安装了 agentmail-mcp 软件包,它应该位于某个 .venv/bin/ 目录中。对于 Claude Desktop,务必在虚拟环境中安装它。
which agentmail-mcp
  1. 复制返回的路径。
  2. 将路径粘贴到claude_desktop_config.json文件中的command字段中。
  3. 重新启动 Claude Desktop。

claude_desktop_config.json文件如下所示:

{ "mcpServers": { "agentmail-mcp": { "command": "/path/to/agentmail-mcp", "args": ["--api-key", "{AGENT_MAIL_API_KEY}"] } } }

如果您没有claude_desktop_config.json文件,请在以下目录中创建一个:

在 macOS 上,配置文件通常位于:~/Library/Application Support/Claude/claude_desktop_config.json

在 Windows 上,它通常位于:%APPDATA%/Claude/claude_desktop_config.json

保存后,重新启动Claude Desktop以加载新的MCP服务器。

用法

在您的服务器运行 Claude Desktop(或其他 MCP 客户端)时,您可以使用与 AgentMail MCP 工具对应的自然语言命令来提示 Claude。例如:• “创建一个名为 demo 的新收件箱。”• “列出我的所有收件箱。”• “从收件箱test@agentmail.to发送一封电子邮件到test@example.com ,主题为“Hello”,正文内容为过去一周旧金山的天气情况。”• “回复收件箱 abc123 中的最新消息。”

在内部,Claude 调用公开的 MCP 工具(create_inbox、list_inboxes、send_message 等),进而调用 AgentMail API。

执照

执照

MIT 许可证 - 本项目遵循 MIT 许可证。使用风险自负。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

为 AI 代理提供即时收件箱。代理/法学硕士 (LLM) 可以在独立的收件箱中发送、接收和执行操作。与 Gmail 不同,专为 AI 打造。访问 agentmail.to 了解我们

  1. 关于 AgentMail
    1. 重要提示
      1. 特征
        1. 先决条件
          1. 安装
            1. PIP(本地或 PyPI)
          2. 选项 1:使用 Claude Desktop
            1. 用法
            2. 执照

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            Enables users to manage Gmail accounts using AI agent-assisted operations via an MCP protocol, supporting email search, reading, deletion, and sending with a voice-powered interface.
            Last updated -
            2
            5
            TypeScript
          • -
            security
            F
            license
            -
            quality
            Enables AI agents to interact with Novu's notification system, facilitating operations like sending notifications, managing subscribers, and organizing topics.
            Last updated -
            1
            TypeScript
          • A
            security
            A
            license
            A
            quality
            Enables AI models to interact with messages from various messaging platforms (Mobile, Mail, WhatsApp, LinkedIn, Slack, Twitter, Telegram, Instagram, Messenger) through a standardized interface.
            Last updated -
            3
            3
            Python
            MIT License
            • Linux
          • -
            security
            A
            license
            -
            quality
            Enables multiple AI agents to share and read each other's responses to the same prompt, allowing them to reflect on what other LLMs said to the same question.
            Last updated -
            TypeScript
            MIT License

          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/agentmail-to/agentmail-toolkit'

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