Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’¬ Communication
  3. Gmail Attachments MCP
G
Health: Not checked yetWe have not completed a health check for this listing yet.No health check has run yet.

Gmail Attachments MCP

User RatingsBe the first to rate and review this MCP server! Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View Repository

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

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gmail-attachments-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gmail-attachments-mcp"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing AlternativesπŸ’¬ More in Communication

Documentation Overview

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 β€” gmail_search, gmail_download_thread_attachments, gmail_download_latest_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 β€” GMAIL_MCP_CREDENTIALS, GMAIL_MCP_TOKEN, GMAIL_MCP_DEFAULT_DEST_DIR.
  • Cron-friendly β€” once authorized, the cached refresh token lets headless jobs run indefinitely.

Install

Terminal
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".
  5. APIs & Services β†’ Credentials β†’ + Create credentials β†’ OAuth client ID
    • Application type: Desktop app
    • Download the JSON.
  6. Run setup:
bash
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:

bash
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

Terminal
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/claude_desktop_config.json (Mac) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

config.json
{
  "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

bash
# 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 latest match, only PDFs
gmail-attachments-mcp latest "from:hr@example.com has:attachment" --dest ~/CVs --ext .pdf,.docx

Cron example β€” pull CV attachments hourly:

cron
0 * * * * /usr/local/bin/gmail-attachments-mcp latest "to:careers@example.com has:attachment newer_than:2d" --dest ~/CVs --ext .pdf,.docx >> ~/.cache/gmail-attachments-mcp.log 2>&1

The 3 MCP tools

gmail_search(query, max_results=10)

Returns thread summaries with attachment filenames. Use Gmail's standard query syntax.

config.json
[
  {
    "thread_id": "19db831fab15b507",
    "subject": "Folon Q3 2026 Quarterly Product Recap",
    "sender": "Manon Muhtasin Rahman <manon@example.com>",
    "date": "Thu, 23 Apr 2026 08:35:00 +0600",
    "snippet": "Hi everyone, Attached is...",
    "message_count": 1,
    "attachment_count": 1,
    "attachment_filenames": ["Folon Quarterly Report Q3 2026.pdf"]
  }
]

gmail_download_thread_attachments(thread_id, dest_dir?, extensions?)

Downloads every attachment in a thread to disk. Returns path, size_bytes, mime_type, original_filename per file.

gmail_download_latest_matching(query, dest_dir?, extensions?)

Convenience: search + download from the single most recent match, in one call.

Configuration

All paths can be overridden via environment variables.

VariableDefaultWhat
GMAIL_MCP_CREDENTIALS~/.config/gmail-attachments-mcp/credentials.jsonOAuth client secret JSON
GMAIL_MCP_TOKEN~/.config/gmail-attachments-mcp/token.jsonCached refresh token
GMAIL_MCP_DEFAULT_DEST_DIR~/DownloadsDefault download destination
GMAIL_MCP_SCOPEShttps://www.googleapis.com/auth/gmail.readonlyOAuth scopes (comma-separated)
XDG_CONFIG_HOME~/.configStandard XDG override

Security

  • Token storage: refresh token is written to ~/.config/gmail-attachments-mcp/token.json with mode 0600. Anyone with shell access to your account can read your Gmail. Treat the file like a password.
  • OAuth scope: default is gmail.readonly. Cannot send, delete, or modify mail. If you change $GMAIL_MCP_SCOPES, you're on the hook for the consequences.
  • Credential file: your OAuth client secret JSON is not a password β€” it identifies your app to Google. But never commit it. The included .gitignore blocks the common filenames.
  • OAuth client: your client lives in your Google Cloud project. There's no central server, no telemetry, nothing leaves your machine.

Troubleshooting

No valid Gmail token when invoked from Claude Desktop / cron The first OAuth flow requires a browser. Run gmail-attachments-mcp setup once in a terminal where a browser can open. Subsequent runs use the cached refresh token.

Token has been expired or revoked Refresh tokens stay valid as long as you use them at least every 6 months and don't revoke them at myaccount.google.com/permissions. Re-auth:

bash
gmail-attachments-mcp setup --reauth

Access blocked: This app's request is invalid On personal Gmail, your OAuth consent screen needs your address listed under Test users. Workspace users should select Internal audience to avoid this.

HttpError 403: Request had insufficient authentication scopes You changed $GMAIL_MCP_SCOPES without re-authorizing. Run gmail-attachments-mcp setup --reauth.

Comparison with other Gmail MCP servers

ServerScopeToolsMaintenance
Anthropic hosted claude.ai GmailRead/write, hostedmanyActive, but no attachment bytes
GongRzhe/Gmail-MCP-ServerFull mailbox19Archived 2026-03-03
shinzo-labs/gmail-mcpFull mailbox~30Active
gmail-attachments-mcp (this)read-only3Active

Pick this one if you want a tiny, focused, read-only tool. Pick a fuller one if you also need to send mail, manage labels, drafts, threads, etc.

Authentication β€” bring your own Google OAuth client

There are no API keys and no shipped secrets. The server authenticates to your Google account with an OAuth client you create, and caches a refresh token locally. The author has zero access to your data.

  • Why your own client? Google's restricted scopes (here, gmail.readonly) can't be redistributed in a shared app, and an unverified shared app is capped at 100 users. "Bring your own OAuth client" is the standard pattern for personal-data MCP servers.
  • What you need: a free Google Cloud project, the Gmail API enabled, an OAuth consent screen, and a Desktop OAuth client. Full walkthrough β†’ docs/setup-google-oauth.md.
  • Where your token lives: ~/.config/gmail-attachments-mcp/token.json (mode 0600). Delete it to revoke locally; revoke fully at myaccount.google.com/permissions.
  • No hosted/SaaS option β€” everything runs locally; your mail never touches a third-party server.

Related tools

Part of a small family of focused, local MCP servers for Google Workspace data the hosted connectors don't expose:

  • gmail-attachments-mcp β€” download Gmail attachment bytes to disk (this repo)
  • google-drive-comments-mcp β€” read comment threads on Docs/Sheets/Slides
  • google-drive-files-mcp β€” move/organize Drive files

They can share one OAuth login or stay isolated β€” see each repo's setup.

License

MIT. See LICENSE.

Contributing

Issues and PRs welcome. Run pytest and ruff check src tests before submitting.

bash
git clone https://github.com/zayansalman/gmail-attachments-mcp
cd gmail-attachments-mcp
pip install -e ".[dev]"
pytest

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Communication View all alternatives
  • Line Bot MCP Server logoLine Bot MCP Server
    Verified

    MCP Server for Integrating LINE Official Account

    πŸ’¬ Communication3 views
    Compare vs Line Bot MCP Server β†’
  • Slack MCP Server logoSlack MCP Server

    The most powerful MCP server for Slack Workspaces.

    πŸ’¬ Communication1 views
    Compare vs Slack MCP Server β†’
  • Abnormal Security MCP logoAbnormal Security MCP

    Abnormal Security email threats, cases, and reporting in your terminal and your AI agents.

    πŸ’¬ Communication0 views
    Compare vs Abnormal Security MCP β†’
  • Mail Index logoMail Index

    Local-first, read-only MCP server for recall over your Gmail: search, contacts, threads, digests.

    πŸ’¬ Communication0 views
    Compare vs Mail Index β†’

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Gmail Attachments MCP

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "gmail-attachments-mcp": { "command": "npx", "args": ["-y", "gmail-attachments-mcp"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGmail Attachments MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gmail-attachments-mcp?style=directory)](https://allmcps.com/mcp/gmail-attachments-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/gmail-attachments-mcp"><img src="https://allmcps.com/api/badge/gmail-attachments-mcp?style=directory" alt="Gmail Attachments MCP on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ’¬Communication
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
Last updatedSep 7, 2026
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
27Quality signal: Emerging Β· 27/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership8/20
Documentation & tools11/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge and attach your website β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ’¬ Communication β†’Best MCP servers for Slack & Communication β†’Alternatives to Gmail Attachments MCP β†’Install in Claude DesktopInstall in CursorInstall in VS Code