Minimal MCP server for downloading Gmail attachments to disk. Read-only OAuth by default.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"gmail-attachments": {
"args": [
"serve"
],
"command": "gmail-attachments-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A focused Model Context Protocol server (and standalone CLI) for downloading Gmail attachments to disk. Three tools, read-only OAuth scope, no extra surface area.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'gmail-attachments-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked gmail-attachments-mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication / security
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Proof primitive for AI agents on MultiversX. Anchor file hashes on-chain as verifiable proofs.
Model Context Protocol for WinDBG
MCP Security Weekly
Get CVE alerts and security updates for io.github.zayansalman/gmail-attachments-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A focused Model Context Protocol server (and standalone CLI) for downloading Gmail attachments to disk. Three tools, read-only OAuth scope, no extra surface area.
Built because the hosted claude.ai Gmail connector in Claude Desktop returns attachment IDs and metadata only — not the actual bytes. This server fills that gap for any MCP client (Claude Code, Claude Desktop, Cursor, Cline, etc.), and also works as a plain CLI for cron jobs and shell scripts.
If you used @GongRzhe/Gmail-MCP-Server (1.1k★, archived 2026-03-03) for its attachment-download workflow, this is a minimal successor focused on that single capability.
gmail_search, gmail_download_thread_attachments, gmail_download_latest_matching. That's the whole API.gmail.readonly) — can't send, delete, or modify mail.GMAIL_MCP_CREDENTIALS, GMAIL_MCP_TOKEN, GMAIL_MCP_DEFAULT_DEST_DIR.pip install gmail-attachments-mcp
# or, with uv:
uv tool install gmail-attachments-mcp
You need a Google Cloud OAuth client. The server runs entirely on your machine; nothing leaves it.
gmail-attachments-mcp setup --import-credentials ~/Downloads/client_secret_*.json
A browser window opens for OAuth consent. After consent, a refresh token is cached at ~/.config/gmail-attachments-mcp/token.json (or $XDG_CONFIG_HOME/gmail-attachments-mcp/).
Verify:
gmail-attachments-mcp status
gmail-attachments-mcp search "has:attachment newer_than:7d" --max 3
See docs/setup-google-oauth.md for screenshots and troubleshooting.
claude mcp add --scope user gmail-attachments gmail-attachments-mcp -- serve
Then in any Claude Code session:
Use the gmail-attachments MCP to download the latest CV from
careers@example.comto~/CVs.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%/Claude/claude_desktop_config.json (Windows):
{
"mcpServers": {
"gmail-attachments": {
"command": "gmail-attachments-mcp",
"args": ["serve"]
}
}
}
Restart Claude Desktop. See docs/claude-desktop.md for details.
Any MCP client that supports stdio servers. Point it at the same gmail-attachments-mcp serve command. See docs/other-clients.md.
# Search
gmail-attachments-mcp search "from:noreply@stripe.com has:attachment newer_than:30d"
# Download every attachment from a specific thread
gmail-attachments-mcp thread 19db831fab15b507 --dest ~/Invoices
# Download from the lat
... [View full README on GitHub](https://github.com/zayansalman/gmail-attachments-mcp#readme)