# Gmail Postmaster Tools

A local MCP server reads Gmail Postmaster Tools metrics through your Google OAuth. Use it to inspect domains, delivery signals, and sender compliance.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 7
- Author: optipub
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/optipub/gmail-postmaster-tools-mcp
- Updated: 2026-07-22
- HTML: https://affpapa.org/en/nevibecode/mcp/gmail-postmaster-tools

## What it does

This server connects to the Gmail Postmaster Tools API v2 and exposes tools for sign-in, domain lookup, compliance checks, and traffic reports. An agent can inspect spam rate, SPF/DKIM/DMARC authentication, TLS encryption, delivery errors, and feedback-loop data for a chosen date range. Domain and IP reputation are outside the v2 API.

It runs as a local stdio MCP server. The client starts `server/index.js` and receives the Google OAuth Client ID and Client Secret through `GPT_CLIENT_ID` and `GPT_CLIENT_SECRET`. Sign-in opens a browser through a local `127.0.0.1` callback, while tokens stay on the machine in `~/.gmail-postmaster-mcp/tokens.json`.

Setup requires a Google Cloud project, the Gmail Postmaster Tools API, and a Desktop app OAuth client. With the OAuth app left in Testing, Google revokes refresh tokens after 7 days, so `gpt_authenticate` must be run again about once a week.

## Requirements
- Works with: Gmail

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- inspect a domain’s Gmail status
- retrieve spam rates for a date range
- check SPF, DKIM, and DMARC authentication
- review TLS and delivery-error metrics
- complete local Google OAuth sign-in

## Example prompts
- Run `gpt_authenticate` to sign in to Gmail Postmaster Tools.
- Use `list_domains` to show my registered Postmaster domains.
- Check whether `example.com` meets Gmail sender requirements with `get_compliance_status`.

## Similar
- [multi-gmail-mcp](https://affpapa.org/en/nevibecode/mcp/multi-gmail-mcp.md) — MCP server · ★ 19
- [gws-gmail-watch](https://affpapa.org/en/nevibecode/skills/gws-gmail-watch.md) — skill · 37200 installs
- [FGAC.ai: Multiple Gmail Accounts, Google Sheets & Docs](https://affpapa.org/en/nevibecode/mcp/fgacai-multiple-gmail-accounts-google-sheets-docs.md) — MCP server
- [gmail-skill](https://affpapa.org/en/nevibecode/skills/gmail-skill.md) — skill · 3600 installs
- [gmail](https://affpapa.org/en/nevibecode/skills/sanjay3290-gmail.md) — skill · 516 installs
- [gmail-mcp](https://affpapa.org/en/nevibecode/mcp/gmail-mcp.md) — MCP server · ★ 9

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
