Gmail MCP Server

Gmail MCP Server

Enables interaction with Gmail through the Gmail API, allowing users to list, read, search emails, create and send drafts, and get email summaries through natural language commands with OAuth2 authentication.

Category
Visit Server

README

šŸ“§ Gmail MCP Server

MCP Python

An MCP server to integrate Gmail with Claude, Cursor, and other MCP clients. Allows AI agents to read, search, draft, and send emails securely.


šŸš€ Quickstart

Option 1: Remote Usage - Recommended ⭐

This method requires no local python installation.

Add this to your mcp_config.json:

{
  "mcpServers": {
    "gmail-remote": {
      "url": "https://gmail-mcp-server-fr3d.onrender.com/mcp",
      "transport": "sse"
    }
  }
}

How to use:

  1. Ask a question (e.g., "Check my email").
  2. You will get a URL. Click to authorize Google.
  3. Copy the code and paste it into the chat.
  4. You are logged in!

Option 2: Local Usage (For Developers)

If you prefer to run the server code locally on your machine.

1. Install Dependencies

cd Gmail-mcp-server
pip install -r requirements.txt

2. Get Google Credentials

  1. Go to Google Cloud Console.
  2. Create Project → Enable Gmail API.
  3. Credentials → Create OAuth Client ID → Desktop App.
  4. Download JSON → rename to credentials.json → place in this folder.

3. Authenticate (One-time)

python authenticate.py

This opens your browser for Google login and creates token.json automatically.

4. Configure Editor

Add this to your mcp_config.json:

{
  "mcpServers": {
    "gmail": {
      "command": "python",
      "args": ["<ABSOLUTE_PATH_TO_REPO>/server.py"]
    }
  }
}

Note: Replace <ABSOLUTE_PATH_TO_REPO> with the actual full path to this directory.

Example Config:

<img width="632" height="202" alt="image" src="https://github.com/user-attachments/assets/f051873a-92e7-41be-a8d4-87730280a676" />


šŸ› ļø Features

Tools

Tool Description
list_emails List/search emails (returns id, snippet, subject, from, date)
read_email Read full email content by ID
create_draft Create a draft email (requires send_draft to actually send)
send_draft Send a drafted email

Prompts

Prompt Description
summarize_unread Summarize unread emails with priority
draft_reply Draft reply to an email
compose_email Compose new email
search_emails Natural language email search
daily_digest Daily email digest by category

šŸ“ File Structure

gmail-mcp-server/
ā”œā”€ā”€ server.py          # Main MCP server (FastMCP)
ā”œā”€ā”€ gmail_client.py    # Gmail API wrapper library
ā”œā”€ā”€ auth.py            # OAuth2 & Auth logic
ā”œā”€ā”€ credentials.json   # Google App Credentials (YOU PROVIDE)
ā”œā”€ā”€ token.json         # User Access Token (GENERATED)
└── requirements.txt   # Python dependencies

šŸ”’ Security

  • credentials.json: Identifies the application. Low risk if shared, but keep private.
  • token.json: CRITICAL. Contains acts-as-you keys. NEVER SHARE.
  • .gitignore: Ensure both JSON files are ignored (default in this repo).

Note: send_draft sends real emails. Use responsibly.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

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.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured