Gmail Postmaster Tools v2 β domains, traffic metrics, and compliance via your own Google OAuth.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server for the Gmail Postmaster Tools API (v2) β query your domains, sender compliance status, and Gmail traffic metrics from Claude, Cursor, or any MCP client.
This is a bring-your-own-credentials tool for hands-on senders: you supply your own Google OAuth client, and the server runs the sign-in locally. Nothing is hosted and no data leaves your machine.
Want this without setting up a Google Cloud project? That's what Postmaster+ is for β hosted, multi-provider (Gmail + Outlook + more), with verification, history, and alerting.
Built & maintained by the Postmaster+ team at OptiPub.
list_domains / get_domain β your registered domains and their verification stateget_compliance_status β SPF, DKIM, DMARC, alignment, message formatting, DNS records, TLS encryption, user-reported spam rate, and one-click / honored unsubscribe verdictsquery_domain_stats β spam rate, auth success (SPF/DKIM/DMARC), TLS encryption rate, delivery errors, and feedback-loop metrics over any date rangegpt_authenticate / gpt_auth_status / gpt_sign_outNote: Postmaster Tools v2 covers traffic metrics + compliance. Domain and IP reputation are not part of v2.
You need a Google Cloud OAuth client because Google doesn't offer a shared public one for this API.
You'll paste those two values into this extension's configuration at install time. (Make sure the Google account you sign in with is one that has access in Gmail Postmaster Tools.)
.mcpb)The .mcpb is a packaging convenience for Claude Desktop / Cowork only.
gmail-postmaster-tools.mcpb from the latest release.gpt_authenticate once β your browser opens for the Google sign-in.Underneath, this is a standard stdio MCP server β any client that runs local
MCP servers can use it directly, no .mcpb required. Clone or download the repo,
then point the client at server/index.js and pass your Google credentials as
env vars.
Cursor β edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
VS Code (.vscode/mcp.json), Windsurf, Claude Desktop (manual config),
and most other clients use the same command + args + env shape β only the
config file location differs. Other env overrides are listed under
Configuration.
The first tool call (or gpt_authenticate) opens your browser for the Google
sign-in; the 127.0.0.1 loopback works on any local desktop client.
Remote-only clients (e.g. Perplexity, ChatGPT connectors): these accept only a remote HTTPS MCP server URL, not a local command, so this stdio build can't be added directly. That would require hosting it β which is what Postmaster+ provides.
gpt_authenticatelist_domainsget_compliance_status { domain: "example.com" }query_domain_stats { domain: "example.com", start_date: "...", end_date: "...", metrics: ["SPAM_RATE"] }query_domain_stats { domain: "example.com", metrics: [{ "standardMetric": "AUTH_SUCCESS_RATE", "filter": "auth_type=\"dkim\"" }] }Some metrics require a filter: AUTH_SUCCESS_RATE (auth_type=spf|dkim|dmarc),
TLS_ENCRYPTION_RATE (traffic_direction=inbound|outbound),
DELIVERY_ERROR_RATE (optional error_type=...). SPAM_RATE needs none.
OAuth 2.0 authorization-code + PKCE, over a http://127.0.0.1:<dynamic-port>
loopback redirect (Google's recommended flow for desktop apps). On sign-in the
server starts a short-lived listener on 127.0.0.1, opens your browser, receives
the code, and exchanges it (with your client secret + PKCE verifier) for tokens.
Google requires a client secret even for desktop apps, which is why both values
are needed. Tokens are stored only on your machine at
~/.gmail-postmaster-mcp/tokens.json (0600) and are git-ignored.
Scopes: by default the server requests
postmaster.traffic.readonly (metrics + compliance) and postmaster.domain
(list/get domains). Override with the GPT_SCOPE env var if you want to narrow
it (e.g. traffic-only, dropping list_domains/get_domain).
Google revokes refresh tokens after 7 days for OAuth apps whose publishing
status is Testing β the mode the setup steps above use to skip verification.
In practice that means you'll re-run gpt_authenticate about once a week. The
server handles this gracefully: when the refresh fails, tool calls tell you to
re-authenticate.
To stop the weekly re-auth, set your OAuth app's publishing status to In
production (Google Auth Platform β Audience β Publish app). Notes for the
postmaster (sensitive) scopes:
| Variable | Purpose | Default |
|---|---|---|
GPT_CLIENT_ID | Google OAuth client ID (required) | β |
GPT_CLIENT_SECRET | Google OAuth client secret (required) | β |
GPT_SCOPE | Space-separated OAuth scopes | traffic.readonly + domain |
GPT_API_BASE | API base URL | https://gmailpostmastertools.googleapis.com/v2 |
GPT_TOKEN_DIR | Token cache directory | ~/.gmail-postmaster-mcp |
GPT_LOGIN_TIMEOUT_MS | Sign-in wait | 180000 |
GPT_REQUEST_TIMEOUT_MS | Per-request timeout | 60000 |
Pushing a vX.Y.Z tag triggers CI to pack, attach the .mcpb to a GitHub
Release, and publish to the MCP Registry.
Only Node.js built-ins (http, https, crypto, readline) β tiny bundle, no
supply-chain risk, nothing to npm install.
See CONTRIBUTING.md.
MIT Β© OptiPub
Not affiliated with or endorsed by Google. "Gmail", "Google", and "Postmaster Tools" are trademarks of Google LLC.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gmail-postmaster-tools)<a href="https://allmcps.com/mcp/gmail-postmaster-tools"><img src="https://allmcps.com/api/badge/gmail-postmaster-tools?style=directory" alt="Gmail Postmaster Tools on AllMCPs" /></a>