Gmail Attachment MCP Server

Gmail Attachment MCP Server

gmail-attachment-mcp-server•bygnmahanth

A FastMCP server that downloads Gmail message attachments using a message ID over IMAP.

License: MIT•Runtime: Awaiting documentation review•Category: communication social

WHAT IT DOES

  • •Downloads attachments from a Gmail message identified by its message ID.
  • •Lets the caller choose the download folder, defaulting to ./attachments.
  • •Returns the file paths of the downloaded attachments.
  • •Connects to Gmail securely using IMAP over SSL.

BEST FOR

  • •Automating retrieval of attachments from specific Gmail messages.
  • •Workflows that need Gmail attachments saved to a local folder.

ABOUT GMAIL-ATTACHMENT-MCP-SERVER

Gmail Attachment MCP Server is cataloged as an MCP server attributed to gnmahanth. A FastMCP server that downloads Gmail message attachments using a message ID over IMAP. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Gmail Attachment MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What does download_attachments_tool return?

It returns a list of strings containing the file paths of downloaded attachments.

How are Gmail credentials provided?

Credentials are set through environment variables for the Gmail username and password.

Upstream README

View this exact version on GitHub

README.md · 55363ef689fb · Fetched 2026-11-13 11:41:54 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Gmail Attachment MCP Server

A server that provides a microservice for downloading Gmail attachments using the Message Control Protocol (MCP).

Overview

This project implements a FastMCP server that allows you to download attachments from Gmail messages using a message ID. It uses IMAP to connect to Gmail and fetch the attachments.

Features

  • Download attachments from Gmail messages using message ID
  • Secure connection to Gmail using IMAP over SSL
  • Environment variable configuration for credentials
  • Simple API interface through MCP

Prerequisites

  • Python 3.7 or higher
  • uv needs to be installed
  • Gmail account with IMAP enabled
  • App Password for Gmail (if using 2-Step Verification)

Installation

# Clone the repository
git clone https://github.com/yourusername/gmail-attachment-mcp-server.git
cd gmail-attachment-mcp-server

# Install dependencies
uv sync

Configuration

Set the following environment variables:

export GMAIL_USERNAME="your.email@gmail.com"
export GMAIL_PASSWORD="your_app_password"
export GMAIL_IMAP_SERVER="imap.gmail.com" # Optional, defaults to imap.gmail.com

Note: For Gmail, you should use an App Password instead of your regular password. See Google's documentation for more information.

Usage

Starting the server

python server.py
# or
mcp run server.py

Using the tool

The server exposes a download_attachments_tool that accepts the following parameters:

  • message_id: The Gmail message ID in hexadecimal format
  • download_folder: (Optional) The folder to download attachments to (defaults to "./attachments")

The function returns a list of paths to the downloaded attachment files.

using with mcp inspector

npx @modelcontextprotocol/inspector uv run mcp run server.py

using with goose

extensions:
  gmail-attachment-mcp-server:
    args:
      - run
      - /path to virtual env/.venv/bin/mcp
      - run
      - /path to gmail-attachment-mcp-server/server.py
    bundled: null
    cmd: uv
    description: null
    enabled: true
    env_keys:
      - GMAIL_USERNAME
      - GMAIL_PASSWORD
    envs: {}
    name: gmail-attachment-mcp-server
    timeout: 300
    type: stdio

API Reference

download_attachments_tool

download_attachments_tool(message_id: str, download_folder="./attachments") -> list[str]

Downloads attachments from a Gmail message identified by its message ID.

Parameters:

  • message_id: The Gmail message ID in hexadecimal format
  • download_folder: (Optional) The folder to download attachments to (defaults to "./attachments")

Returns:

  • A list of strings containing the file paths of downloaded attachments

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Gmail Attachment MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/gmail-attachment-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related communication social MCP Servers

Alternative and complementary servers in the same category

View all in communication social →

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

52
Communication

Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

Repository stats unavailable
Communication