npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

custom-gmail-mcp

v1.0.6

Published

MCP server for accessing Gmail via OAuth2 with a React GUI

Readme

custom-gmail-mcp

An MCP (Model Context Protocol) server that lets Claude and other AI assistants access your Gmail inbox. Includes a React GUI accessible via a browser.

Features

  • List, search and read emails
  • Send emails and create drafts
  • Manage labels and threads
  • Mark messages as read/unread, move to trash
  • React-based GUI for visual browsing
  • OAuth2 authentication with automatic token refresh

Prerequisites

  • Node.js >= 18
  • A Google Cloud project with the Gmail API enabled
  • OAuth 2.0 credentials (Client ID + Client Secret)

Installation & Setup

1. Create your config file

Create the directory ~/.config/custom-gmail-mcp/ and add a .env file:

GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here

# Optional
GUI_PORT=3002
PROXY_URL=http://localhost:3000
PROXY_APP_PATH=/custom-gmail-mcp
PROXY_APP_NAME=Custom Gmail MCP

# Docker / custom redirect URI (overrides PROXY_URL+PROXY_APP_PATH)
# OAUTH_CALLBACK_BASE_URL=http://localhost:3002

The redirect URI sent to Google is built with the following priority:

| Scenario | redirect_uri | |---|---| | OAUTH_CALLBACK_BASE_URL set | {OAUTH_CALLBACK_BASE_URL}/oauth2callback | | PROXY_URL + PROXY_APP_PATH set | {PROXY_URL}{PROXY_APP_PATH}/oauth2callback | | Default | http://localhost:{GUI_PORT}/oauth2callback |

Declare the corresponding URL as an Authorized redirect URI in the Google Cloud Console.

Note on OAuth verification: Gmail scopes require app verification for production. In development, add your email as a "test user" in the OAuth consent screen.

2. Authenticate

npx custom-gmail-mcp-setup

This opens a browser OAuth flow and saves your tokens to ~/.config/custom-gmail-mcp/tokens.json.

3. Configure your MCP client (Claude Desktop / Cursor)

{
  "mcpServers": {
    "custom-gmail-mcp": {
      "command": "npx",
      "args": ["-y", "custom-gmail-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your_client_id_here",
        "GOOGLE_CLIENT_SECRET": "your_client_secret_here",
        "GUI_PORT": "3002"
      }
    }
  }
}

Available Tools

| Tool | Description | |---|---| | list_messages | List emails (optional Gmail search query) | | get_message | Get the full content of an email by ID | | search_messages | Search emails with Gmail syntax | | list_labels | List all Gmail labels and folders | | get_thread | Get a complete email thread | | send_email | Send an email | | create_draft | Create a draft email | | trash_message | Move an email to trash | | mark_as_read | Mark an email as read | | mark_as_unread | Mark an email as unread |

Development

git clone <repo>
cd gmail-mcp
npm install
npm run install:gui
npm run build

License

ISC