gmail-mcp AGENTS.md

gmail-mcp AGENTS.md is an instructions file for Codex, OpenCode from klodr/gmail-mcp. It costs 2,688 tokens per session, scanned A, original, from a forked repository, MIT.

Repository instructions for Gmail MCP, a server that lets AI assistants use Gmail's API, the interface for accessing Gmail data and actions.

In plain words
What is it for?
Use them when changing the Gmail MCP code, or follow the separate installation instructions when configuring the server in an AI client.
Why use it?
They tell coding agents which rules, security boundaries, setup steps, and checks apply when editing the repository.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/klodr/gmail-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/klodr/gmail-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gmail-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/klodr/gmail-mcp/agents-md.svg)](https://agentmods.dev/instructions/klodr/gmail-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/klodr/gmail-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/klodr/gmail-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,688 This file is loaded in full into every session.
When invoked 2,688 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin fork From a forked repository.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02688 $0.02688
Opus 5 $0.01344 $0.01344
Sonnet 5 $0.00538 $0.00538
Haiku 4.5 $0.00269 $0.00269

Measured 3d ago against content hash e938b7e4eb7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gmail-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This repository is gmail-mcp — a Model Context Protocol server that exposes the Gmail v1 API to AI assistants behind scope-gated tools (~33 tools across messages, threads, labels, filters, drafts, downloads, batch ops). It is a hardened + enhanced fork of GongRzhe/Gmail-MCP-Server (archived) via ArtyMcLabin/Gmail-MCP-Server, with 130+ commits of divergence — prompt-injection guards, OAuth scope-gating, batch retry, supply-chain hygiene, and CI gating.

This file is the canonical source of truth for any AI agent that edits the code in this repository. Read it before making changes. It encodes the conventions the maintainers actually enforce — not aspirations.

If you are an installation agent (i.e. helping a user install the MCP server in their client config rather than edit the server code), stop reading this file and read llms-install.md instead. That file is for the install audience; this one is for code-editing agents.

Audience boundary

Audience Source of truth
Edits this repo's code AGENTS.md (you are here)
Installs this MCP into a client config llms-install.md
Threat model / security argument docs/ASSURANCE_CASE.md
Disaster recovery / continuity docs/CONTINUITY.md
Forward-looking work docs/ROADMAP.md
Comparison vs upstream forks docs/COMPETITORS.md
End-user features and install commands README.md
Vulnerability reporting .github/SECURITY.md

Read the full file on GitHub · 236 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 236 lines · 2,688 tokens per session scan A e938b7e4eb7e

Subscribe to this mod's changes

gmail-mcp AGENTS.md is an instructions file published in the GitHub repository klodr/gmail-mcp (11 stars, last pushed 10d ago), licensed MIT. It adds 2,688 tokens to every session, about $0.0134 per session on Opus 5. A static security scan graded it A with 0 findings. It comes from a forked repository.