MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

MCP server that connects Claude to Gmail: read, search, and draft emails via Claude Desktop.

创建于 6/5/2026
更新于 about 5 hours ago
Repository documentation and setup instructions

Gmail MCP Server

An MCP server that connects Claude to Gmail, letting you read, search, and draft emails directly from Claude Desktop.

What it does

  • Get unread emails — fetch and summarize your unread inbox
  • Search emails — query your inbox using Gmail's search syntax (e.g. from:someone@gmail.com, subject:meeting)
  • Draft emails — create drafts in Gmail through natural language

Prerequisites

  • Python 3.x
  • A Google Cloud project with the Gmail API enabled
  • Claude Desktop

Setup

1. Google Cloud

  1. Go to console.cloud.google.com and create a new project
  2. Enable the Gmail API
  3. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID
  4. Set application type to Desktop app and download the JSON file
  5. Rename it to credentials.json and place it in this folder
  6. Go to OAuth consent screen → Audience and add your Gmail address as a test user

2. Install dependencies

pip install google-auth-oauthlib google-auth-httplib2 google-api-python-client mcp

3. Authenticate

python auth.py

This opens a browser window for Google login and saves a token.json file.

4. Connect to Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "gmail-mcp": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

On Windows (MSIX install), the config is at:

%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

Restart Claude Desktop. The server will load automatically.

Usage

Just ask Claude naturally:

  • "Get my unread emails"
  • "Search for emails from my professor"
  • "Draft an email to x@gmail.com about..."

Security

Never commit credentials.json or token.json — both are in .gitignore.

快速设置
此服务器的安装指南

安装包 (如果需要)

uvx gmail-mcp

Cursor 配置 (mcp.json)

{ "mcpServers": { "vihitshah-gmail-mcp": { "command": "uvx", "args": [ "gmail-mcp" ] } } }