Gmail MCP
Allows searching and retrieving emails from a Gmail account, with capabilities to search for specific emails, retrieve full email content, and list recent messages from the inbox.
Uses Google Cloud Console for API credentials and OAuth authentication to enable Gmail access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gmail MCPsearch for emails from my boss this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gmail MCP
Allow Claude to search and retrieve emails from your Gmail account.
Setup
1. Get Google API Credentials
Visit the Google Cloud Console
Create a new project or select an existing one
Enable the Gmail API for your project
Navigate to "APIs & Services" > "Library"
Search for "Gmail API" and enable it
Create OAuth credentials:
Go to "APIs & Services" > "Credentials"
Click "Create Credentials" > "OAuth client ID"
Select "Desktop application" as the application type
Name your client and click "Create"
Download the credentials JSON file
Save it as
credentials.jsonin your project directory
2. Authorize the Application
Run the authorization command to generate your token:
uv run gmail-mcp auth --creds-path credentials.json --token-path token.jsonThis will open a browser window where you'll need to log in to your Google account and grant the necessary permissions. After authorization, a token.json file will be created in your project directory.
Related MCP server: Gmail MCP Server
Configuring with Claude
Add the Gmail MCP server to your Claude configuration file:
{
"mcpServers": {
"gmail": {
"args": [
"--from",
"git+https://github.com/vinayak-mehta/gmail-mcp",
"gmail-mcp"
],
"command": "/Users/username/.local/bin/uvx",
"env": {
"GMAIL_CREDS_PATH": "/Users/username/path/to/gmail-mcp/credentials.json",
"GMAIL_TOKEN_PATH": "/Users/username/path/to/gmail-mcp/token.json"
}
}
}
}Make sure to:
Replace
/Users/username/path/to/gmail-mcpwith your actual project pathAdjust the
commandpath to your installeduvxexecutableProvide correct paths to your
credentials.jsonandtoken.jsonfiles
Claude will now have access to the following tools:
1. Search Emails
Search for emails in your Gmail account.
Example prompt: "Search for all emails from example@gmail.com"
2. Get Email Content
Retrieve the full content of a specific email.
Example prompt: "Show me the full content of the email with the subject 'Meeting Tomorrow'"
3. List Messages
List recent messages from your Gmail inbox.
Example prompt: "List my 5 most recent emails"
Environment Variables
You can configure the paths to your credentials and token files using environment variables:
GMAIL_CREDS_PATH: Path to your credentials.json fileGMAIL_TOKEN_PATH: Path to your token.json file
Create a .env file in the project root with these variables for easy configuration.
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
A MCP server for Gmail that lets you search, read, and draft emails and replies.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceServer for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.13,749 npm1,164MIT
- AlicenseNot gradedqualityDmaintenanceAn integration server that provides Claude Desktop access to Gmail, enabling users to view recent emails and search their Gmail inbox using natural language commands.8MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude AI to interact with Gmail, supporting email sending, reading, searching, labeling, draft management, and batch operations through natural language commands.2MIT
- -licenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that enables Claude to interact with Gmail through a secure OAuth2 connection, providing email management capabilities like listing, sending, deleting, and organizing emails.-