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.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

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.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 55363ef689fb · 采集于 2026-11-13 11:41:54 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

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.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

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