YAGMS
An MCP server for interacting with the Gmail API, enabling email management.
yagms
Yet Another Gmail MCP Server
Setup and Usage
Gmail MCP Server
The Gmail MCP server provides tools to interact with your Gmail account through the Model Context Protocol (MCP).
Prerequisites
- Create OAuth credentials for Gmail API:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Gmail API
- Create OAuth 2.0 credentials (Desktop application)
- Download the credentials JSON file and save it as
~/.yagms-oauth.keys.json
Build this project
- Install Bun.
- Build the code
bun install
bun run build-gmail # It will emit ./dist/gmail.js
Authentication
Before using the Gmail MCP server, you need to authenticate with your Google account:
# Run the authentication flow
bun run dist/gmail.js auth
This will:
- Launch a browser window for you to sign in to your Google account
- Request permission to access your Gmail account
- Save the authentication credentials to
~/.yagms-credentials.json
Running the Server
After authentication, you can run the Gmail MCP server:
# Run the server
bun run src/gmail.ts
Configuration
You can customize the paths for OAuth keys and credentials using environment variables:
GMAIL_OAUTH_PATH: Path to the OAuth keys file (default:~/.yagms-oauth.keys.json)GMAIL_CREDENTIALS_PATH: Path to save the credentials (default:~/.yagms-credentials.json)
Available Tools
The Gmail MCP server provides the following tools:
-
list-emails: Get emails from your inbox
- Parameters:
senderEmail(optional): Filter by sender emailmaxResults(optional, default: 10): Maximum number of emails to returnlabelIds(optional, default: ["INBOX"]): Label IDs to filter by
- Parameters:
-
get-email: Get a specific email by ID
- Parameters:
emailId: The ID of the email to retrieve
- Parameters:
-
search-emails: Search for emails using Gmail search syntax
- Parameters:
query: Gmail search query (e.g., "from:[email protected] has:attachment")maxResults(optional, default: 10): Maximum number of emails to return
- Parameters:
-
get-labels: Get all Gmail labels
- No parameters required
Example MCP Configuration
Add this to your MCP settings file:
{
"mcpServers": {
"gmail": {
"command": "bun",
"args": ["run", "/path/to/yagms/dist/gmail.js"],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
เซิร์ฟเวอร์ที่เกี่ยวข้อง
Slack Notification
Send notifications to Slack channels using webhook URLs.
WeCom Bot
Sends various types of messages to a WeCom (WeChat Work) group robot.
Twilio Manager MCP
Manage Twilio resources such as subaccounts, phone numbers, and regulatory bundles using the Twilio API.
chakoshi MCP Server
A bridge server connecting Claude Desktop with the chakoshi moderation API for content safety.
Reddit Outreach
The only AI tool that connects directly to a proprietary Reddit outreach network — find your prospects, personalize your pitch, and send thousands of DMs per day.
Qiye Wechat MCP
Enables AI assistants to send messages to Enterprise WeChat (Qiye Wechat) groups via webhooks.
WhatsApp Cloned Voice Messages
Integrates WhatsApp and Minimax to send personalized voice messages using cloned voices.
Coreflux MQTT MCP Server
An MCP server that connects to a Coreflux MQTT broker, providing Coreflux and MQTT actions as tools for AI assistants.
Interact MCP
Enables real-time communication between AI assistants and users via a web-based chat interface.
Ntfy
An ntfy MCP server for sending/fetching ntfy notifications to your self-hosted ntfy server from AI Agents 📤 (supports secure token auth & more - use with npx or docker!)