Skip to main content
Glama

MCP Gmail Server

A minimal Model Context Protocol (MCP) server that sends emails through Gmail.

Quick Start

  1. Install dependencies:

    npm install
  2. Set up Gmail credentials:

    cp .env.example .env # Edit .env with your Gmail credentials
  3. Build and run:

    npm run build npm start

Configuration

Set these environment variables in .env:

  • GMAIL_USER: Your Gmail address

  • GMAIL_PASS: Gmail App Password (not your regular password)

Usage

The server exposes one tool: send_email

Parameters:

  • to: Recipient email address

  • subject: Email subject line

  • body: Email content (plain text)

Files

  • src/index.ts - Main MCP server implementation

  • .well-known/mcp.json - MCP server manifest

  • .vscode/mcp.json - VS Code MCP configuration

Testing

# Test with MCP Inspector npx @modelcontextprotocol/inspector node build/index.js ## How It Works 1. Creates MCP server with Gmail transporter 2. Registers `send_email` tool with input validation 3. Connects via STDIO transport for MCP communication 4. Returns structured responses with success/error states
Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PranavMishra28/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server