# Gmail Privacy Shield & MCP Setup Doctor (Free)

> Free read-only Gmail security scanner + 3-minute local gmail-mcp-server setup doctor. Deterministically blocks OTPs, bank/medical PII, phishing, and hidden prompt injections before an AI agent reads email bodies. Works on pasted emails immediately or live Gmail MCP.

Gmail Privacy Shield & MCP Setup Doctor (Free) is a free AI agent skill on Agensi by Anirban Roy, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Anirban Roy](https://www.agensi.io/creators/anirban-roy)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0.0
- Last updated: 2026-12-04
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/gmail-privacy-shield-mcp-setup-doctor-free
- Tags: security, productivity, gmail, privacy, prompt-injection, phishing, mcp, claude-code

## What it does

- Blocks the AI from reading sensitive bodies like bank alerts or password resets
- Scans for phishing tricks and hidden malicious commands in messages
- Identifies high-risk senders and suspicious links before you click them
- Provides step-by-step help to connect Gmail to apps like Claude or Cursor
- Fixes common Google connection errors like missing credentials or access denied

## Who it's for

- **People using AI agents for work email:** Scan your inbox for scams and sensitive data before your AI agent reads it. Try: "Scan my unread emails from the last week for anything risky."
- **Users struggling to connect Gmail to their AI apps:** Get your Gmail connected to your favorite AI tools in minutes without technical headaches. Try: "Help me set up the Gmail MCP server for Claude Desktop on my Mac."
- **Security-conscious freelancers and owners:** Keep bank alerts and private codes away from your AI history. Try: "Check this pasted email for phishing or hidden commands."

## About this skill

Giving an AI agent access to Gmail is powerful — until it pulls a 2FA code, banking alert, or a phishing email containing hidden prompt-injection text straight into your chat context.

**Gmail Privacy Shield & MCP Setup Doctor** is a **100% free, read-only** security and onboarding skill built by the creator of the open-source `gmail-mcp-server` (22 local Gmail tools).

---

### What It Does

- **Metadata-First Privacy Shield (`scripts/privacy_gate.py`)** — Deterministically screens email metadata *before* body retrieval using offline stdlib Python 3. Automatically blocks OTP/2FA codes, password resets, bank/card/wire alerts, medical notices, and tax/government ID emails (`BLOCK_SENSITIVE`).
- **Phishing & Prompt-Injection Detection** — Flags brand impersonation on free webmail, raw-IP/shortened verification links, hidden zero-width/bidi unicode characters, and prompt-injection payloads (`QUARANTINE_THREAT`) with a 0–100 risk score.
- **3-Minute Local `gmail-mcp-server` Setup Doctor** — Guides you step-by-step through Google Cloud Desktop OAuth setup, `npx @sar333/gmail-mcp-server setup`, client JSON configs (Claude Desktop, Claude Code, Cursor, Windsurf, Codex CLI, Gemini CLI), and instant OAuth troubleshooting.
- **Read-Only By Design** — Never sends, replies, labels, archives, or deletes a single email.

---

### Works Immediately (No API Keys, No Paid Tools)

- **Standalone Mode:** Paste any suspicious email, forwarded thread, or JSON export right now and get a deterministic 0–100 privacy and threat audit.
- **Connected Mode:** Pair with the free local MIT-licensed `gmail-mcp-server` (tokens stay strictly on your machine at `~/.gmail-mcp/token.json`) to audit live unread Gmail metadata safely.

---

### Want Full Gmail Automation, Enriched CRM & Verified Outreach?

Once your local Gmail MCP is connected and protected, check out our flagship **Gmail Command Center: Inbox, Enriched CRM & Outreach Suite** on our Agensi creator profile — adding 5 specialized workflows for nested triage labeling, dry-run bulk cleanup, Inbox-to-CRM CSV enrichment (80+ company datapoints + Google/Trustpilot reviews), SMTP/catch-all verified cold outreach drafts, and Follow-Up Radar.

## Requires

- Gmail MCP
- Node.js
- @sar333/gmail-mcp-server

## Known limitations

- Read-only by design: cannot send, reply, apply Gmail labels, archive, or delete messages.
- Heuristic screening catches known PII, phishing, and prompt-injection patterns deterministically, but is not a replacement for enterprise email security gateways.
- Live inbox metadata screening requires installing the free local gmail-mcp-server companion.

## Technical details

Built to work with the open-source gmail-mcp-server. Uses a local Python script for deterministic privacy gating (risk scoring 0-100). Requires a credentials.json file for live Gmail access via OAuth. Compatible with Claude Desktop, Cursor, and other MCP-enabled clients. Provides diagnostic support for Google Cloud Console setup and npx doctor commands.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Gmail Privacy Shield & MCP Setup Doctor (Free) skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this protect my privacy when using an AI agent with my email?

This skill scans your inbox to find and block sensitive items like one time passwords, bank alerts, and medical info before your AI agent reads them. It also looks for hidden scams and phishing threats to keep your data safe while you manage your mail.

### What do I need to have ready to connect my Gmail to my AI app?

To use the live features, you need a Google account and the gmail-mcp-server software. The skill includes a doctor tool that guides you through creating a Google Cloud project, setting up your credentials file, and fixing common connection errors.

### How do I tell my AI agent to start a security check?

You can ask the skill to scan your unread inbox, check a specific email thread, or audit text that you paste directly into the chat. It will then give you a security report labeling each message by its risk level.

### What kind of report will I see after a scan?

You receive an audit summary table showing risk levels and a safe list of emails that are okay for the AI to summarize. It also provides specific alerts for high risk threats like brand spoofing or hidden instructions designed to trick the AI.

### Can I use this to automatically reply to or organize my emails?

This skill is for security auditing and setup help only. It cannot send new emails, reply to messages, archive your inbox, or delete mail; for those automated tasks, you would need a different tool like the Gmail Command Center pack.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
