关于 dropscan-mcp
dropscan-mcp 将 MCP 客户端连接到 Dropscan 邮件扫描 API。它支持读取邮件信息和下载扫描文件;账户操作以及收件人、转寄地址和 webhook 管理均受双重保护。
主要功能
- 01列出 scanbox 和邮件
- 02读取邮件详情与 OCR 文本
- 03下载 PDF、ZIP 和信封图像
- 04请求扫描、转寄或销毁
- 05管理收件人与转寄地址
- 06管理 webhook 规则
适用场景
- 01查看已扫描的实体邮件
- 02下载邮件的 PDF 或 OCR 文本
- 03在明确保护措施下请求转寄
- 04配置收件人或 webhook 规则
MCP 相关
它通过 stdio 向 MCP 客户端提供 Dropscan 邮件、下载和账户管理工具。写入及操作工具必须同时启用环境变量并设置 `confirm: true`。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
uvx dropscan-mcpDROPSCAN_API_TOKEN密钥Personal access token for the Dropscan REST APIDROPSCAN_ALLOW_WRITESSet to 1 to unlock the write and action tools, which also require confirm=true on every call本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
dropscan-mcp
用于 Dropscan 邮件转电子邮件 API 的 MCP(模型上下文协议)服务。Dropscan 会在扫描箱中接收您的纸质信件;此服务可让您的 MCP 客户端列出邮件、下载扫描件(PDF / ZIP / 信封图像 / OCR 文本),并在明确启用后请求操作(扫描 / 转寄 / 销毁)以及管理收件人、转寄地址和 webhook 规则。
mcp-name: io.github.bitterdev/dropscan-mcp
安全第一:Dropscan 没有沙盒
每个请求都会访问真实的生产账户。操作不可撤销:信件一旦销毁,就会被实际粉碎并永久消失;转寄会实际邮寄信件并产生费用。
因此,所有写入 / 操作工具都需要通过双重门控:
DROPSCAN_ALLOW_WRITES环境标志。除非设置为1/true/yes,否则所有非 GET 工具都拒绝运行。此标志默认禁用。confirm: true参数。每个写入 / 操作工具都需要一个显式的confirm参数(默认为false),且除非该参数为true,否则会拒绝运行。
只读 GET 工具始终可用,且不会更改状态。
工具
只读(始终可用)
| 工具 | 端点 |
|---|---|
list_scanboxes | GET /scanboxes |
list_mailings(scanbox_id, current_status?, older_than?) | GET /scanboxes/{id}/mailings |
get_mailing(scanbox_id, uuid) | GET /scanboxes/{id}/mailings/{uuid} |
get_mailing_pdf(scanbox_id, uuid, save_path?) | GET .../{uuid}/pdf |
get_mailing_zip(scanbox_id, uuid, save_path?) | GET .../{uuid}/zip |
get_mailing_envelope(scanbox_id, uuid, save_path?) | GET .../{uuid}/envelope |
get_mailing_plaintext(scanbox_id, uuid) | GET .../{uuid}/plaintext |
list_recipients(scanbox_id) | GET /scanboxes/{id}/recipients |
get_recipient(scanbox_id, recipient_id) | GET /scanboxes/{id}/recipients/{id} |
get_forwarding_address(address_id) | GET /forwarding_addresses/{id} |
get_shipment(shipment_id) | GET /shipments/{id} |
list_webhook_rules() | GET /webhook_rules |
get_webhook_rule(rule_id) | GET /webhook_rules/{id} |
下载工具会将资源保存到磁盘(默认保存到 ~/Downloads;可通过 save_path 或 DROPSCAN_DOWNLOAD_DIR 环境变量覆盖),并返回保存路径、字节大小和内容类型。
写入 / 操作(双重门控:DROPSCAN_ALLOW_WRITES=1 且 confirm=true)
| 工具 | 端点 |
|---|---|
request_mailing_action(scanbox_id, mailing_uuid, action_type, forwarding_address_id?, forwarding_date?, confirm) | POST .../{uuid}/action_requests |
cancel_mailing_action(scanbox_id, mailing_uuid, action_request_id, confirm) | DELETE .../{uuid}/action_requests/{id} |
set_mailing_recipient(scanbox_id, mailing_uuid, recipient_id, confirm) | PUT .../{uuid}/recipient |
create_recipient(scanbox_id, type, firstname?, lastname?, name?, confirm) | POST /scanboxes/{id}/recipients |
create_forwarding_address(firstname, lastname, street, number, zip_code, city, country_code, company?, info?, state?, confirm) | POST /forwarding_addresses |
create_webhook_rule(url, events, authorization_header?, confirm) | POST /webhook_rules |
update_webhook_rule(rule_id, url?, events?, authorization_header?, confirm) | PATCH /webhook_rules/{id} |
delete_webhook_rule(rule_id, confirm) | DELETE /webhook_rules/{id} |
action_type 可取 scan、forward、destroy 之一(与 API 中的枚举值完全一致)。对于 forward,必须同时提供 forwarding_address_id 和 forwarding_date(ISO 格式 YYYY-MM-DD)。
Webhook events:mailing_received、scan_requested、mailing_scanned、mailing_archived、mailing_trashed、mailing_shredded、mailing_added_to_shipment、mailing_removed_from_shipment、shipment_sent、package_tracking_updated。
要求
- Python >= 3.10
- Dropscan 个人访问令牌
安装
从本地克隆开始:
python3 -m venv .venv
./.venv/bin/pip install .
配置
令牌从 DROPSCAN_TOKEN 环境变量读取,并以 Authorization: Bearer <token> 的形式发送。它绝不会被硬编码。
Claude Code
claude mcp add dropscan -e DROPSCAN_TOKEN="dspat-..." -- dropscan-mcp
Claude Desktop / 通用 MCP 客户端
{
"mcpServers": {
"dropscan": {
"command": "/absolute/path/to/dropscan-mcp/.venv/bin/python",
"args": ["-m", "dropscan_mcp.server"],
"env": {
"DROPSCAN_TOKEN": "dspat-..."
}
}
}
}
要启用写入/操作工具,请在 env 中添加 "DROPSCAN_ALLOW_WRITES": "1"。不添加此项即可让服务保持严格只读。
服务通过 stdio 运行。
环境变量
| 变量 | 描述 |
|---|---|
DROPSCAN_TOKEN | 必需。 Dropscan 个人访问令牌(Bearer)。 |
DROPSCAN_ALLOW_WRITES | 设置为 1/true 以启用写入/操作工具。默认:禁用。 |
DROPSCAN_DOWNLOAD_DIR | 下载的 PDF/ZIP/图片的默认目录。默认:~/Downloads。 |
许可证
MIT,详见 LICENSE。
作者
Fabian Bitter ([email protected])
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。