Receipt Sweep
Connects to a Gmail inbox over IMAP using an App Password, allowing searches across all folders for receipts and invoices, reading email content, and saving attachments for spending extraction and categorization.
Connects to iCloud Mail over IMAP using an app-specific password, enabling searches across all folders for receipts and invoices, reading email content, and saving attachments for spending extraction and categorization.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Receipt Sweep Sweep my Gmail inbox for receipts from last year and build a categorized spending spreadsheet."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ Receipt Sweep
An MCP server + Claude skill that connects to your email inbox, finds receipts and invoices, and builds a categorized spending spreadsheet β all powered by AI.
How it works
βββββββββββββββ IMAP ββββββββββββββββββββ MCP βββββββββββββ
β Your Email βββββββββββββββΊβ Receipt Sweep βββββββββββββββΊβ Claude β
β (Gmail, β App β MCP Server β tools β (AI) β
β Yahoo, β Password β β β β
β Outlook) β β β’ search_emails β β Extracts β
βββββββββββββββ β β’ read_email β β amounts, β
β β’ save_attachmentβ β categoriesβ
ββββββββββββββββββββ β & builds β
β .xlsx β
βββββββββββββYou install the MCP server and skill
You pick your provider, date range and options, then give your email address and an App Password (never stored)
Claude connects via IMAP and searches every folder for receipts
Claude reads each email, including HTML-only and PDF receipts, and extracts dates, amounts and store names
Claude builds a formatted Excel spreadsheet and an offline dashboard with categories and totals
Related MCP server: email-mcp
Supported email providers
Provider | IMAP Host | Auth |
Gmail | imap.gmail.com | |
Yahoo Mail | imap.mail.yahoo.com | |
Outlook / Hotmail | outlook.office365.com | Password or App Password |
iCloud Mail | imap.mail.me.com | |
Custom | Any IMAP server | Password |
Before you start
Do these once, before installing:
Install
uv. The plugin starts its server withuv, a small Python tool runner. It also downloads a suitable Python for you if needed.macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Open a new terminal and check it with
uv --version.Fully quit and reopen Claude (Desktop or Claude Code) after installing
uv. Apps read yourPATHwhen they start, so a Claude that was already running can't finduv, and the server fails with a "Connection closed" error.Create an App Password for the email account you want to sweep, using the links in Supported email providers. It's a separate password just for this tool, not your normal login. Gmail needs 2-Step Verification turned on first.
Installation
The quickest path is the Claude plugin. The install scripts further down are the manual route for Claude Desktop.
Install as a Claude plugin (recommended)
In the Claude desktop app: open Settings β Plugins, click + Add, add the
marketplace saranya-ms/receipt-sweep, then install Receipt Sweep from
From marketplaces you added.
In Claude Code (terminal):
/plugin marketplace add saranya-ms/receipt-sweep
/plugin install receipt-sweep@receipt-sweepEither way this installs the MCP server and the receipt-sweep skill together.
Plugins load when a session starts, so start a new session, then say
"Sweep my email for receipts."
Install scripts (Claude Desktop)
macOS / Linux
git clone https://github.com/saranya-ms/receipt-sweep.git
cd receipt-sweep
./install.shWindows
git clone https://github.com/saranya-ms/receipt-sweep.git
cd receipt-sweep
.\install.ps1What the installer does
The script route needs Python 3.10+ and git, but not uv.
Checks for Python 3.10+
Creates a virtual environment in
.venv/Installs the MCP server package
Registers the server in your Claude Desktop config
Manual installation
If you prefer to install manually:
# Create and activate a venv
python3 -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
# Install the package
pip install -e .
# Add to your Claude Desktop config (claude_desktop_config.json):
# {
# "mcpServers": {
# "receipt-sweep": {
# "command": "/path/to/receipt-sweep/.venv/bin/receipt-sweep-mcp",
# "args": []
# }
# }
# }Usage
After installation, start a new session and say:
"Sweep my email for receipts"
Claude sets things up in two quick steps:
A few choices in one go: your email provider, how far back to look (last 30 days, last 3 months, this year, or since your last sweep), whether to count out-of-pocket spending or full receipt totals, and where to save the files.
Your email address and App Password. Claude shows the steps to create an App Password for your provider. Spaces in it are fine; Claude removes them.
Then it connects, sweeps every folder, and confirms what it's doing before it starts.
The spreadsheet it produces
Sheet 1 β Receipts: Every transaction with Date, Store, Category, Amount, Currency, and Notes
Sheet 2 β Summary: Spending totals by category
Sheet 3 β Notes: What was searched, what was excluded, and a Needs review list of any orders whose amount couldn't be read automatically
Plus β an offline HTML dashboard: a self-contained .html file with KPI tiles, a
spending-by-category chart, a month-by-month chart, top merchants, and a sortable
transaction table. It renders entirely in the browser with no internet connection β all
charts are inline SVG and there are no external requests.
Out-of-pocket amounts
By default, amounts are what you actually paid. When a receipt is split, for example a massage billed partly to an insurance or benefits plan, only your own payment is counted, and the full total and who covered the rest go in the Notes column. Choose full receipt totals at the start if you'd rather track the gross amount.
Receipts it can read
Plain-text and HTML emails. Some stores (Old Navy, Gap and others) put the order total only in the HTML version of the email; Claude reads whichever version has it.
PDF receipts. When the email just says "your receipt is attached", Claude reads the total straight from the PDF.
Incremental sweeps
Each run can save its state so the next run picks up where it left off β no duplicate scanning.
MCP Tools provided
Tool | Description |
| Show supported providers and App Password instructions |
| Connect to an inbox via IMAP |
| Close the connection |
| Check the connection is alive (reconnects if it dropped) and show the server version |
| List all mailbox folders |
| Search one folder by sender, subject, date range |
| Read the full content of an email |
| Read the text of a PDF receipt attached to an email |
| Download a PDF or other attachment |
| Search across every folder at once |
Security & privacy
App Passwords only β the server never sees your real password
No storage β credentials are held in memory for the session only (so a dropped connection can reconnect automatically); nothing is written to disk. The App Password you type is visible in your Claude conversation, so revoke it after a sweep if you prefer
Read-only β the server opens mailboxes in read-only mode; it never modifies, moves, or deletes emails
Local β the MCP server runs on your machine; email data never leaves your computer except to Claude for AI processing
Revocable β you can revoke the App Password at any time from your email provider's security settings
Privacy Policy
Receipt Sweep runs entirely on your own machine.
Data collection β The server reads only the mailbox data you ask it to: email headers, bodies, and attachments returned by your IMAP searches. It collects no analytics, telemetry, or usage data.
Usage & storage β Your email address and App Password are held in memory for the session only (to reconnect automatically if the connection drops) and are never written to disk. Email content is passed to Claude solely to extract receipt data at your request.
Third-party sharing β Nothing is sent to the author or any other third party. Data leaves your machine only to (a) your email provider over TLS/IMAP and (b) Claude, for the AI processing you initiate.
Data retention β No credentials or email data are retained after the session ends. Spreadsheets and dashboards are written only to the location you choose.
Contact β Questions or issues: https://github.com/saranya-ms/receipt-sweep/issues
Requirements
uvfor the plugin install path (it provides Python automatically), or Python 3.10+ for the install scriptsClaude Desktop or Claude Code
An email account with IMAP access and an App Password
Troubleshooting
Symptom | Fix |
Server shows "Connection closed" / the tools aren't available |
|
Plugin installed but Claude doesn't use it | Plugins load at session start. Start a new session. |
"Login failed" | Use an App Password, not your regular password. Check for typos, or create a new one. Gmail needs 2-Step Verification on first. |
Plugin manager shows an old name, icon, or "no plugin in this marketplace" right after an update | The app cached the marketplace. Remove and re-add the marketplace, or wait a few minutes (GitHub caches the files briefly) and restart Claude. |
An order shows up under Needs review | Its amount wasn't readable in the email or its PDF. Open the email, then add the amount yourself or tell Claude. |
Claude says the server is outdated, Old Navy/Gap totals come back empty, or parallel reads fail with | You're running an old copy of the plugin. The Claude desktop app / claude.ai and the Claude Code CLI each keep their own copy, and they update separately. Update Receipt Sweep in the one you're using, then start a new session. The |
Saving the spreadsheet fails with "permission denied" or "resource busy" | The file is open in Excel (or OneDrive is still syncing it). Close it and ask Claude to try again; Claude saves a |
Distribute as a plugin
This repo is also a Claude plugin and its own marketplace (.claude-plugin/). Users
install it with the two /plugin commands in Installation.
Submit it to Anthropic's directory
To list it in the public directory (installable from claude.ai and Cowork, and synced into Claude Code):
Validate locally:
claude plugin validate ./ --strict.From a paid Claude plan, open claude.ai/directory/manage β Submit new β Plugin. The portal reads the listing fields from
.claude-plugin/plugin.jsonand the Privacy Policy section above.Anthropic auto-scans the submission for policy compliance and lists it as a Community plugin; some submissions also get a human review. Track status in the portal.
License
MIT
Available Tools
10 toolsconnect_emailA
Connect to an email inbox via IMAP.
Args: provider: Provider name ('gmail', 'yahoo', 'outlook', 'icloud') or a raw IMAP hostname (e.g. 'imap.example.com'). email_address: The full email address to sign into. app_password: An App Password for the account (NOT the regular password). See list_email_providers() for how to create one.
Returns a status message. The connection persists for subsequent tool calls.
Inputs: provider (required), app_password (required), email_address (required). Returns: result
connection_statusARead-only
Check whether an email connection is active, and report the server version.
Sends a NOOP so a socket the mail server has silently closed is noticed (and re-opened) here rather than on the next search or read.
Inputs: no named parameters. Returns: result
disconnect_emailA
Disconnect from the current email inbox.
Inputs: no named parameters. Returns: result
list_email_providersARead-only
List supported email providers and their setup instructions.
Call this first to show the user which providers are supported and how to generate an App Password for their provider.
Inputs: no named parameters. Returns: result
list_foldersARead-only
List all folders/labels in the connected mailbox.
Returns folder names that can be passed to search_emails and read_email.
Inputs: no named parameters. Returns: result
read_emailARead-only
Read the full content of a specific email.
Args: message_id: The message ID from search_emails results. folder: The folder the message is in (must match the search).
Returns the email's date, sender, subject, body text, and a list of any attachments (with filenames and sizes). The body is taken from whichever of the plain-text or HTML parts contains the order details. If has_pdf is true and the body has no amount, call read_pdf_attachment.
Inputs: message_id (required), folder. Returns: result
read_pdf_attachmentARead-only
Extract the text of a PDF attachment, such as an emailed receipt.
Use this when read_email lists a PDF attachment and the body only says something like "your receipt is attached".
Args: message_id: The message ID from search_emails results. filename: The PDF's filename (from read_email's attachments list). folder: The folder the message is in.
Returns the PDF's text, or an error message.
Inputs: filename (required), message_id (required), folder. Returns: result
save_attachmentA
Download an email attachment and save it to disk.
Args: message_id: The message ID from search_emails results. filename: The attachment filename (from read_email's attachments list). save_path: Local file path to save the attachment to. folder: The folder the message is in.
Returns the path to the saved file, or an error message.
Inputs: filename (required), save_path (required), message_id (required), folder. Returns: result
search_all_foldersARead-only
Search across ALL folders in the mailbox (inbox, spam, trash, archive, custom folders).
Same parameters as search_emails but runs the search in every folder. Returns results grouped by folder, plus any folders that could not be searched. Slower but thorough.
Inputs: since_date, before_date, from_address, body_or_subject, +2 more. Returns: result
search_emailsARead-only
Search for emails in a folder.
Args: folder: Mailbox folder to search (default 'INBOX'). Use list_folders() to see all available folders. Common: INBOX, Sent, Trash, [Gmail]/All Mail, Bulk (Yahoo spam), Archive. from_address: Filter by sender email address. subject_contains: Filter by text in the subject line. body_or_subject: Search for text in the subject OR body. since_date: Only emails on or after this date (YYYY-MM-DD). before_date: Only emails before this date (YYYY-MM-DD). limit: Max results to return (default 50, newest first).
Returns a JSON list of {id, date, from, subject} for matching emails. Use read_email() with the id to get the full content.
Inputs: limit, folder, since_date, before_date, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 10 tools
Most tools target clearly distinct operations (connect vs. search vs. read vs. attachment handling). The main overlap is search_emails vs. search_all_folders, and connect_email vs. connection_status, but the descriptions clearly differentiate scope and intent.
Nearly all tools use a consistent snake_case verb_noun pattern (connect_email, search_emails, read_email, save_attachment). The noun-only connection_status is a minor deviation but still readable and unambiguous.
Ten tools is well-scoped for an email/receipt-sweeping server, covering connection lifecycle, discovery, search, reading, and attachments without redundancy.
The surface covers the full read-side lifecycle: connect/disconnect/status, provider and folder discovery, single- and all-folder search, message reading, and PDF/attachment extraction. Missing write operations (delete, move, mark) are outside the stated receipt-extraction purpose.
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.401,009 npm135MIT
- FlicenseNot gradedqualityBmaintenanceEnables Claude to read, search, draft, send, flag, and move email across multiple IMAP/SMTP mailboxes while keeping credentials local.-
- FlicenseNot gradedqualityDmaintenanceEnables Claude Code to manage email inboxes via IMAP, including reading, categorizing, phishing detection, archiving, junking, and sending emails with user permission.-
- AlicenseAqualityCmaintenanceEnables Claude to read, manage, and send email from any IMAP mailbox over plain IMAP and SMTP, including hosting-company and self-hosted mail servers. It provides tools for searching, reading, moving, deleting, and composing messages while built-in safety rules prevent unintended changes.12MIT