Skip to main content
Glama

Gmail Manager MCP

🧹 Clean your inbox β€’ 🏷️ Organize with labels β€’ πŸ—‘οΈ Bulk delete emails

npm MCP Server MIT GitHub Sponsors Report Bug GitHub Stars

✨ What It Does

Gmail Manager MCP provides direct access to your Gmail inbox through the Model Context Protocol, allowing you to:

Feature

Description

Email Search

Find emails by sender, subject, date, or any Gmail query

Inbox Analytics

Get insights about your email patterns and volume

Read & Draft Replies

Read the full content of an email

Smart Organization

Create and apply labels to categorize emails automatically

Bulk Cleanup

Remove old newsletters, notifications, and spam efficiently

Google Calendar

List, search, create and update events, RSVP, and find times everyone is free

IMPORTANT

Upgrading from a version before calendar support? Google cannot add scopes to a token it has already issued, so your saved credentials keep working for mail while every calendar call fails with a permissions error. Enable the Calendar API and add the calendar scope as below, then re-authenticate once:

npx @spark-apps/gmail-manager-mcp@latest auth

Running a local checkout instead of the published package? Re-authenticate with the build your client actually loads, or you will re-consent against whichever version npm is serving and see the same error:

node /path/to/GMail-Manager-MCP/dist/index.js auth

Related MCP server: gmail-mcp-server

πŸš€ Quick Setup

πŸ“‹ Prerequisites: Get Gmail Credentials πŸ—οΈ

  1. Create New Project πŸ“

  2. Enable both APIs: Gmail πŸ“§ and Calendar πŸ“…

  3. Create OAuth client ID (Desktop app type) πŸ”

  4. Download as gcp-oauth.keys.json πŸ“₯

  5. Navigate to Data access β†’ Add or remove scopes β†’ add both: https://mail.google.com/ and https://www.googleapis.com/auth/calendar πŸ”“

  6. Navigate to Test users β†’ Add your Google email πŸ‘€

πŸ“ Where to put gcp-oauth.keys.json:

For Windows users in WSL:

# Copy from Windows to current directory
cp /mnt/c/Users/YourUsername/gcp-oauth.keys.json ./gcp-oauth.keys.json

General locations:

  • Current directory: ./gcp-oauth.keys.json (works everywhere)

  • Home directory: ~/gcp-oauth.keys.json (for npx usage)

  • Custom path: Set GMAIL_OAUTH_PATH environment variable


πŸ“₯ Installation

npm i -g @spark-apps/gmail-manager-mcp

git clone https://github.com/muammar-yacoob/GMail-Manager-MCP.git
cd GMail-Manager-MCP
npm install

πŸ’» Terminal Usage

# Install globally
npm i -g @spark-apps/gmail-manager-mcp

# Setup authentication (run this first)
npx @spark-apps/gmail-manager-mcp@latest auth

# Test MCP server (for debugging)
npx @modelcontextprotocol/inspector npx @spark-apps/gmail-manager-mcp@latest

βš™οΈ Configure MCP Client

Add to your MCP client config file (Claude Desktop example):

  • Windows %APPDATA%\\Claude\\claude_desktop_config.json

  • macOS ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux ~/.config/Claude/claude_desktop_config.json

πŸ“¦ For NPM Install:

{
  "mcpServers": {
    "gmail-manager": {
      "command": "npx", "args": ["@spark-apps/gmail-manager-mcp@latest"],
      "env": { "GMAIL_OAUTH_PATH": "C:\\path\\to\\gcp-oauth.keys.json" }
    }
  }
}

For Local Development:

{
  "mcpServers": {
    "gmail-manager": {
      "command": "node", "args": ["C:\\path\\to\\GMail-Manager-MCP\\dist\\index.js"]
    }
  }
}

πŸ› οΈ Available Tools

πŸ“¬ Reading

Tool

Description

search_emails

Search using Gmail query syntax

read_email

Full content of one email

get_thread

Every message in a conversation, oldest first

list_attachments

Attachments on an email, with download IDs

download_attachment

Save an attachment to a local path

🧹 Cleaning up

Tool

Description

trash_emails

Move to Trash β€” recoverable for 30 days. Prefer this

untrash_emails

Pull messages back out of Trash

archive_emails

Remove from inbox, keep everything else

mark_emails

Mark read or unread

delete_email / batch_delete_emails

Permanent, bypasses Trash, cannot be undone

🏷️ Labels

Tool

Description

list_labels

List all labels

create_label

Create a label, or return the existing one if the name is taken

delete_label

Delete a label

apply_label / remove_label

One message

batch_apply_labels / batch_remove_labels

Many messages, throttled and retried

βš™οΈ Rules & unsubscribing

Tool

Description

list_filters

Filters (rules) currently on the account

create_filter

Set a rule that applies to mail arriving from now on

delete_filter

Remove a filter

get_unsubscribe_info

Read a sender's List-Unsubscribe link, without clicking it

unsubscribe_email

Opt out of a mailing list via the sender's own one-click endpoint

✍️ Composing

Tool

Description

create_draft

Write to Drafts without sending. The safe default

list_drafts / update_draft / delete_draft

Manage drafts

send_draft

Send an existing draft

send_email

Compose and send immediately

create_reply

Draft a threaded reply

resend_email

Send a fresh copy of a sent message (does not recall the original)

πŸ“… Calendar

Tool

Description

list_calendars

Calendars this account can access

list_events

Events on a calendar, optionally in a time range

search_events

Find events by keyword

get_event

One event in full, including RSVPs

create_event

Create an event, optionally with Meet link and guests

update_event

Change an event; only the fields you pass are altered

delete_event

Delete an event

respond_to_event

RSVP as yourself

suggest_time

Find slots where everyone is free, via free/busy

πŸ” Auth

Tool

Description

authenticate_gmail

Authenticate via browser. Covers Gmail and Calendar

πŸ’¬ Example Commands

  • "Delete all promotional emails from last 30 days"

  • "Delete all unread newsletters older than 1 week"

  • "Delete all 'no-reply' emails from last 3 months"

  • "Delete all LinkedIn notification emails"

  • "Delete all password reset emails older than 1 month"

  • "Delete redundant email chains where I'm CC'd"

  • "Summarize email with subject: 'last boring meeting'"

  • "Summarize all emails about 'project deadline'"

  • "Reply to email about 'project update' saying 'Got it, thanks!'"

  • "Label all emails from my bank as 'Finance'"

  • "Create 'Travel' label and move all booking confirmations"

  • "Find emails with attachments larger than 5MB"

  • "Show me who sends me the most emails"

  • "Find all unread emails older than 1 week"

  • "Show my busiest email days this month"

  • "Find emails I starred but never replied to"

  • "What's on my calendar this week?"

  • "Find a 45-minute slot next week when Sam and I are both free, weekdays 9-5"

  • "Move Thursday's standup to 10am and add a Meet link"

  • "Decline the Friday review, comment that I'm on leave"

  • "Search my calendar for anything about the tax deadline"

  • "Show me the rules currently on my account"

  • "Rule: anything from noreply@ skips the inbox and gets labelled Noise"

  • "Get the unsubscribe link for this sender so I can check it before clicking"

  • "Unsubscribe me from this newsletter"

Unsubscribing uses the sender's own published opt-out. Where they support one-click (RFC 8058) it completes on its own; where the only route is emailing them, it asks first, since that sends mail from your account. A plain link with no one-click declaration is handed back for you to open β€” arbitrary URLs found in mail are never visited, and no response body from a sender is ever read back into the conversation.


🌱 Support & Contributions

⭐ Star the repo & I power up like Mario πŸ„
β˜• Devs run on coffee - Buy me one?
πŸ’° Crypto tips welcome - Tip in crypto
🀝 Contributions are welcome - 🍴 Fork, improve, PR!
πŸŽ₯ Need help? Setup Tutorial β€’ Join Discord

πŸ’– Sponsor

Your support helps maintain and improve the tool. please consider sponsoring the project.


Made with ❀️ for MCP β€’ Privacy Policy β€’ Terms of Service

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

–Maintainers
–Response time
0dRelease cycle
33Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered inbox management with natural language commands through Claude Desktop. Supports sending, reading, searching, organizing emails, and managing labels using Gmail API with automatic authentication.
    8
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Connects multiple Gmail accounts to Claude Desktop via MCP, enabling email search, labeling, drafts, and confirmed sending through natural language.
    13
    192
    MIT

View all related MCP servers

Related MCP Connectors

  • Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…

  • Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.

  • Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/muammar-yacoob/GMail-Manager-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server