Thunderbird扩展API服务

一个Thunderbird扩展,通过JSON-RPC 2.0提供搜索邮件、发送邮件、管理日历和搜索联系人的API服务。

  • by bb1
  • JavaScript
  • 本地部署
  • 15 星标
  • 更新于
在 GitHub 查看 bb1/thunderbird-mcp

使用说明

警告!此项目不再维护。 使用精神上的成功者https://github.com/TKasperczyk/thunderbird-mcp作者@TKasperczyk

雷鸟mcp

此存储库包含一个Thunderbird扩展,该扩展为 访问Thunderbird搜索索引、管理日历、搜索联系人和发送邮件。 该扩展还启动了一个小型HTTP服务器(称为MCP服务器) 它使用JSON-RPC 2.0消息公开这些功能。 MCP代表 模型上下文协议;参见 https://modelcontextprotocol.io/specification/2025-06-18 对于规范。

扩展内容

extension/
├── background.js        - Starts the MCP server
├── manifest.json        - Extension manifest
├── search_index/
│   ├── api.mjs
│   └── schema.json
├── calendar/
│   ├── api.mjs
│   └── schema.json
└── contacts/
    ├── api.mjs
    └── schema.json

实验API与Thunderbird的搜索索引和日历集成 服务,并且可以通过MCP服务器从其他脚本中使用。它们使 以下MCP工具:

  • searchMessages –搜索邮件索引
  • sendMail –撰写和发送邮件
  • listCalendars –列出可用日历
  • searchContacts –查找用户与之交互的联系人

在Thunderbird中加载扩展

  1. 打开Thunderbird并导航到 Add-ons and Themes.
  2. 使用 Debug Add-ons 加载 extension 目录作为临时附加组件。
  3. 扩展程序将在以下位置启动MCP服务器 http://localhost:8765. 通过发送JSON-RPC请求 POST /.
    • tools/list 返回可用工具
    • tools/call 使用参数调用其中一个工具

该扩展需要Thunderbird 102或更高版本。

运行测试

该存储库包括一个小型测试运行器。安装后 开发依赖关系,运行:

npm test

脚本下载Thunderbird,以无头模式启动扩展 使用 web-ext,并检查MCP服务器是否响应 tools/list.