[//]: # (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 # Gmail Manager Gmail Manager MCP
**๐Ÿงน Clean your inbox โ€ข ๐Ÿท๏ธ Organize with labels โ€ข ๐Ÿ—‘๏ธ Bulk delete emails** [![npm](https://img.shields.io/npm/v/@spark-apps/gmail-manager-mcp?style=flat-square&logo=npm&logoColor=white&color=crimson)](https://www.npmjs.com/package/@spark-apps/gmail-manager-mcp) [![MCP Server](https://badge.mcpx.dev?type=server&color=blue&labelColor=gray)](https://smithery.ai/server/@muammar-yacoob/gmail-manager-mcp) [![MIT](https://img.shields.io/badge/License-MIT-blueviolet?style=flat-square)](LICENSE) [![GitHub Sponsors](https://img.shields.io/github/sponsors/muammar-yacoob?label=Sponsor&logo=github-sponsors&logoColor=white&color=hotpink)](https://github.com/sponsors/muammar-yacoob) [![Report Bug](https://img.shields.io/badge/Report-Bug-orangered?logo=github&logoColor=white)][issues-link] [![GitHub Stars](https://img.shields.io/github/stars/muammar-yacoob/GMail-Manager-MCP?style=social)][stars-link] Stop sending me unnecessary emails meme
## โœจ What It Does Gmail Manager MCP provides **direct access** to your Gmail inbox through the Model Context Protocol, allowing you to: |
Feature
|
Description
| |:---------|:-------------| | ![](https://img.shields.io/badge/๐Ÿ”%20-1a365d?style=for-the-badge)![Email Search](https://img.shields.io/badge/Email%20Search%20-007bff?style=for-the-badge) | Find emails by sender, subject, date, or any Gmail query | | ![](https://img.shields.io/badge/๐Ÿ“Š%20-1a5e3a?style=for-the-badge)![Inbox Analytics](https://img.shields.io/badge/Inbox%20Analytics%20-28a745?style=for-the-badge) | Get insights about your email patterns and volume | | ![](https://img.shields.io/badge/๐Ÿ“–%20-1a5e3a?style=for-the-badge)![Read & Draft Replies](https://img.shields.io/badge/Read%20%26%20Draft%20Replies%20-28a745?style=for-the-badge) | Read the full content of an email | | ![](https://img.shields.io/badge/๐Ÿท๏ธ%20-cc6600?style=for-the-badge)![Smart Organization](https://img.shields.io/badge/Smart%20Organization%20-ff9500?style=for-the-badge) | Create and apply labels to categorize emails automatically | | ![](https://img.shields.io/badge/๐Ÿ—‘๏ธ%20-c41e3a?style=for-the-badge)![Bulk Cleanup](https://img.shields.io/badge/Bulk%20Cleanup%20-ff073a?style=for-the-badge) | Remove old newsletters, notifications, and spam efficiently | ## ๐Ÿš€ Quick Setup ### ๐Ÿ“‹ Prerequisites: Get Gmail Credentials ๐Ÿ—๏ธ
๐Ÿ”‘ Required before any installation 1. [Create New Project](https://console.cloud.google.com/projectcreate) ๐Ÿ“ 2. [Enable Gmail API](https://console.cloud.google.com/apis/api/gmail.googleapis.com/metrics) ๐Ÿ“ง 3. Create [OAuth client ID](https://console.cloud.google.com/auth/clients) (Desktop app type) ๐Ÿ” 4. Download as `gcp-oauth.keys.json` ๐Ÿ“ฅ 5. Navigate to [Data access](https://console.cloud.google.com/auth/scopes) โ†’ **Add or remove scopes** โ†’ Enter: `https://mail.google.com/` ๐Ÿ”“ 6. Navigate to [Test users](https://console.cloud.google.com/auth/audience) โ†’ 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
--- ## ๐Ÿ“ฅ Installation
๐Ÿ“ฆ Install from npm registry (Easier โšก) ```bash npm i -g @spark-apps/gmail-manager-mcp ```
---
๐Ÿ  Clone and build locally (Safer ๐Ÿ›ก๏ธ) ```bash git clone https://github.com/muammar-yacoob/GMail-Manager-MCP.git cd GMail-Manager-MCP npm install ```
--- ## ๐Ÿ’ป Terminal Usage
๐Ÿ–ฅ๏ธ Quick Commands ```bash # 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
๐Ÿ”ง Required for MCP client integration 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:** ```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"] } } } ```
## ๐Ÿ› ๏ธ Available Tools
๐Ÿ”ง View All Available Tools |
Tool
|
Description
| |:------|:-------------| | ![](https://img.shields.io/badge/๐Ÿ”%20-1a365d?style=for-the-badge)![Authenticate Gmail](https://img.shields.io/badge/Authenticate%20Gmail%20-007bff?style=for-the-badge) | Authenticate Gmail access via web browser | | ![](https://img.shields.io/badge/๐Ÿ”%20-1a365d?style=for-the-badge)![Search Emails](https://img.shields.io/badge/Search%20Emails%20-007bff?style=for-the-badge) | Search emails using Gmail query syntax | | ![](https://img.shields.io/badge/๐Ÿ“–%20-1a5e3a?style=for-the-badge)![Read Email](https://img.shields.io/badge/Read%20Email%20-28a745?style=for-the-badge) | Read the full content of an email | | ![](https://img.shields.io/badge/๐Ÿ’ฌ%20-1a5e3a?style=for-the-badge)![Create Reply](https://img.shields.io/badge/Create%20Reply%20-28a745?style=for-the-badge) | 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](https://img.shields.io/badge/List%20Labels%20-28a745?style=for-the-badge) | List all Gmail labels | | ![](https://img.shields.io/badge/โž•%20-cc6600?style=for-the-badge)![Create Label](https://img.shields.io/badge/Create%20Label%20-ff9500?style=for-the-badge) | Create a new Gmail label | | ![](https://img.shields.io/badge/๐Ÿท๏ธ%20-cc6600?style=for-the-badge)![Apply Label](https://img.shields.io/badge/Apply%20Label%20-ff9500?style=for-the-badge) | Apply a label to an email | | ![](https://img.shields.io/badge/โšก%20-cc6600?style=for-the-badge)![Batch Apply Labels](https://img.shields.io/badge/Batch%20Apply%20Labels%20-ff9500?style=for-the-badge) | Apply labels to multiple emails | | ![](https://img.shields.io/badge/๐Ÿšซ%20-cc6600?style=for-the-badge)![Remove Label](https://img.shields.io/badge/Remove%20Label%20-ff9500?style=for-the-badge) | Remove a label from an email | | ![](https://img.shields.io/badge/โŒ%20-c41e3a?style=for-the-badge)![Delete Label](https://img.shields.io/badge/Delete%20Label%20-ff073a?style=for-the-badge) | Delete a Gmail label | | ![](https://img.shields.io/badge/๐Ÿ—‘๏ธ%20-c41e3a?style=for-the-badge)![Delete Email](https://img.shields.io/badge/Delete%20Email%20-ff073a?style=for-the-badge) | Permanently delete an email | | ![](https://img.shields.io/badge/๐Ÿ’ฅ%20-c41e3a?style=for-the-badge)![Batch Delete Emails](https://img.shields.io/badge/Batch%20Delete%20Emails%20-ff073a?style=for-the-badge) | Delete multiple emails at once |
## ๐Ÿ’ฌ Example Commands
๐Ÿงน Quick Cleanup - *"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"*
โšก Smart Actions - *"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"*
๐Ÿ“Š Inbox Insights - *"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"*
--- ## ๐ŸŒฑ 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](https://tip.md/muammar-yacoob) ๐Ÿค **Contributions are welcome** - [๐Ÿด Fork][fork-link], improve, PR! ๐ŸŽฅ **Need help?** YouTube [Setup Tutorial][vid-link] โ€ข Discord [Join Discord][discord-link] ## ๐Ÿ’– Sponsor Your support helps maintain and improve the tool. please consider [sponsoring the project][stars-link]. ---
**Made with โค๏ธ for MCP** โ€ข [Privacy Policy](PRIVACY.md) โ€ข [Terms of Service](TERMS.md)