Gmail MCP Server

Gmail MCP Server

Enables programmatic interaction with Gmail using OAuth 2.0 authentication, allowing users to search, read, send, and manage emails through a standardized interface.

Category
Visit Server

README

📧 Gmail MCP Server

The Gmail MCP Server provides a toolset to interact programmatically with Gmail using OAuth 2.0 authentication. It enables you to search, read, send, and manage emails efficiently using a standardized interface.


📘 Google Cloud Setup

Before using the Gmail MCP Server, you must set up a Google Cloud project, enable the Gmail API, and create OAuth 2.0 credentials.

1. Create a Google Cloud Project

  • Go to the Google Cloud Console.
  • Click the project dropdown at the top and select New Project.
  • Enter a project name (e.g., Gmail MCP Server) and click Create.

2. Enable the Gmail API

  • With your project selected, navigate to the Gmail API page.
  • Click Enable.

3. Create OAuth 2.0 Credentials (Desktop Client)

  • In the Cloud Console, go to APIs & Services > Credentials.
  • Click + Create Credentials and choose OAuth client ID.
  • If prompted, configure the consent screen:
    • Set the App type to External.
    • Fill in the required fields (App name, user support email, etc.).
  • For Application type, select Desktop app.
  • Enter a name (e.g., Gmail MCP Desktop Client) and click Create.
  • Download the credentials file (credentials.json) and store it securely. You’ll need this file for authentication.

🛠️ Available Tools

The Gmail MCP Server offers the following tools for interacting with Gmail:

  • search_emails
    Search emails using Gmail’s advanced search syntax (e.g., by sender, subject, date).

  • get_recent_emails
    Retrieve the most recent emails from your Gmail inbox.

  • get_email_details
    Fetch full details (headers, body, metadata) of a specific email using its message ID.

  • send_email
    Send a new email using your authenticated Gmail account.

  • list_gmail_labels
    List all available labels configured in your Gmail account (e.g., INBOX, STARRED, SENT).

  • get_emails_by_label
    Retrieve emails that belong to a specific Gmail label.

  • health_check
    Check the health and connectivity of the Gmail MCP Server to ensure it is functioning correctly.

🖥️ Claude Desktop Configuration

To use the Gmail MCP Server with Claude Desktop, update your Claude configuration file to include the following entry under mcpServers. Replace CREDENTIALS_FILE with the absolute path to your downloaded credentials.json file from the Google Cloud Console.

{
  "mcpServers": {
    "gmail_mcp": {
      "command": "uvx",
      "args": [
        "gmail-mcp-server-ansh",
        "--credentials-file", "CREDENTIALS_FILE"
      ]
    }
  }
}

🔧 Programmatic Usage

If you are integrating the Gmail MCP Server into your own application (such as a custom agent system), you can configure and launch it programmatically using a params dictionary as shown below. Also replace CREDENTIALS_FILE with the absolute path to your downloaded credentials.json file from the Google Cloud Console.

params = {
    "command": "uvx",
    "args": [
        "gmail-mcp-server-ansh",
        "--credentials-file", "CREDENTIALS_FILE"
    ]
}

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