Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Connects Claude Desktop to your Gmail so you can start managing your inbox using natural language. Bulk delete promos & newsletters, organize labels and get useful insights.

README.md

[//]: # (Constants) [license-link]: ../../blob/main/LICENSE [stars-link]: ../../stargazers [vid-link]: https://www.youtube.com/shorts/CCbY_ETwFss [website-link]: https://spark-games.co.uk [coffee-link]: https://buymeacoffee.com/spark88 [bug-link]: ../../issues [release-link]: ../../releases [fork-link]: ../../fork [privacy-link]: ./PRIVACY.md [issues-link]: ../../issues [discord-link]: https://discord.gg/S9kS2D5ueg

<img src="public/images/trash-mail.png" alt="Gmail Manager" width="48" height="48" style="vertical-align: middle;"> Gmail Manager MCP

<div align="center">

🧹 Clean your inbox • 🏷️ Organize with labels • 🗑️ Bulk delete emails

![npm](https://www.npmjs.com/package/@spark-apps/gmail-manager-mcp) ![MCP Server](https://smithery.ai/server/@muammar-yacoob/gmail-manager-mcp) ![MIT](LICENSE) ![GitHub Sponsors](https://github.com/sponsors/muammar-yacoob) ![Report Bug][issues-link] ![GitHub Stars][stars-link] <!-- ![Buy Me Coffee][coffee-link] --> <!-- ![Downloads][release-link] -->

<img src="public/images/meme.png" alt="Stop sending me unnecessary emails meme" width="400">

</div>

✨ What It Does

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

| <div align="left">Feature</div> | <div align="left">Description</div> | |:---------|:-------------| | ![](https://img.shields.io/badge/🔍%20-1a365d?style=for-the-badge)!Email Search | Find emails by sender, subject, date, or any Gmail query | | ![](https://img.shields.io/badge/📊%20-1a5e3a?style=for-the-badge)!Inbox Analytics | Get insights about your email patterns and volume | | ![](https://img.shields.io/badge/📖%20-1a5e3a?style=for-the-badge)!Read & Draft Replies | Read the full content of an email | | ![](https://img.shields.io/badge/🏷️%20-cc6600?style=for-the-badge)!Smart Organization | Create and apply labels to categorize emails automatically | | ![](https://img.shields.io/badge/🗑️%20-c41e3a?style=for-the-badge)!Bulk Cleanup | Remove old newsletters, notifications, and spam efficiently |

🚀 Quick Setup

📋 Prerequisites: Get Gmail Credentials 🗝️

<details> <summary><strong>🔑 Required before any installation</strong></summary>

  1. Create New Project 📁
  2. Enable Gmail API 📧
  3. Create OAuth client ID (Desktop app type) 🔐
  4. Download as gcp-oauth.keys.json 📥
  5. Navigate to Data accessAdd or remove scopes → Enter: https://mail.google.com/ 🔓
  6. Navigate to Test users → Add your Google email 👤

📁 Where to put gcp-oauth.keys.json:

For Windows users in WSL: ```bash

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

</details>

---

📥 Installation

<details> <summary><strong>📦 Install from npm registry (Easier ⚡) </strong></summary>

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

</details>

---

<details> <summary><strong>🏠 Clone and build locally (Safer 🛡️)</strong></summary>

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

</details>

---

💻 Terminal Usage

<details> <summary><strong>🖥️ Quick Commands</strong></summary>

# 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

</details>

---

⚙️ Configure MCP Client

<details> <summary><strong>🔧 Required for MCP client integration</strong></summary>

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

  • <span style="background: #1e90ff; color: white; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold;">Windows</span> %APPDATA%\\Claude\\claude_desktop_config.json
  • <span style="background: #c0c0c0; color: black; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold;">macOS</span> ~/Library/Application Support/Claude/claude_desktop_config.json
  • <span style="background: #ffd700; color: black; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold;">Linux</span> ~/.config/Claude/claude_desktop_config.json

📦 For NPM Install: ``json { "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: ``json { "mcpServers": { "gmail-manager": { "command": "node", "args": ["C:\\path\\to\\GMail-Manager-MCP\\dist\\index.js"] } } } `` </details>

🛠️ Available Tools

<details> <summary><strong>🔧 View All Available Tools</strong></summary>

| <div align="left">Tool</div> | <div align="left">Description</div> | |:------|:-------------| | ![](https://img.shields.io/badge/🔐%20-1a365d?style=for-the-badge)!Authenticate Gmail | Authenticate Gmail access via web browser | | ![](https://img.shields.io/badge/🔍%20-1a365d?style=for-the-badge)!Search Emails | Search emails using Gmail query syntax | | ![](https://img.shields.io/badge/📖%20-1a5e3a?style=for-the-badge)!Read Email | Read the full content of an email | | ![](https://img.shields.io/badge/💬%20-1a5e3a?style=for-the-badge)!Create Reply | Create a draft reply to an email with a smart, context-aware response | | ![](https://img.shields.io/badge/📋%20-1a5e3a?style=for-the-badge)!List Labels | List all Gmail labels | | ![](https://img.shields.io/badge/➕%20-cc6600?style=for-the-badge)!Create Label | Create a new Gmail label | | ![](https://img.shields.io/badge/🏷️%20-cc6600?style=for-the-badge)!Apply Label | Apply a label to an email | | ![](https://img.shields.io/badge/⚡%20-cc6600?style=for-the-badge)!Batch Apply Labels | Apply labels to multiple emails | | ![](https://img.shields.io/badge/🚫%20-cc6600?style=for-the-badge)!Remove Label | Remove a label from an email | | ![](https://img.shields.io/badge/❌%20-c41e3a?style=for-the-badge)!Delete Label | Delete a Gmail label | | ![](https://img.shields.io/badge/🗑️%20-c41e3a?style=for-the-badge)!Delete Email | Permanently delete an email | | ![](https://img.shields.io/badge/💥%20-c41e3a?style=for-the-badge)!Batch Delete Emails | Delete multiple emails at once |

</details>

💬 Example Commands

<details> <summary><strong>🧹 Quick Cleanup</strong></summary>

  • "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"

</details>

<details> <summary><strong>⚡ Smart Actions</strong></summary>

  • "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"

</details>

<details> <summary><strong>📊 Inbox Insights</strong></summary>

  • "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"

</details>

---

🌱 Support & Contributions

Star the repo & I power up like Mario 🍄 ☕ Devs run on coffee - [Buy me one?][coffee-link] 💰 Crypto tips welcome - Tip in crypto 🤝 Contributions are welcome - [🍴 Fork][fork-link], improve, PR! 🎥 Need help? <img src="https://img.icons8.com/color/20/youtube-play.png" alt="YouTube" width="20" height="20" style="vertical-align: middle;"> [Setup Tutorial][vid-link] • <img src="https://img.icons8.com/color/20/discord--v2.png" alt="Discord" width="20" height="20" style="vertical-align: middle;"> [Join Discord][discord-link]

💖 Sponsor

Your support helps maintain and improve the tool. please consider [sponsoring the project][stars-link].

---

<div align="center">

Made with ❤️ for MCPPrivacy PolicyTerms of Service

</div>

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Communication servers.