Skip to main content
Glama
Inbox Triage MCP Server

Inbox Triage MCP Server

README.md
# Inbox Triage MCP Server

Say **"triage my new emails"** and Claude reads each new email, decides what it is,
and logs it to a spreadsheet: who wrote, what they want, priority, and the next step.

| contact | category | priority | next action |
|---|---|---|---|
| Rachel Green, Cafe Central | sales_lead | high | Send wholesale price list before Friday |
| David Shapiro | support_issue | high | Apologize and ship a replacement today |
| BeanSupply Ltd | supplier_invoice | medium | Schedule payment before Dec 5 |
| Growth Hacks Weekly | newsletter_or_spam | low | Ignore or unsubscribe |

*(Example run on the included sample inbox of a fictional coffee roaster.)*

## Why this design

- **No per-use API costs.** The reasoning runs inside Claude Desktop / Claude Code.
  The server only gives Claude four narrow tools.
- **Safe by construction.** Claude can list, read, and log. It can't send, delete, or forward email.
- **Validated output.** Categories and priorities are fixed lists; bad values are rejected with the reason,
  each email is logged once, and processed emails never come back.
- **Opens anywhere.** The log is a UTF-8 CSV that opens in Excel and Google Sheets (Hebrew and other
  languages included).

## Tools

| Tool | What it does |
|---|---|
| `list_new_emails` | Emails not yet triaged: sender, subject, date, preview |
| `read_email` | Full text of one email |
| `log_email` | Writes one validated row to the triage sheet and marks the email done |
| `triage_report` | Counts by category / priority and the open high-priority items |

## Run it

```bash
pip install mcp
python make_sample_inbox.py   # sample .eml inbox
python test_client.py         # end-to-end test over stdio
```

Claude Desktop (`claude_desktop_config.json`):

```json
{ "mcpServers": { "inbox-triage": { "command": "python", "args": ["/full/path/to/server.py"] } } }
```

Claude Code: `claude mcp add inbox-triage -- python /full/path/to/server.py`

Settings: `INBOX_DIR` (folder of .eml files), `TRIAGE_CSV` (output file).
In client projects the email source is Gmail / Outlook / IMAP and the output can be Google Sheets, Airtable or a CRM.