yagms
Yet Another Gmail MCP Server
acro5piano
README
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:example@gmail.com 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": []
}
}
}
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.