Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
Gmail AI Agent MCP Server logo

Gmail AI Agent MCP Server

0x8687/mcp-gmail-v2
0 starsApache-2.0Updated 2025-07-18Community

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables AI assistants to connect to Gmail accounts, check connection status, and send emails through a secure OAuth 2.0 interface.

README.md

Gmail AI Agent MCP Server

A Model Context Protocol (MCP) server that provides Gmail integration capabilities for AI models and tools. This server enables AI assistants to connect to Gmail accounts, check connection status, and send emails through a secure interface.

Tools

The server implements the following Gmail-related tools:

connect-gmail

Initiates a connection to a Gmail account. This tool will provide a redirect URL for OAuth authentication.

check-gmail-connection

Checks the current Gmail connection status and displays user profile information including email address, total messages, and total threads.

send-email

Sends an email through the connected Gmail account. Parameters:

  • to: The email address of the recipient
  • subject: The subject of the email
  • body: The body content of the email

Setup

Prerequisites

  1. Composio API Key: You'll need a Composio API key to use the Gmail integration. You can get one by signing up at Composio.
  1. Gmail Account: A Gmail account that you want to connect to the AI agent.

Installation

You can configure the Gmail AI agent server in your MCP client. Here is an example configuration for Claude Desktop (Settings -> Developer -> Edit Config):

{
  "mcpServers": {
    "gmail-agent": {
      "command": "node",
      "args": ["path/to/your/gmail-mcp/dist/index.js"],
      "env": {
        "COMPOSIO_API_KEY": "<YOUR_COMPOSIO_API_KEY>"
      }
    }
  }
}

Development Setup

If you're running from source:

# Clone the repository
git clone <repository-url>
cd gmail-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Run the server
npm start

Then configure your MCP client to point to the built server:

{
  "mcpServers": {
    "gmail-agent": {
      "command": "node",
      "args": ["/path/to/gmail-mcp/dist/index.js"],
      "env": {
        "COMPOSIO_API_KEY": "<YOUR_COMPOSIO_API_KEY>"
      }
    }
  }
}

Usage

  1. Configure the server in your MCP client (like Claude Desktop)
  2. Restart your client to load the new configuration
  3. Connect to Gmail by using the connect-gmail tool - this will provide an OAuth link
  4. Authorize the connection by clicking the provided link and following the Gmail authorization flow
  5. Check connection using check-gmail-connection to verify everything is working
  6. Send emails using the send-email tool with recipient, subject, and body parameters

Security

  • The server uses OAuth 2.0 for secure Gmail authentication
  • No passwords are stored locally
  • All Gmail operations are performed through secure API calls
  • The connection is maintained securely through Composio's infrastructure

Example Workflow

  1. Initial Setup: Use connect-gmail to start the OAuth flow
  2. Verification: Use check-gmail-connection to confirm successful connection
  3. Email Operations: Use send-email to compose and send emails through your connected Gmail account

Troubleshooting

  • Connection Issues: If you encounter connection problems, try using connect-gmail again to re-authenticate
  • API Key Issues: Ensure your Composio API key is correctly set in the environment variables
  • Permission Errors: Make sure you've granted the necessary permissions during the OAuth flow

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Communication servers.