Provides a Gmail-based MCP server enabling Claude and other apps to read, send, search, and manage emails with labels, drafts, and attachments.
Configuration
View docs{
"mcpServers": {
"cristip73-mcp-email-server": {
"command": "npx",
"args": [
"-y",
"@cristip73/email-mcp"
],
"env": {
"TIME_ZONE": "GMT+2",
"DEFAULT_ATTACHMENTS_FOLDER": "/Users/username/CLAUDE/Attachments"
}
}
}
}You can run Gmail MCP Server to let Claude Desktop App or any MCP-enabled client interact with Gmail. It provides capabilities to read, search, send, and manage emails, drafts, labels, and attachments through a standardized interface with timezone-aware timing and structured responses.
Install and run the Gmail MCP Server, then connect it to your MCP client (for example Claude Desktop). You can operate by asking the client to send emails, read conversations, search mail, manage drafts and labels, or save attachments. The server handles threading, time zone differences, and supports multi-account sending along with category filtering (Primary, Social, Promotions, etc.). Set an attachment folder and time zone so all operations align with your environment.
Prerequisites: you need Node.js and npm installed on your machine. You will also use a Google Cloud OAuth credential file for Gmail access.
# Option 1: Quick start using NPX
npx @cristip73/email-mcp
# Authenticate for first-time setup
npx @cristip73/email-mcp auth
# Optional: if you want to run the server locally with a local setup later, see Option 2 belowRun the MCP Email Server directly with NPX without installing it globally, then authenticate.
npx @cristip73/email-mcp
```
```bash
npx @cristip73/email-mcp authIf you prefer a local setup, clone the repository, install dependencies, build, authenticate, and link the package so Claude can access it.
# 1) Clone the project
git clone https://github.com/cristip73/MCP-email-server.git
cd MCP-email-server
# 2) Install dependencies
npm install
# 3) Build the server
npm run build
# 4) Authenticate with Gmail (opens a browser for sign-in)
npm run auth
# 5) Make the package available to Claude
npm linkBefore using the server, configure OAuth credentials in Google Cloud and download the credentials file.
1) Go to Google Cloud Console
2) Create or select a project
3) APIs & Services > Library, enable Gmail API
4) APIs & Services > Credentials, Create Credentials > OAuth client ID
5) Choose Desktop application, name it (e.g., "MCP Email Client")
6) Download the credentials JSON file
7) Rename to gcp-oauth.keys.json
8) Place it in either the current working directory or in ~/.email-mcp/gcp-oauth.keys.jsonTo use the MCP server with Claude Desktop, add the MCP server by editing the Claude configuration file and pointing to the NPX-based start command. The server runs through NPX and can be started by Claude when you restart the app.
{
"mcpServers": {
"email-server": {
"command": "npx",
"args": [
"-y",
"@cristip73/email-mcp"
],
"env": {
"TIME_ZONE": "GMT+2",
"DEFAULT_ATTACHMENTS_FOLDER": "/Users/username/CLAUDE/Attachments"
}
}
}
}For Claude Code Editor, you can add the server with a direct command, pointing to the built index if you compile locally.
claude mcp add email-server -- /path/to/email-server/build/index.jsSend a new email, including CC, BCC and attachments.
Reply to an email including all original recipients, excluding your own address to prevent self-replies.
Forward an email to new recipients with original headers and threading preserved.
List all accounts and send-as addresses available for composing messages.
Fetch recent emails with optional time filters, categories, and pagination.
Read a specific email by ID and extract content and attachments.
Search emails using Gmail query syntax with category and time filters.
List all labels in the mailbox.
Retrieve details about a specific label by ID.
Create a new label with visibility and color options.
Update label properties such as name, visibility and color.
Delete a label from the mailbox.
Add or remove labels from a message.
Mark a message as read.
Mark a message as unread.
Archive a message (remove from inbox).
Unarchive a message back to the inbox.
Move a message to trash.
Create a new draft email without sending it.
Retrieve a specific draft by ID.
List drafts with optional pagination and filtering.
Modify an existing draft content.
Delete a draft from the account.
Send a saved draft.
Display the currently configured timezone details.
List attachments within an email and their metadata.
Save an attachment from an email to the configured folder with path validation.