Price Per TokenPrice Per Token
Gmail API Integration Server

Gmail API Integration Server

by hitmanly007

GitHub 1 1,049 uses Remote
0

About

Gmail API Integration Server provides comprehensive access to Gmail's email management capabilities through the Model Context Protocol. It enables AI assistants to interact with Gmail accounts for sending, organizing, and managing emails programmatically. Key features: - Send emails and create drafts directly from Gmail accounts - Retrieve, search, and manage messages and conversation threads - Organize emails with label management including custom colors and visibility settings - Configure mailbox settings including vacation responders, IMAP/POP access, and language preferences - Track mailbox history and monitor changes - Secure OAuth2 authentication through Google Cloud credentials

Tools 64

create_draft

Create a draft email in Gmail. Note the mechanics of the raw parameter.

delete_draft

Delete a draft

get_draft

Get a specific draft by ID

list_drafts

List drafts in the user's mailbox

send_draft

Send an existing draft

create_label

Create a new label

delete_label

Delete a label

get_label

Get a specific label by ID

list_labels

List all labels in the user's mailbox

patch_label

Patch an existing label (partial update)

update_label

Update an existing label

batch_delete_messages

Delete multiple messages

batch_modify_messages

Modify the labels on multiple messages

delete_message

Immediately and permanently delete a message

get_message

Get a specific message by ID with format options

list_messages

List messages in the user's mailbox with optional filtering

modify_message

Modify the labels on a message

send_message

Send an email message to specified recipients. Note the mechanics of the raw parameter.

trash_message

Move a message to the trash

untrash_message

Remove a message from the trash

get_attachment

Get a message attachment

delete_thread

Delete a thread

get_thread

Get a specific thread by ID

list_threads

List threads in the user's mailbox

modify_thread

Modify the labels applied to a thread

trash_thread

Move a thread to the trash

untrash_thread

Remove a thread from the trash

get_auto_forwarding

Gets auto-forwarding settings

get_imap

Gets IMAP settings

get_language

Gets language settings

get_pop

Gets POP settings

get_vacation

Get vacation responder settings

update_auto_forwarding

Updates automatic forwarding settings

update_imap

Updates IMAP settings

update_language

Updates language settings

update_pop

Updates POP settings

update_vacation

Update vacation responder settings

add_delegate

Adds a delegate to the specified account

remove_delegate

Removes the specified delegate

get_delegate

Gets the specified delegate

list_delegates

Lists the delegates for the specified account

create_filter

Creates a filter

delete_filter

Deletes a filter

get_filter

Gets a filter

list_filters

Lists the message filters of a Gmail user

create_forwarding_address

Creates a forwarding address

delete_forwarding_address

Deletes the specified forwarding address

get_forwarding_address

Gets the specified forwarding address

list_forwarding_addresses

Lists the forwarding addresses for the specified account

create_send_as

Creates a custom send-as alias

delete_send_as

Deletes the specified send-as alias

get_send_as

Gets the specified send-as alias

list_send_as

Lists the send-as aliases for the specified account

patch_send_as

Patches the specified send-as alias

update_send_as

Updates a send-as alias

verify_send_as

Sends a verification email to the specified send-as alias

delete_smime_info

Deletes the specified S/MIME config for the specified send-as alias

get_smime_info

Gets the specified S/MIME config for the specified send-as alias

insert_smime_info

Insert (upload) the given S/MIME config for the specified send-as alias

list_smime_info

Lists S/MIME configs for the specified send-as alias

set_default_smime_info

Sets the default S/MIME config for the specified send-as alias

get_profile

Get the current user's Gmail profile

watch_mailbox

Watch for changes to the user's mailbox

stop_mail_watch

Stop receiving push notifications for the given user mailbox

README

Gmail MCP

[](https://badge.fury.io/js/@shinzolabs%2Fgmail-mcp) [](https://smithery.ai/server/@shinzo-labs/gmail-mcp)

A Model Context Protocol (MCP) implementation for the Gmail API, providing a standardized interface for email management, sending, and retrieval.

Features

  • Complete Gmail API coverage including messages, threads, labels, drafts, and settings
  • Support for sending, drafting, and managing emails
  • Label management with customizable colors and visibility settings
  • Thread operations for conversation management
  • Settings management including vacation responder, IMAP/POP, and language settings
  • History tracking for mailbox changes
  • Secure OAuth2 authentication using Google Cloud credentials
  • Prerequisites

    To run this MCP server, you first need to set up a Google API Client for your organization, with each user running a script to retrieve their own OAuth refresh token.

    Google API Client Setup (once per organization)

    1. Go to the Google Cloud Console. 2. Create a new project or select an existing one. 3. Enable the Gmail API for your project. 4. Go to Credentials and create an OAuth 2.0 Client ID. Choose "Desktop app" for the client type. 5. Download and save the OAuth keys JSON as ~/.gmail-mcp/gcp-oauth.keys.json. ⚠️ NOTE: to create ~/.gmail-mcp/ through MacOS's Finder app you need to enable hidden files first. 6. (Optional) For remote server installation (ex. using Smithery CLI), note the CLIENT_ID and CLIENT_SECRET from this file.

    Client OAuth (once per user)

    1. Have the user copy ~/.gmail-mcp/gcp-oauth.keys.json to their computer at the same path. 2. Run npx @shinzolabs/gmail-mcp auth. 3. A browser window will open where the user may select a profile, review the requested scopes, and approve. 4. (Optional) For remote server installation, note the file path mentioned in the success message (~/.gmail-mcp/credentials.json by default). The user's REFRESH_TOKEN will be found here.

    Client Configuration

    There are several options to configure your MCP client with the server. For hosted/remote server setup, use Smithery's CLI with a Smithery API Key. For local installation, use npx or build from source. Each of these options is explained below.

    Smithery Remote Server (Recommended)

    To add a remote server to your MCP client config.json, run the following command from Smithery CLI:

    npx -y @smithery/cli install @shinzo-labs/gmail-mcp
    

    Enter your CLIENT_ID, CLIENT_SECRET, and REFRESH_TOKEN when prompted.

    Smithery SDK

    If you are developing your own agent application, you can use the boilerplate code here.

    NPX Local Install

    To install the server locally with npx, add the following to your MCP client config.json:

    {
      "mcpServers": {
        "gmail": {
          "command": "npx",
          "args": [
            "@shinzolabs/gmail-mcp"
          ]
        }
      }
    }
    

    Build from Source

    1. Download the repo:

    git clone https://github.com/shinzo-labs/gmail-mcp.git
    

    2. Install packages and build with pnpm (inside cloned repo):

    pnpm i && pnpm build
    

    3. Add the following to your MCP client config.json:

    {
      "mcpServers": {
        "gmail": {
          "command": "node",
          "args": [
            "/path/to/gmail-mcp/dist/index.js"
          ]
        }
      }
    }
    

    Config Variables

    | Variable | Description | Required? | Default | |--------------------------|---------------------------------------------------------|---------------------------------|--------------------------------------| | AUTH_SERVER_PORT | Port for the temporary OAuth authentication server | No | 3000 | | CLIENT_ID | Google API client ID (found in GMAIL_OAUTH_PATH) | Yes if remote server connection | '' | | CLIENT_SECRET | Google API client secret (found in GMAIL_OAUTH_PATH) | Yes if remote server connection | '' | | GMAIL_CREDENTIALS_PATH | Path to the user credentials file | No | MCP_CONFIG_DIR/credentials.json | | `GM

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81