Skip to content

Prokaee/gmail-mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gmail MCP Server

A lightweight MCP (Model Context Protocol) server that enables sending emails via Gmail. Built for use with Claude Code and other MCP-compatible AI tools.

Features

  • Send emails through Gmail using OAuth2 authentication
  • Simple MCP tool interface with send_email(to, subject, body)
  • Secure token-based auth with automatic refresh

Setup

  1. Create a Google Cloud project and enable the Gmail API
  2. Download OAuth credentials as credentials.json
  3. Install dependencies:
pip install google-auth google-auth-oauthlib google-api-python-client mcp
  1. Run the auth flow:
python auth.py
  1. Add to your Claude Code MCP config:
{
  "gmail-sender": {
    "type": "stdio",
    "command": "python",
    "args": ["path/to/server.py"]
  }
}

Usage

Once configured, the send_email tool is available in Claude Code:

  • to: Recipient email address
  • subject: Email subject line
  • body: Plain-text email body

Security

OAuth credentials and tokens are excluded via .gitignore. Never commit credentials.json or token.json.

About

MCP server for sending emails via Gmail with OAuth2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages