@kazuph/mcp-gmail-gas Featured
Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.
kazuph
Tools
gmail_search_messages
Gmail内で指定したクエリに一致するメールを検索します。 queryパラメータはGmailの検索クエリ形式で指定します。 例: "subject:Meeting newer_than:1d" 結果はJSONで返り、メール一覧(件名、messageIdなど)を含みます。
gmail_get_message
指定したmessageIdのメール本文と詳細を取得します。 引数: messageId (GmailのメッセージID)
gmail_download_attachment
指定したmessageIdとattachmentIdで添付ファイルを取得します。 ファイルはDownloadsフォルダに保存されます。 attachmentIdはattachmentsの各attachmentのnameでありファイル名となることが多いです(invoice.pdfなど)。 引数: - messageId: メッセージID(必須) - attachmentId: 添付ファイルID(必須) - outputFilename: 保存時のファイル名(オプション)
README
MCP Gmail
Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.
<a href="https://glama.ai/mcp/servers/7awla69pjq"><img width="380" height="200" src="https://glama.ai/mcp/servers/7awla69pjq/badge" alt="@kazuph/mcp-gmail-gas MCP server" /></a>
Quick Start (For Users)
Prerequisites
- Node.js 18+ (install via
brew install node
) - Gmail account
- Google Apps Script deployment
- Claude Desktop (install from https://claude.ai/desktop)
Configuration
- Deploy the Google Apps Script
- Visit Google Apps Script and create a new project
- Copy the entire contents of
code.gs
and paste it into the script editor - Click on "Deploy" > "New deployment"
- Select "Web app" as the deployment type
- Configure the following settings:
- Execute as: Me
- Who has access: Anyone
- Click "Deploy"
- When prompted, review and authorize the app to access your Gmail account
- Copy the deployment URL and generate a random API key for security
Note: The script requires Gmail access permissions. When you first deploy and run the script, Google will ask you to review and grant these permissions. Make sure to:
-
Click "Review Permissions"
-
Select your Google account
-
Click "Advanced" if you see a warning
-
Click "Go to [Your Project Name] (unsafe)"
-
Click "Allow" to grant the necessary Gmail permissions
-
Open your Claude Desktop configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json
You can find this through the Claude Desktop menu:
-
Open Claude Desktop
-
Click Claude on the Mac menu bar
-
Click "Settings"
-
Click "Developer"
-
Add the following to your configuration:
{
"tools": {
"gmail": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-gmail-gas"],
"env": {
"GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL",
"VALID_API_KEY": "YOUR_API_KEY"
}
}
}
}
Note: Replace YOUR_DEPLOYMENT_URL
and YOUR_API_KEY
with your actual values.
For Developers
Prerequisites
- Node.js 18+ (install via
brew install node
) - Gmail account
- Google Apps Script
- Claude Desktop (install from https://claude.ai/desktop)
- tsx (install via
npm install -g tsx
)
Installation
git clone https://github.com/kazuph/mcp-gmail-gas.git
cd mcp-gmail-gas
npm install
npm run build
Development Configuration
-
Make sure Claude Desktop is installed and running.
-
Install tsx globally if you haven't:
npm install -g tsx
# or
pnpm add -g tsx
- Modify your Claude Desktop config located at:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following to your MCP client's configuration:
{
"tools": {
"gmail": {
"args": ["tsx", "/path/to/mcp-gmail-gas/index.ts"],
"env": {
"GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL",
"VALID_API_KEY": "YOUR_API_KEY"
}
}
}
}
Available Tools
gmail_search_messages
: Search for emails using Gmail search query syntax (e.g., "subject:Meeting newer_than:1d")gmail_get_message
: Get the full content and details of a specific emailgmail_download_attachment
: Download an attachment from a specific email
Security Note
Always keep your VALID_API_KEY
secret and never commit it to version control. This key helps ensure that only authorized clients can access your Gmail through the Google Apps Script deployment.
Recommended Servers
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
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.
Apple MCP Server
Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.

Supabase MCP Server
A Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.
MCP Server Trello
Facilitates interaction with Trello boards via the Trello API, offering features like rate limiting, type safety, input validation, and error handling for seamless management of cards, lists, and board activities.
Metabase MCP Server
Enables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.

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.

Airtable MCP Server
A Model Context Protocol server that provides tools for programmatically managing Airtable bases, tables, fields, and records through Claude Desktop or other MCP clients.
MongoDB MCP Server
Provides read-only access to MongoDB databases for LLMs to inspect collection schemas and execute aggregation pipelines.
Scrapezy
MCP Server enabling integration with Scrapezy to retrieve structured data from websites.