# Gmail Postmaster Tools [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/optipub/gmail-postmaster-tools-mcp  
**GitHub Stars:** 7  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gmail-postmaster-tools

## Description
Gmail Postmaster Tools v2 — domains, traffic metrics, and compliance via your own Google OAuth.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/optipub/gmail-postmaster-tools-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install
```

## Documentation

## What Gmail Postmaster Tools MCP server does

The Gmail Postmaster Tools MCP server exposes selected Gmail Postmaster Tools API v2 operations through MCP. It is intended for senders who want to inspect domains, compliance signals, and Gmail traffic data from an AI client.

Available operations include listing registered domains and retrieving an individual domain's verification state. Compliance checks cover SPF, DKIM, DMARC, authentication alignment, message formatting, DNS records, TLS encryption, user-reported spam rate, and unsubscribe-related verdicts.

Traffic queries can return spam rate, SPF/DKIM/DMARC authentication success, TLS encryption rate, delivery errors, and feedback-loop metrics for a chosen date range. Domain and IP reputation are not included in the API v2 coverage described here.

## How it works

The Gmail Postmaster Tools MCP server runs as a local Node.js process and communicates with an MCP client over stdio. The client starts `server/index.js` and supplies Google OAuth settings through environment variables. It does not provide a hosted endpoint; clients that require a remote HTTPS MCP URL cannot connect to this build directly.

Authentication uses Google's OAuth 2.0 authorization-code flow with PKCE. When authentication starts, the process opens a browser and listens temporarily on a dynamically assigned `127.0.0.1` port for the redirect. Access and refresh tokens are stored locally in `~/.gmail-postmaster-mcp/tokens.json` with restrictive file permissions.

The default scopes allow traffic and compliance reads plus domain listing and retrieval. `GPT_SCOPE` can narrow those permissions. Accounts using an OAuth app left in Google's Testing state may need to authenticate again about every seven days because Google can revoke their refresh tokens.

## Setup and configuration

Before running the Gmail Postmaster Tools MCP server, create or select a Google Cloud project, enable the Gmail Postmaster Tools API, configure the OAuth consent screen, and create a Desktop app OAuth client. External projects require the signing-in account to be added as a test user while the app remains in Testing. The Google account must also have access in Gmail Postmaster Tools.

Set `GPT_CLIENT_ID` and `GPT_CLIENT_SECRET` in the MCP client's environment. Then configure the client to run Node.js with the absolute path to `server/index.js`. Claude Desktop users can instead install the released `.mcpb` package and enter the credentials during installation. Run `gpt_authenticate` once to complete browser sign-in.

Optional settings include `GPT_API_BASE` for the API base URL, `GPT_TOKEN_DIR` for the token cache location, `GPT_LOGIN_TIMEOUT_MS` for the sign-in wait period, and `GPT_REQUEST_TIMEOUT_MS` for individual requests. Node.js 18 or newer is required.

## Tools and capabilities

- `gpt_authenticate` starts Google sign-in.
- `gpt_auth_status` reports authentication state.
- `gpt_sign_out` removes the local sign-in state.
- `list_domains` returns available Postmaster domains.
- `get_domain` retrieves a domain and its verification state.
- `get_compliance_status` checks sender compliance signals.
- `query_domain_stats` queries selected metrics over a date range.

Some metric requests require filters. Authentication success accepts an SPF, DKIM, or DMARC filter; TLS encryption accepts inbound or outbound traffic direction; delivery errors can accept an error-type filter. Spam rate does not require a filter.

The project is licensed under MIT and uses Node.js built-in modules at runtime, so the documented setup does not require installing runtime dependencies.

_Full upstream README: https://allmcps.com/mcp/gmail-postmaster-tools/readme_

