Gmail Mcp

Created By
klodr2 months ago
Gmail MCP server with scope-gated tools (readonly / send / modify), path jails for attachments and downloads, hardened OAuth credentials, and Sigstore-signed releases. Read, search, send, draft, label, filter, and thread Gmail from any MCP-enabled AI assistant.
Overview

gmail-mcp

Read, search, send, draft, label, filter, and thread Gmail from any MCP-enabled AI assistant. Wraps the Gmail API with scope-gated tools and in-process safeguards.

Features

  • Scope-gated tools: tool list filtered at startup based on granted OAuth scopes (readonly / send / modify).
  • Path jails: attachment + download directories restrict where the agent can read/write, blocking prompt-injection exfiltration of ~/.ssh/id_rsa, credentials, etc.
  • Hardened OAuth: credentials file mode 0o600, post-mkdir realpath verification (TOCTOU defense), O_NOFOLLOW on leaf writes.
  • Rate limiting: per-bucket daily + monthly caps (send / delete / modify / drafts / labels / filters).
  • Audit log: opt-in append-only JSONL log of every tool call (redacted).
  • Sigstore-signed releases + SLSA in-toto attestation + npm provenance + SBOM.

Installation

npm install -g @klodr/gmail-mcp

Or directly via npx:

npx -y @klodr/gmail-mcp

Requires Node.js 22+.

Authentication

npx -y @klodr/gmail-mcp auth --scopes=gmail.readonly

Always pass --scopes with the minimum you actually need.

Configuration

{
  "mcpServers": {
    "gmail": {
      "command": "npx",
      "args": ["-y", "@klodr/gmail-mcp"]
    }
  }
}

License

MIT

Server Config

{
  "mcpServers": {
    "gmail": {
      "command": "npx",
      "args": [
        "-y",
        "@klodr/gmail-mcp"
      ]
    }
  }
}
Project Info
Created At
2 months ago
Updated At
2 months ago
Author Name
klodr
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Meok Bs7121 Mcp

2 days ago