gmail-mcp-server

gmail-mcp-server

Enables Claude to read and manage your Gmail account, including listing, searching, sending, drafting, replying to, archiving, labeling, and trashing emails via the Gmail API.

Category
Visit Server

README

Gmail MCP Server

Local MCP server that lets Claude Desktop read and manage your Gmail (list, search, send, draft, reply, archive, labels, trash).

Claude asks → this server calls the Gmail API → actions run on your account.

Structure

gmail-mcp-server/
├── server.py         # MCP tools + dispatch
├── gmail_auth.py     # OAuth + token cache
├── gmail_tools.py    # Gmail API wrappers
├── requirements.txt
├── credentials.json  # from Google (do not commit)
└── token.json        # created after first login (do not commit)

Setup

1. Install (Python 3.10+)

cd gmail-mcp-server
/opt/homebrew/bin/python3.12 -m venv .venv   # or any python3.10+
source .venv/bin/activate
pip install -r requirements.txt

2. Google Cloud credentials

  1. Google Cloud Console → create/select a project.
  2. Enable Gmail API.
  3. OAuth consent screen → External → fill app info → add yourself as a Test user (keep status Testing).
  4. Credentials → Create → OAuth client ID → type Desktop app → download JSON.
  5. Save it as credentials.json in this folder (must have an "installed" key, not "web").

3. Claude Desktop config

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gmail": {
      "command": "/Users/mdparwezansari/Desktop/gmail-mcp-server/.venv/bin/python",
      "args": ["/Users/mdparwezansari/Desktop/gmail-mcp-server/server.py"]
    }
  }
}

Use absolute paths. Quit Claude fully (Cmd+Q) and reopen.

Claude starts the server automatically — you don’t need to run python server.py yourself.

4. First OAuth

In Claude, ask e.g. “List my recent emails.” Approve Google in the browser. That creates token.json for later runs.

Tools

Tool Description
list_emails Recent mail (optional Gmail query)
search_emails Search (from:, is:unread, etc.)
get_email Full body by message ID
send_email Send now
create_draft Draft only
reply_to_email Reply in-thread
archive_email Remove from inbox
mark_read / mark_unread Toggle unread
delete_email Move to Trash
list_labels / create_label Labels

Scope: gmail.modify (change in gmail_auth.py if you want less access).

Optional env

  • GMAIL_CREDENTIALS_PATH — default ./credentials.json
  • GMAIL_TOKEN_PATH — default ./token.json

Troubleshooting

Problem Fix
mcp won’t install Need Python 3.10+
Server not connected Check paths; Cmd+Q Claude and reopen; see ~/Library/Logs/Claude/mcp-server-gmail.log
Access blocked Add your Gmail as OAuth Test user
Re-login needed Delete token.json and call a Gmail tool again

Never commit credentials.json or token.json.

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
E2B

E2B

Using MCP to run code via e2b.

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
Qdrant Server

Qdrant Server

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

Official
Featured