Gmail MCP

Integrations

  • 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.

Gmail MCP

Allow Claude to search and retrieve emails from your Gmail account.

Setup

1. Get Google API Credentials

  1. Visit the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Gmail API for your project
    • Navigate to "APIs & Services" > "Library"
    • Search for "Gmail API" and enable it
  4. 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"
  5. Download the credentials JSON file
  6. Save it as credentials.json in 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.json

This 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.

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-mcp with your actual project path
  • Adjust the command path to your installed uvx executable
  • Provide correct paths to your credentials.json and token.json files

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 file
  • GMAIL_TOKEN_PATH: Path to your token.json file

Create a .env file in the project root with these variables for easy configuration.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A server that allows Claude to search and retrieve emails from your Gmail account, supporting functions like searching emails, retrieving full content of specific emails, and listing recent messages.

  1. Setup
    1. 1. Get Google API Credentials
    2. 2. Authorize the Application
  2. Configuring with Claude
    1. 1. Search Emails
    2. 2. Get Email Content
    3. 3. List Messages
  3. Environment Variables

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      Server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
      Last updated -
      60,727
      243
      JavaScript
      MIT License
      • Linux
      • Apple
    • A
      security
      F
      license
      A
      quality
      A server that enables Claude Desktop users to access the Claude API directly, allowing them to bypass Professional Plan limitations and use advanced features like custom system prompts and conversation management.
      Last updated -
      1
      5
      Python
      • Apple
    • -
      security
      A
      license
      -
      quality
      An email assistant server that connects Claude Desktop to notmuch email databases, allowing users to search emails, view threads, compose new messages, and reply to conversations with markdown formatting.
      Last updated -
      2
      Python
      Mozilla Public License 2.0
    • -
      security
      F
      license
      -
      quality
      An integration server that provides Claude Desktop access to Gmail, enabling users to view recent emails and search their Gmail inbox using natural language commands.
      Last updated -
      6
      Python

    View all related MCP servers

    ID: r0rf7w4hi6