
Inbox To Action
io.github.tarunlnmiit由 GitHub 帳號 tarunlnmiit 發布v0.2.11更新於 Oct 24, 2026
Agentic Gmail triage: classify, summarize, extract tasks, draft replies. Never sends.
概覽
本機 stdio MCP 伺服器,為助理提供 Gmail 郵件分流工具:取得郵件、儲存草稿、附加任務並產生分流報告。
- 可以做什麼
- 依時間範圍取得 Gmail 未讀郵件,可涵蓋多個已設定的帳戶,交給助理推理。將回覆儲存為 Gmail 草稿,而不是寄出。把擷取出的含截止日期任務附加到本機任務檔案。在工作目錄寫入彙整的分流報告。分類、摘要、任務擷取與草擬由助理完成,伺服器只執行輸入輸出步驟。
- 適用情境
- 適合在 Claude Code 或其他 MCP 用戶端中讓助理分流 Gmail 收件匣:把郵件歸為待處理、僅供參考、電子報與雜訊,摘要長郵件串,準備待審閱的回覆草稿,並收集待辦事項。內建範例收件匣可在未設定 Gmail 的情況下試用流程。
- 執行需求
- 以本機 Python 程序執行,從 PyPI 安裝 MCP 附加元件(或使用 Docker),透過模組進入點啟動。處理真實收件匣需要 Google Cloud OAuth 桌面應用程式憑證(client_secret.json),並一次性授權 Gmail 讀取與撰寫範圍;權杖依帳戶快取。透過 PROVIDER 選擇 LLM 提供者,雲端提供者需在 .env 設定如 OPENROUTER_API_KEY 的金鑰,也可選用免金鑰的本機方案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Inbox To Action,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
inbox-to-action
[CI] [codecov] [PyPI version] [Python 3.11+] [License: MIT] [GitHub stars]
Published on PyPI and listed on the
Official MCP Registry (io.github.tarunlnmiit/inbox-to-action),
Glama (deployable release, Quality A),
and Smithery (MCPB bundle).
Registry manifests (server.json, glama.json) ship in the repo.
One command. Your inbox triaged, summarized, drafted, and turned into tasks — in a single agentic pass.
Install
Try it with zero setup: inbox-to-action run --mock (bundled sample inbox).
📖 Full documentation → docs/ — install · providers · Gmail OAuth · multi-account · integrations · MCP & Skill · config · troubleshooting · testing checklist. Quick version: SETUP.md.
[inbox-to-action — one command triages the inbox into a report, drafts, and tasks]
Why this exists
Most people process their inbox with four separate tools: an email client to read, a task manager to capture to-dos, a calendar to block time, and (increasingly) an AI summarizer to make sense of long threads. Every message gets handled four times.
inbox-to-action collapses all four into one agentic pass. Run one command and get
a unified triage report, drafted replies saved to Gmail, and extracted tasks — without
ever leaving the terminal, and without ever sending an email automatically.
🔒 Drafts only — never sends
This tool cannot send email. It requests only the Gmail readonly + compose
scopes; there is no send scope and no send API call anywhere in the codebase
(enforced by a test). Replies are saved as Gmail drafts for you to review and send.
Email bodies flow into the LLM prompt, so a hostile email could try to steer its own classification or a drafted reply (prompt injection). Because every draft is saved for human review and nothing is ever sent automatically, the worst case is a draft you choose not to send. See SECURITY.md.
🌐 What leaves your machine
inbox-to-action reads your email. Where your email content goes for classification
depends on the LLM provider you pick — and the default (openrouter) is a cloud
provider, so an out-of-the-box run sends your subjects + bodies to a third party.
Want privacy? Use ollama (local) or claude (keyless) so nothing is transmitted
to a third party. --telegram / --todoist also push subjects/tasks off-box (opt-in).
Full breakdown → PRIVACY.md.
Note:
triage-report.mdandtasks.mdare written to your working directory and contain private email content. If you run inside a git repo, add them to.gitignore.
What it does
- Fetches unread email from Gmail (last 24h by default).
- Classifies each into
action_needed·fyi·newsletter·noise. - Summarizes long threads (>500 words) into two lines.
- Extracts tasks with deadlines → local
tasks.md(optional Todoist via--todoist). - Drafts replies for
action_neededmail → saved as Gmail drafts. - Flags emails that need a calendar block.
Final output: a single triage-report.md with a section per category, drafted-reply
previews, a tasks summary, and a calendar list.
Architecture — the agent loop
The model's own classification of each email drives which tools fire next — the pipeline is not hardcoded. The same tool functions back the CLI agent and the MCP server.
Quick start (2 minutes)
This installs an inbox-to-action console command (and the python -m inbox_to_action.mcp_server entry point used by Claude Code / Glama).
Free-first: run end-to-end on zero spend
Pick whichever keyless/free path you like — all run the full pipeline at no cost:
Option A — claude CLI (keyless, fastest; uses your Claude Code login):
Option B — Ollama (truly keyless, fully local):
Option C — OpenRouter free model (free signup key):
Option D — inside Claude Code (keyless, Claude Code is the LLM): see below.
--mock uses the bundled sample inbox so you can see a full report with zero Gmail
setup. Drop --mock once you've authorized Gmail. Free OpenRouter models are often
rate-limited; the client auto-rotates a fallback list and retries with backoff.
Real inbox
--no-drafts— classify, summarize, extract tasks, write the report, but create no Gmail drafts. Recommended for a first run.--max N— cap emails per account (default 25) to bound cost/volume.- Automated no-reply senders (security alerts, notifications) never get a drafted reply — the report notes them instead.
Telegram summary (--telegram)
Push a concise summary to your phone after each run — counts, action-needed subjects (with draft-ready status), extracted tasks, and a link to your Gmail Drafts.
Off by default (opt-in flag). A send failure never breaks the run. Privacy: this sends email subjects + extracted tasks to Telegram's servers (into your own chat). It's notification only — it never sends email.
Multiple accounts (Gmail + Google Workspace)
Declare accounts in config.json — one merged report, each email tagged with its
account. Personal Gmail and Workspace both use the Gmail path (Workspace may need
your admin to allow the OAuth app).
Multiple personal Gmail accounts can reuse one client_secret.json — each gets its
own cached token (~/.config/inbox-to-action/tokens/<id>.json). With no accounts
block, the tool uses a single default Gmail account (backwards compatible).
Use inside Claude Code (keyless)
When run inside Claude Code, Claude Code is the LLM — no provider key needed. Two integration paths ship in this repo:
MCP server
Exposes IO-only tools (fetch_emails, save_gmail_draft, append_tasks, write_report).
Claude Code does the classify/summarize/extract/draft reasoning itself and calls these.
This is the same stdio server that MCP registries (e.g. Glama) build from
the bundled Dockerfile (CMD python -m inbox_to_action.mcp_server).
Skill
Copy skills/inbox-to-action/ into your Claude Code skills directory, then type
/inbox-to-action. The skill instructs Claude Code to fetch, reason, draft, and write
the report — keyless.
Anthropic (keyless via ant auth login)
The Anthropic provider uses the official SDK with a zero-arg client, so it picks up your
ant auth login OAuth profile — no ANTHROPIC_API_KEY required:
Configuration
All keys live in .env (.env.example is committed). Switch providers with PROVIDER:
openrouter (default) · ollama · nim · openai · anthropic · claude · host.
Configure triage (make it yours)
The default buckets are generic — newsletters and job alerts are treated as no-action.
Override that with config.json (copy config.example.json). Two layers:
rules— deterministicfield → categoryoverrides applied before the LLM (fast, free, exact). First match wins.field∈sender | subject | body | any.triage_instructions— freeform guidance injected into the classifier prompt for nuance the model interprets.
Quick override without a file: TRIAGE_INSTRUCTIONS="treat job alerts as action_needed".
Tests
Docs
- docs/ — full guides with screenshots: install, every LLM provider, Gmail OAuth, multi-account, integrations, MCP & Skill, config, troubleshooting, testing checklist.
- SETUP.md — 5-minute quickstart.
- PRIVACY.md — what leaves your machine, per provider.
- SECURITY.md — never-send invariant + vulnerability disclosure.
- CHANGELOG.md — version history.
- CONTRIBUTING.md — dev setup + the never-send rule.
- CLAUDE.md — project map for Claude Code.
Built with
This project demonstrates the contract skills:
- Agentic orchestration — model-driven, per-email tool selection (no hardcoded pipeline).
- Function calling — typed tool schemas (
agent.TOOL_SCHEMAS) shared by the CLI agent and MCP server. - Multi-API integration — Gmail + LLM + Todoist in one flow.
- Pluggable LLM providers — one
llm_clientswaps OpenRouter / Ollama / NIM / OpenAI / Anthropic. - Claude Code integration — first-class MCP server and Skill, both keyless.
License
MIT — see LICENSE.
來源:README.md,提交 ff6390d
工具
0版本歷史
1- v0.2.11最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分