YAGMS

YAGMS, which stands for "Yet Another Gmail MCP Server," acts as a bridge between an AI assistant and a Gmail account. In simple terms, it gives an AI the ability to "read" and organize emails just like a human would. Instead of a user having to manually copy and paste messages into a chat window, this tool allows the AI to look into the inbox, find specific messages, and check for new updates directly. It makes managing a busy inbox much smoother by letting an AI handle the tedious task of searching through years of conversations. Under the hood, this server utilizes the Gmail API to provide a structured set of tools for advanced email management. It includes specific functions for listing recent messages, retrieving the full content of individual emails, and fetching account labels. One of its most powerful features is the search tool, which supports standard Gmail search syntax. This means the AI can perform complex queries, such as finding all emails from a specific sender that contain attachments or filtering messages based on highly specific keywords and date ranges. For developers building LLM-powered applications, YAGMS offers a lightweight and efficient solution built with Bun. It simplifies the authentication process via OAuth 2.0, securely handling credentials through a local configuration. By integrating this server into an MCP-compatible environment, developers can empower their AI agents to act as intelligent email secretaries. Whether the goal is to summarize long threads, identify urgent action items, or categorize a messy inbox, this tool provides the necessary infrastructure to turn a standard language model into a functional email management system.

Category: Communication & Messaging

Tags: email, gmail, inbox, oauth

Visit YAGMS

How to install and configure YAGMS

1. Installation Prerequisites: 1. Google Cloud Setup: - Go to Google Cloud Console. - Create or select a project and enable the Gmail API. - Create OAuth 2.0 credentials (Desktop application). - Download the JSON file and save it as ~/.yagms-oauth.keys.json. 2. Install Runtime: Install Bun. Build Steps: bash bun install bun run build-gmail # This generates ./dist/gmail.js Authentication: Before running the server, you must authenticate your Google account: bash bun run dist/gmail.js auth This will open a browser to sign in and save credentials to ~/.yagms-credentials.json. ---

2. Configuration Add the following to your MCP settings file (e.g., claude_desktop_config.json or Cursor settings): json { "mcpServers": { "gmail": { "command": "bun", "args": ["run", "/path/to/yagms/dist/gmail.js"], "env": {}, "disabled": false, "autoApprove": [] } } } Optional Environment Variables: - GMAIL_OAUTH_PATH: Custom path to OAuth keys (default: ~/.yagms-oauth.keys.json). - GMAIL_CREDENTIALS_PATH: Custom path to save credentials (default: ~/.yagms-credentials.json). ---

3. Available Tools * list-emails: Retrieve emails from your inbox. * senderEmail (optional): Filter by sender. * maxResults (optional, default: 10): Number of emails to return. * labelIds (optional, default: ["INBOX"]): Filter by specific labels. * get-email: Get a specific email by ID. * emailId: The unique ID of the email. * search-emails: Search using Gmail's advanced search syntax. * query: Search string (e.g., from:example@gmail.com has:attachment). * maxResults (optional, default: 10). * get-labels: List all Gmail labels in the account. ---

4. Example Prompts (No specific example prompts were provided in the source content, but the following are implied by the toolset:) - "List the last 5 emails from my inbox." - "Search for emails from 'billing@service.com' that have attachments." - "Get the content of the email with ID [ID]." - "Show me all my Gmail labels."

What you can do with YAGMS

Use Case 1: Automated Daily Briefing and Action Item Extraction Problem: Busy professionals often start their day with an overwhelming number of unread emails, making it difficult to identify which messages contain actual tasks versus general updates or newsletters. Solution: This MCP allows an AI assistant to scan the user's inbox, categorize the content of recent messages, and present a prioritized list of action items. Example: A user asks, "Summarize my unread emails from the last 24 hours and list any tasks I need to complete." The AI uses list-emails to fetch recent messages, analyzes the body text, and provides a bulleted list of deadlines and requests found in the emails.

Use Case 2: Intelligent Document and Receipt Retrieval Problem: Finding a specific receipt, flight confirmation, or project attachment from months ago can be frustrating using standard keyword searches, which often return too many irrelevant results. Solution: By leveraging the search-emails tool with Gmail’s advanced search syntax (e.g., has:attachment or `after:2023

01/01), the AI can pinpoint specific documents based on conversational requests. **Example**: A user says, "Find the PDF invoice from the hardware store that I received last November." The AI executessearch-emails(query: "hardware invoice has:attachment after:2023/11/01 before:2023/12/01"), identifies the correct thread, and retrieves the specific details usingget-email`.

Use Case 3: Contextual Project History Lookup Problem: When starting a new phase of a project, important context (like initial requirements or stakeholder feedback) is often buried in long-forgotten email threads. Solution: This MCP enables an AI agent to act as a "corporate memory." It can search through specific labels or senders to reconstruct the history of a project for the user. Example: A developer asks, "What were the original API requirements Sarah sent over in the 'Project Phoenix' thread?" The AI uses search-emails with a query for the sender and project name, then uses get-email to read the specific message and summarize the requirements for the developer's current task.

Use Case 4: Inbox Triage and Priority Filtering Problem: Users often have high-priority labels (like "Client-Urgent") but still have to manually click through each email to see which ones require immediate technical intervention or a management-level response. Solution: The AI can use list-emails filtered by labelIds to monitor specific categories and then process the content to determine the "temperature" or urgency of the message. Example: A user asks, "Check my 'Support' label and tell me if any customers…

Key facts

  • Open Source
  • Communication & Messaging, Files, Documents & PDFs
  • email, gmail, inbox, oauth

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — Create, edit, and manage LaTeX files. Requires an external LaTeX distribution like MiKTeX, TeX Live, or MacTeX.
  • MCP JSON — A collection of servers for file system operations, Google search, web automation, and executing terminal commands.
  • MCP MD2PDF Server — Convert Markdown documents to PDF with support for Mermaid diagrams.
  • MCP Media Processing Server — A server for media processing, offering powerful video and image manipulation using FFmpeg and ImageMagick.
  • MCP Knowledge Base — A knowledge base server that processes local documents (PDF, DOCX, TXT, HTML) and answers questions based on their content using…
  • MCP Music Analysis — Analyze audio from local files, YouTube, or direct links using librosa.
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories