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

gmcp

v0.7.0

Published

GMCP Server for Google Workspace with OAuth2 authentication

Readme

Overview

GMCP is a Model Context Protocol server that enables LLMs to interact with Gmail and Google Calendar. It provides tools for searching emails, managing labels, sending messages, and working with calendar events—all through secure OAuth2 authentication.

Installation

NPM (Recommended)

# Install globally
npm install -g gmcp

# Or run directly
npx gmcp
bunx gmcp

Docker

docker pull johnie/gmcp:latest

From Source

git clone https://github.com/johnie/gmcp.git
cd gmcp
bun install

Quick Start

1. Google Cloud Setup

  1. Create a project in Google Cloud Console
  2. Enable Gmail API and Calendar API
  3. Create OAuth 2.0 Client ID (Desktop Application type)
  4. Download the credentials JSON file

2. Authenticate

# If installed globally
gmcp auth

# Or with npx
npx gmcp auth

# Or from source
bun run auth

Follow the prompts to authorize. The browser will show "connection refused" after authorization - this is expected. Copy the code= parameter from the URL.

3. Run

# Globally installed
gmcp start
# or just: gmcp

# With npx
npx gmcp start

# From source
bun run start

Claude Desktop Integration

Using npx (Recommended)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gmcp": {
      "command": "npx",
      "args": ["-y", "gmcp"],
      "env": {
        "GOOGLE_CREDENTIALS_PATH": "/path/to/credentials.json",
        "GOOGLE_TOKEN_PATH": "/path/to/token.json",
        "GOOGLE_SCOPES": "gmail.readonly,gmail.send,calendar.events"
      }
    }
  }
}

Using Docker

{
  "mcpServers": {
    "gmcp": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/path/to/credentials.json:/app/data/credentials.json:ro",
        "-v", "/path/to/token.json:/app/data/token.json",
        "-e", "GOOGLE_CREDENTIALS_PATH=/app/data/credentials.json",
        "-e", "GOOGLE_TOKEN_PATH=/app/data/token.json",
        "-e", "GOOGLE_SCOPES=gmail.readonly,gmail.send,calendar.events",
        "johnie/gmcp:latest"
      ]
    }
  }
}

Using Bun (From Source)

{
  "mcpServers": {
    "gmcp": {
      "command": "bun",
      "args": ["run", "/path/to/gmcp/src/cli.ts"],
      "env": {
        "GOOGLE_CREDENTIALS_PATH": "/path/to/credentials.json",
        "GOOGLE_TOKEN_PATH": "/path/to/token.json",
        "GOOGLE_SCOPES": "gmail.readonly,gmail.send,calendar.events"
      }
    }
  }
}

Tools

Gmail (17 tools)

| Tool | Description | |------|-------------| | gmcp_gmail_search_emails | Search with Gmail query syntax | | gmcp_gmail_get_email | Get message by ID | | gmcp_gmail_get_thread | Get conversation thread | | gmcp_gmail_list_attachments | List attachments on message | | gmcp_gmail_get_attachment | Download attachment data | | gmcp_gmail_send_email | Send new email | | gmcp_gmail_reply | Reply to email in thread | | gmcp_gmail_create_draft | Create draft message | | gmcp_gmail_delete_email | Permanently delete email (bypasses trash) | | gmcp_gmail_archive_email | Archive email (remove from inbox) | | gmcp_gmail_list_labels | List all labels | | gmcp_gmail_get_label | Get label details | | gmcp_gmail_create_label | Create custom label | | gmcp_gmail_update_label | Update label settings | | gmcp_gmail_delete_label | Delete custom label | | gmcp_gmail_modify_labels | Add/remove labels on message | | gmcp_gmail_batch_modify | Batch label operations |

Calendar (4 tools)

| Tool | Description | |------|-------------| | gmcp_calendar_list_calendars | List all calendars | | gmcp_calendar_list_events | List events with filters | | gmcp_calendar_get_event | Get event by ID | | gmcp_calendar_create_event | Create event (supports recurring, Google Meet) |

Configuration

Environment Variables

| Variable | Description | |----------|-------------| | GOOGLE_CREDENTIALS_PATH | Path to OAuth2 credentials JSON | | GOOGLE_TOKEN_PATH | Path to store OAuth2 tokens | | GOOGLE_SCOPES | Comma-separated API scopes |

Scopes

| Scope | Access | |-------|--------| | gmail.readonly | Read emails and labels | | gmail.send | Send emails | | gmail.modify | Read, modify labels, delete emails | | gmail.labels | Manage labels | | gmail.compose | Create drafts and send | | calendar.readonly | Read calendars and events | | calendar.events | Manage events | | calendar | Full calendar access |

Examples:

# Read-only
GOOGLE_SCOPES=gmail.readonly,calendar.readonly

# Full access
GOOGLE_SCOPES=gmail.readonly,gmail.modify,gmail.send,calendar.events

CLI Reference

gmcp [command]

Commands:
  start    Start MCP server (default)
  auth     Run OAuth2 authentication flow

Options:
  --help, -h       Show usage
  --version, -v    Show version

Testing

bunx @modelcontextprotocol/inspector bun run start

License

MIT