google-workspace-mcp: Instructions file for Codex

AGENTS.md

google-workspace-mcp AGENTS.md is an instructions file for Codex, OpenCode from laltaffer/google-workspace-mcp. It costs 416 tokens per session, scanned B, original, MIT.

Repository instructions for a TypeScript server that connects coding agents to Google Docs, Sheets, Drive, Calendar, and file comments. They describe privacy rules and the commands used to build, run, and test the server.

In plain words
What is it for?
Use them when modifying this Google Workspace integration, especially when handling authentication, running the test suite, or starting the server.
Why use it?
They keep account secrets, access tokens, and private notes out of the public repository. They also give agents consistent rules for building and checking changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is laltaffer/google-workspace-mcp's own configuration. It tells Codex and OpenCode how to work on google-workspace-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything google-workspace-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to laltaffer/google-workspace-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/laltaffer/google-workspace-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/laltaffer/google-workspace-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 google-workspace-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/laltaffer/google-workspace-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/laltaffer/google-workspace-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/laltaffer/google-workspace-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/laltaffer/google-workspace-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for google-workspace-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/laltaffer/google-workspace-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/laltaffer/google-workspace-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 416 This file is loaded in full into every session.
When invoked 416 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
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.1 $0.00416 $0.00416
Opus 5.5 $0.00166 $0.00166
Sonnet 5.5 $0.00083 $0.00083
Haiku 4.5 $0.00042 $0.00042

Measured 26d ago against content hash 5891cb750b9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

google-workspace-mcp AGENTS.md scanned grade B with 1 finding 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 26d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Never put `GOOGLE_CLIENT_SECRET` in a client config (`~/.claude.json`, `~/.codex/config.toml`). The server reads it from the Keychain (service `google-workspace-mcp`, account `client-secret`), and an env value override
AGENTS.md · 22 lines

What it actually says

google-workspace-mcp — agent context

TypeScript MCP server: read/write Google Docs, Sheets, Drive, Calendar, and file comments, across multiple Google accounts. Public repo; notes files stay local via exclude. Exists because official Google MCP servers still cannot edit Docs/Sheets in place.

Must-nots / privacy

  • Never commit OAuth client secrets or tokens. Tokens live in the macOS Keychain (service google-workspace-mcp, account tokens) or ~/.google-workspace-mcp/tokens.json elsewhere.
  • Do not commit _brain.md / CLAUDE.md into the public tree.
  • Never put GOOGLE_CLIENT_SECRET in a client config (~/.claude.json, ~/.codex/config.toml). The server reads it from the Keychain (service google-workspace-mcp, account client-secret), and an env value overrides the Keychain, so a stale copy breaks auth.
  • Every client config that spawns one server per thread or chat (Codex) must set MCP_IDLE_EXIT_MINUTES (30 today) so idle servers exit instead of piling up on stale builds. Claude Code spawns one per session and needs no value. The server always exits when its client closes stdin.
  • After rebuilding dist, kill running servers so clients respawn on the new build: pkill -f 31_google-workspace-mcp/dist/index.js, then restart or reconnect the client.

Build / run / test

npm install
npm run build
npm test               # vitest suite (mocked googleapis)
node dist/index.js    # stdio MCP; needs GOOGLE_CLIENT_ID (secret from Keychain); registered user-scope in Claude Code and in ~/.codex/config.toml as google-workspace

Re-auth via the authorize MCP tool when refresh tokens expire (invalid_grant): open the URL it returns and approve.

Durable status and open items: _brain.md.

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. 26d ago Changed · +2 lines · +161 tokens per session scan A → B 5891cb750b9e
  2. 29d ago Changed · +23 tokens per session fd16ae1d5a69
  3. 1mo ago Changed · +30 tokens per session b84e7c311e27
  4. 1mo ago First seen · 20 lines · 202 tokens per session scan A 7c585a6d5d0a

Subscribe to this mod's changes

google-workspace-mcp AGENTS.md is an instructions file published in the GitHub repository laltaffer/google-workspace-mcp (0 stars, last pushed 18d ago), licensed MIT. It adds 416 tokens to every session, about $0.0017 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-18.

Related

google-workspace-mcp AGENTS.md compared with instructions from other repositories

google-workspace-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
google-workspace-mcp AGENTS.mdlaltaffer/google-workspace-mcpInstructions file018d agoMITB416Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot