MCP.Market

Gmail Attachments MCP server

by zayansalman·io.github.zayansalman/gmail-attachments-mcp·v0.1.0·2 stars

Minimal MCP server for downloading Gmail attachments to disk. Read-only OAuth by default.

B72/100grade B
What users say
No reviews yet
Be the first
Safety scan
B72/100

full report

Adoption
Growing

2 stars164 downloads/wk

Reviews

Write one

Nobody has reviewed Gmail Attachments yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Gmail Attachments tools (3)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • gmail_download_latest_matching

    Find the most recent thread matching the query and download its attachments.

  • gmail_download_thread_attachments

    Download every attachment from a Gmail thread to disk.

  • gmail_search

    Search Gmail threads. Returns thread summaries with attachment filenames as JSON.

Public scan report

scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it

no findings
  • Code scan9 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 110 days ago8/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 72/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Gmail Attachments compares

Against every graded Email MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
72/100
higher than 42% of 916 Email servers
Tools
3
the typical Email server has 7
Tools that change things
0%
typical: 25%. Fewer write tools means less an agent can break
GitHub stars
2
more than 75% of 493 Email servers
Downloads a week
164
more than 68% of 235 Email servers with a package

What its tools let an agent do: 3 read

Install Gmail Attachments in Claude Code, Cursor or VS Code

claude mcp add gmail-attachments-mcp -- uvx gmail-attachments-mcp
Add to Cursor

What the publisher says

From the Gmail Attachments repository's README, as published. We do not edit it. Read it on GitHub

gmail-attachments-mcp

<!-- mcp-name: io.github.zayansalman/gmail-attachments-mcp -->

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.

Features

  • 3 MCP tools — gmailsearch, gmaildownloadthreadattachments, gmaildownloadlatest_matching. That's the whole API.
  • Read-only OAuth scope (gmail.readonly) — can't send, delete, or modify mail.
  • Works as both an MCP server and a standalone CLI — same code, same auth token, both surfaces.
  • Env-var-driven config — GMAILMCPCREDENTIALS, GMAILMCPTOKEN, GMAILMCPDEFAULTDESTDIR.
  • Cron-friendly — once authorized, the cached refresh token lets headless jobs run indefinitely.

Install

pip install gmail-attachments-mcp
# or, with uv:
uv tool install gmail-attachments-mcp

One-time setup (~10 minutes)

You need a Google Cloud OAuth client. The server runs entirely on your machine; nothing leaves it.

  1. Sign in to Google Cloud Console with the Gmail account whose attachments you want to download.
  2. Create a project (or pick an existing one).
  3. Enable the Gmail API: console.cloud.google.com/apis/library/gmail.googleapis.com.
  4. Configure the OAuth consent screen under APIs & Services → OAuth consent screen:
  • Google Workspace users: User type = Internal (no app verification needed).
  • Personal Gmail users: User type = External. Add your own Gmail address as a test user under "Test users".
  1. APIs & Services → Credentials → + Create credentials → OAuth client ID
  • Application type: Desktop app
  • Download the JSON.
  1. Run setup:
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 $XDGCONFIGHOME/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.

Use it from Claude Code

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.com to ~/CVs.

Use it from Claude Desktop

Edit ~/Library/Application Support/Claude/claudedesktopconfig.json (Mac) or %APPDATA%/Claude/claudedesktopconfig.json (Windows):

{
  "mcpServers": {
    "gmail-attachments": {
      "command": "gmail-attachments-mcp",
      "args": ["serve"]
    }
  }
}

Restart Claude Desktop. See docs/claude-desktop.md for details.

Use it from Cursor / Cline / Continue / others

Any MCP client that supports stdio servers. Point it at the same gmail-attachments-mcp serve command. See docs/other-clients.md.

Use it from the shell or cron

# 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

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Gmail Attachments: common questions

Is Gmail Attachments MCP server safe?
Mostly: it is graded B (72/100). Read the Gmail Attachments safety report
How do I install Gmail Attachments?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Gmail Attachments need an API key?
Yes. The registry entry asks for GMAIL_MCP_TOKEN.
Is Gmail Attachments maintained?
The last commit was 148 days ago (2026-06-09). The latest release is v0.1.0.
What can I use instead of Gmail Attachments?
Servers from other publishers that do the same job: Gmail MCP server, Mailoo - Email MCP Server and Workspace MCP server.
How does Gmail Attachments compare with other Email MCP servers?
safety score 72/100 (higher than 42% of 916 Email servers); tools 3 (the typical Email server has 7); tools that change things 0% (typical: 25%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to Gmail Attachments

Same job from other publishers: the closest match first, then the best rated.

  • Gmail
    Gmail integration with OAuth authentication, message search, batch operations, and Sheets export
    C
  • Mailoo - Email MCP Server
    Email MCP server for AI agents: IMAP/SMTP, Gmail, Outlook, calendar, ManageSieve, AI triage, OAuth2.
    A
  • Workspace
    Google Workspace MCP server for Gmail, Drive, Calendar, Docs, Sheets, Slides, Forms, Tasks, Chat.
    A
  • Inbox Zero
    Search Gmail and Outlook, save drafts, manage email rules, and view email stats.
    A
  • Connectors
    Read Gmail, read and commit to GitHub, update Sheets, and post to Slack through Composio.
    A

More from zayansalman →