Gmail

Provides Gmail unread email access, draft replies, and optional Notion-based style guidance for professional communication.
  • javascript

0

GitHub Stars

javascript

Language

3 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "victormasson21-foundation-project-mcp": {
      "command": "node",
      "args": [
        "/absolute/path/to/foundation-project-mcp/dist/emailServer.js"
      ],
      "env": {
        "NOTION_API_KEY": "your_notion_api_key",
        "NOTION_STYLE_GUIDE_PAGE_ID": "your_page_id"
      }
    }
  }
}

You can run a Gmail-based MCP Server that lets your AI assistants read unread emails, draft replies, and optionally apply a Notion-backed style guide for professional writing. This server handles OAuth with Gmail, fetches unread messages, creates draft replies while preserving thread context, and can pull writing guidelines from Notion if you enable it.

How to use

Connect an MCP client to this Gmail MCP Server to read unread emails and draft replies. You will first authorize the Gmail connection, then request data or actions such as fetching unread messages, creating draft replies, or retrieving a writing style guide. Use the provided tools to perform common tasks like showing your unread emails, drafting responses, and applying your Notion-based style rules when available.

How to install

Follow these steps to install, build, and run the Gmail MCP Server on your machine.

Prerequisites you need installed on your system: Node.js and a package manager (pnpm is used here). You should also have access to a Gmail account for OAuth setup.

Additional setup and configuration

Install dependencies and build the server.

# 1. Install dependencies
pnpm install

# 2. Build the server
pnpm build

Set up Gmail OAuth prompts and configuration.

pnpm setup:gmail

Retrieve your MCP configuration for Claude Desktop.

./get-config.sh

(Optional) Enable Notion-based style guide by adding environment variables and then rebuilding.

# Add to .env.local:
NOTION_API_KEY=your_notion_api_key
NOTION_STYLE_GUIDE_PAGE_ID=your_page_id

# Then rebuild and restart:
pnpm build
# Restart Claude Desktop or your MCP client

MCP configuration

Your MCP client needs a configuration entry that points to the Gmail MCP Server. The server runs as a local stdio process started with Node.js.

{
  "mcpServers": {
    "gmail": {
      "command": "node",
      "args": [
        "/absolute/path/to/foundation-project-mcp/dist/emailServer.js"
      ]
    }
  }
}

Security considerations

Handle credentials securely. Never expose OAuth tokens or Notion integration tokens. The server uses Gmail OAuth scopes and token auto-refresh. Email headers are sanitized to prevent injection attacks.

Troubleshooting

If you encounter credential or token errors, re-run the Gmail setup step. If no emails are returned, ensure you have unread messages and that Gmail API access is enabled for your Google Cloud project.

Tools and capabilities

The server exposes the following tools to your MCP client.

Available tools

get_unread_emails

Retrieves unread emails from the Gmail inbox. Parameters: maxResults (optional) to limit the number of emails returned (default 10, max 50).

create_draft_reply

Creates a draft reply to an email in a thread using the original messageId and threadId. Requires sender, subject, and the replyBody content.

get_style_guide

Fetches the email writing style guide from Notion if configured. Returns guidelines and best practices.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational