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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kazuph/mcp-gmail-gas

v1.1.1

Published

Model Context Protocol server for Gmail

Downloads

253

Readme

MCP Gmail

Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.

Quick Start (For Users)

Prerequisites

  • Node.js 18+ (install via brew install node)
  • Gmail account
  • Google Apps Script deployment
  • Claude Desktop (install from https://claude.ai/desktop)

Configuration

  1. Deploy the Google Apps Script
  • Visit Google Apps Script and create a new project
  • Copy the entire contents of code.gs and paste it into the script editor
  • Click on "Deploy" > "New deployment"
  • Select "Web app" as the deployment type
  • Configure the following settings:
    • Execute as: Me
    • Who has access: Anyone
    • Click "Deploy"
  • When prompted, review and authorize the app to access your Gmail account
  • Copy the deployment URL and generate a random API key for security

Note: The script requires Gmail access permissions. When you first deploy and run the script, Google will ask you to review and grant these permissions. Make sure to:

  1. Click "Review Permissions"

  2. Select your Google account

  3. Click "Advanced" if you see a warning

  4. Click "Go to [Your Project Name] (unsafe)"

  5. Click "Allow" to grant the necessary Gmail permissions

  6. Open your Claude Desktop configuration file at: ~/Library/Application Support/Claude/claude_desktop_config.json

You can find this through the Claude Desktop menu:

  1. Open Claude Desktop

  2. Click Claude on the Mac menu bar

  3. Click "Settings"

  4. Click "Developer"

  5. Add the following to your configuration:

{
  "tools": {
    "gmail": {
      "command": "npx",
      "args": ["-y", "@kazuph/mcp-gmail-gas"],
      "env": {
        "GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL",
        "VALID_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Note: Replace YOUR_DEPLOYMENT_URL and YOUR_API_KEY with your actual values.

For Developers

Prerequisites

  • Node.js 18+ (install via brew install node)
  • Gmail account
  • Google Apps Script
  • Claude Desktop (install from https://claude.ai/desktop)
  • tsx (install via npm install -g tsx)

Installation

git clone https://github.com/kazuph/mcp-gmail-gas.git
cd mcp-gmail-gas
npm install
npm run build

Development Configuration

  1. Make sure Claude Desktop is installed and running.

  2. Install tsx globally if you haven't:

npm install -g tsx
# or
pnpm add -g tsx
  1. Modify your Claude Desktop config located at: ~/Library/Application Support/Claude/claude_desktop_config.json

Add the following to your MCP client's configuration:

{
  "tools": {
    "gmail": {
      "args": ["tsx", "/path/to/mcp-gmail-gas/index.ts"],
      "env": {
        "GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL",
        "VALID_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Available Tools

  • gmail_search_messages: Search for emails using Gmail search query syntax (e.g., "subject:Meeting newer_than:1d")
  • gmail_get_message: Get the full content and details of a specific email
  • gmail_download_attachment: Download an attachment from a specific email

Security Note

Always keep your VALID_API_KEY secret and never commit it to version control. This key helps ensure that only authorized clients can access your Gmail through the Google Apps Script deployment.