Email mcp server

From NaveedTechLab/skills-library · View interactive version

Email mcp server is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. MCP server enabling Claude Code to draft, send, and search emails via Gmail with HITL (Human-in-the-Loop) enforcement. Use when Claude needs to interact with Gmail for email operations while maintaining human oversight and approval for sensitive actions.

How to use this skill

Skill file

Email MCP Server

Overview

The Email MCP Server is a Model Context Protocol (MCP) server that enables Claude Code to interact with Gmail for email operations. It provides secure, human-monitored access to email functionality with Human-in-the-Loop (HITL) enforcement for sensitive operations.

Core Capabilities

The email MCP server provides:

  1. Email Drafting: Compose emails with rich formatting and attachments
  2. Email Sending: Send emails with appropriate HITL approvals
  3. Email Search: Search and retrieve emails based on various criteria
  4. HITL Enforcement: Human oversight for sensitive email operations
  5. Security Controls: Authentication and access management
  6. Audit Trail: Logging of all email operations

Usage Scenarios

Use the email MCP server when:

Architecture

The server follows MCP standards and provides secure access to Gmail with appropriate safeguards:

MCP Endpoints

Available Operations

The server exposes these MCP-compatible operations:

HITL Enforcement

Certain operations require human approval:

Security Considerations

Authentication

Authorization

HITL Controls

Configuration

Required Setup

  1. Google Cloud Project with Gmail API enabled
  2. OAuth2 credentials (client ID and secret)
  3. Authorized redirect URIs
  4. HITL approval endpoints (optional)

Example Configuration

{
  "gmail": {
    "client_id": "your-client-id",
    "client_secret": "your-client-secret",
    "scopes": ["https://www.googleapis.com/auth/gmail.modify", "https://www.googleapis.com/auth/gmail.send"],
    "redirect_uris": ["http://localhost:8080/oauth/callback"]
  },
  "hitl": {
    "enabled": true,
    "approval_required": {
      "external_recipients": true,
      "attachment_size_mb": 10,
      "sensitive_keywords": ["confidential", "private", "urgent"]
    }
  },
  "server": {
    "port": 8080,
    "host": "localhost"
  }
}

HITL Workflow

Standard Workflow

  1. Claude requests email operation
  2. Server evaluates HITL requirements
  3. If approval required, notify human reviewer
  4. Human approves/rejects operation
  5. Server executes approved operation
  6. Result returned to Claude

Emergency Override

For urgent operations, emergency override procedures are available with additional authentication.

Resources

This skill includes example resource directories that demonstrate how to implement email operations with MCP compliance:

scripts/

Python scripts for MCP server implementation, Gmail API integration, and HITL workflows.

references/

Documentation for Gmail API integration, OAuth2 setup, and HITL procedures.

assets/

Configuration templates and example implementations for various email scenarios.


The email MCP server enables secure and compliant email operations with appropriate human oversight.

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.