subscription-audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Subscription Audit

订阅费用审计

Search Gmail and Slack via MCP to discover, extract, and report on all IT/AI/SaaS subscription fees.
通过MCP搜索Gmail和Slack,发现、提取并报告所有IT/AI/SaaS订阅费用。

Workflow

工作流程

The audit involves these steps:
  1. Search Gmail with tiered queries (high-yield first, then broader)
  2. Search Slack for subscription references
  3. Read thread details to extract exact amounts
  4. Consolidate and deduplicate results
  5. Generate the final audit report
审计包含以下步骤:
  1. 使用分层查询搜索Gmail(先执行高收益查询,再执行宽泛查询)
  2. 搜索Slack中的订阅相关信息
  3. 查看对话详情以提取准确金额
  4. 合并并去重结果
  5. 生成最终审计报告

Step 1: Search Gmail

步骤1:搜索Gmail

Use
gmail_search_messages
via MCP. Run queries from
references/search-queries.md
, starting with Tier 1 (highest yield). Set
max_results
to 50–100 per query.
bash
manus-mcp-cli tool call gmail_search_messages --server gmail --input '{"q": "<QUERY>", "max_results": 100}'
For each result file, extract thread IDs and subjects with Python:
python
import json
with open('<result_file>') as f:
    data = json.load(f)
for t in data.get('result', {}).get('threads', []):
    for msg in t.get('messages', []):
        h = msg.get('pickedHeaders', {})
        print(f"{t['id']} | {h.get('subject','')} | {h.get('from','')}")
Key Tier 1 queries (always run these):
  • from:stripe.com receipt
  • from:github.com receipt payment
  • from:googleplay-noreply@google.com subscription
  • from:anthropic.com OR from:mail.anthropic.com receipt invoice
  • from:openai.com receipt invoice billing
  • from:ionos OR from:godaddy OR from:namecheap OR from:cloudflare invoice domain
For the full query list with rationale, read
references/search-queries.md
.
通过MCP调用
gmail_search_messages
工具。从
references/search-queries.md
中获取查询语句,优先运行Tier 1(高收益)查询。将
max_results
设置为每个查询50–100条结果。
bash
manus-mcp-cli tool call gmail_search_messages --server gmail --input '{"q": "<QUERY>", "max_results": 100}'
对于每个结果文件,使用Python提取对话ID和主题:
python
import json
with open('<result_file>') as f:
    data = json.load(f)
for t in data.get('result', {}).get('threads', []):
    for msg in t.get('messages', []):
        h = msg.get('pickedHeaders', {})
        print(f"{t['id']} | {h.get('subject','')} | {h.get('from','')}")
核心Tier 1查询语句(必须运行这些):
  • from:stripe.com receipt
  • from:github.com receipt payment
  • from:googleplay-noreply@google.com subscription
  • from:anthropic.com OR from:mail.anthropic.com receipt invoice
  • from:openai.com receipt invoice billing
  • from:ionos OR from:godaddy OR from:namecheap OR from:cloudflare invoice domain
如需完整查询列表及理由,请查看
references/search-queries.md

Step 2: Search Slack

步骤2:搜索Slack

Use
slack_search_public_and_private
via MCP:
bash
manus-mcp-cli tool call slack_search_public_and_private --server slack --input '{"query": "subscription invoice payment billing receipt", "limit": 20}'
Run 2–3 query variants. Slack rarely contains billing data but may reference costs in discussion.
通过MCP调用
slack_search_public_and_private
工具:
bash
manus-mcp-cli tool call slack_search_public_and_private --server slack --input '{"query": "subscription invoice payment billing receipt", "limit": 20}'
运行2–3种不同的查询变体。Slack中很少包含账单数据,但可能在讨论中提及费用相关信息。

Step 3: Read Thread Details

步骤3:查看对话详情

For threads identified as IT/AI subscriptions, read full content to extract amounts:
bash
manus-mcp-cli tool call gmail_read_threads --server gmail --input '{"thread_ids": ["<id1>","<id2>"], "include_full_messages": true}'
Batch up to 10 thread IDs per call. From the plain text content, extract:
  • Amount — look for
    £
    ,
    $
    ,
    followed by digits
  • Plan name — e.g. "Claude Pro", "Starter", "Team Plan"
  • Billing period — e.g. "Jan 18 – Feb 18, 2026"
  • Payment method — e.g. "Visa ending 8149"
  • VAT — typically 20% for UK-based users
对于已识别为IT/AI订阅的对话,查看完整内容以提取金额:
bash
manus-mcp-cli tool call gmail_read_threads --server gmail --input '{"thread_ids": ["<id1>","<id2>"], "include_full_messages": true}'
每次调用最多批量处理10个对话ID。从纯文本内容中提取:
  • 金额 — 查找带有
    £
    $
    符号的数字
  • 套餐名称 — 例如“Claude Pro”、“Starter”、“Team Plan”
  • 计费周期 — 例如“2026年1月18日 – 2月18日”
  • 支付方式 — 例如“尾号8149的Visa卡”
  • 增值税(VAT) — 英国用户通常为20%

Step 4: Consolidate

步骤4:合并结果

Optionally run the consolidation script on saved MCP result files:
bash
python3 /home/ubuntu/skills/subscription-audit/scripts/consolidate_results.py <output_dir> <json1> [json2 ...]
Group results by service provider. Deduplicate by thread ID. For each service, record:
FieldSource
Service nameSender name or subject line
CategoryAI Assistant, Developer Tools, Cloud/Hosting, AI Voice, etc.
Current planFrom receipt body
Monthly costFrom receipt body (convert USD→GBP if needed)
Payment methodFrom receipt body
Billing cycleMonthly or Annual
First seen / last seenEarliest and latest receipt dates
可选择在已保存的MCP结果文件上运行合并脚本:
bash
python3 /home/ubuntu/skills/subscription-audit/scripts/consolidate_results.py <output_dir> <json1> [json2 ...]
按服务提供商对结果进行分组,通过对话ID去重。为每个服务记录以下信息:
字段来源
服务名称发件人名称或主题行
分类AI助手、开发工具、云/托管等
当前套餐来自收据正文
月度费用来自收据正文(如需可将美元转换为英镑)
支付方式来自收据正文
计费周期月度或年度
首次/末次出现时间最早和最晚的收据日期

Step 5: Generate Report

步骤5:生成报告

Use
templates/report_template.md
as the structural guide. The report must include:
  1. Executive Summary — service count, total monthly/annual cost, summary table
  2. Detailed Analysis — one section per service with billing history
  3. Conclusion — recommendations on cost optimisation
Look up the current USD→GBP exchange rate when converting amounts. Deliver the report as a Markdown file with the raw JSON data as a secondary attachment.
templates/report_template.md
为结构指南。报告必须包含以下部分:
  1. 执行摘要 — 服务数量、月度/年度总费用、摘要表格
  2. 详细分析 — 每个服务单独成节,包含账单历史
  3. 结论 — 成本优化建议
转换金额时,请查询当前美元兑英镑汇率。报告以Markdown文件形式交付,原始JSON数据作为次要附件。

IT/AI Service Categories

IT/AI服务分类

When classifying subscriptions, use these categories:
CategoryExamples
AI AssistantAnthropic Claude, OpenAI ChatGPT, Perplexity
AI Developer ToolsGitHub Copilot, Cursor, Replit
AI Voice / MediaElevenLabs, Midjourney, Runway
Developer ToolsGitHub Plans, JetBrains, VS Code
Cloud / HostingAWS, Azure, Hetzner, DigitalOcean, Vercel
Web Hosting / DomainIONOS, GoDaddy, Namecheap, Cloudflare
AI / Cloud StorageGoogle AI Pro, iCloud+
ProductivityNotion, Figma, Slack Pro
Security / NetworkTailscale, VPN services
对订阅服务进行分类时,请使用以下类别:
分类示例
AI助手Anthropic Claude、OpenAI ChatGPT、Perplexity
AI开发工具GitHub Copilot、Cursor、Replit
AI语音/媒体ElevenLabs、Midjourney、Runway
开发工具GitHub套餐、JetBrains、VS Code
云/托管AWS、Azure、Hetzner、DigitalOcean、Vercel
网站托管/域名IONOS、GoDaddy、Namecheap、Cloudflare
AI/云存储Google AI Pro、iCloud+
生产力工具Notion、Figma、Slack Pro
安全/网络Tailscale、VPN服务