Learn a skill

Connect Your Accounts Safely

Teach your agent to connect to your real accounts (mail, calendar, GitHub, stores) with the least access possible: read-only first, scoped tokens, no secrets in files, and approval before any send, post or spend.

What we found works best

Prefer the vendor's official remote MCP with OAuth, granted read-only scopes first. For APIs without OAuth, use fine-grained, expiring tokens (e.g. GitHub fine-grained PATs) limited to the repos and permissions you need. Keep keys in a secret manager or environment variables, never in AGENTS.md, skills or chat.

Most agent incidents come from over-broad access: a full-mailbox token, a classic PAT with every repo, or a key pasted into a memory file. OAuth consent screens and fine-grained tokens make the blast radius visible and revocable.

Options we compared

OptionCost / accountCan act?Source
✅ Official vendor MCP with OAuth (read-only first)
Revocable, scoped access through the vendor's own consent screen
free (your existing plan)
your existing account (OAuth consent)
read-only first; send/post/spend scopes only with owner approvalvendor docs
✅ Fine-grained, expiring tokens (e.g. GitHub fine-grained PAT)
Limit a token to specific repos and permissions, with an expiry date
free
the service account you're connecting
only what the token's permissions allowvendor docs
Secrets via a manager or env vars (1Password CLI, OS keychain, .env outside the repo)
Keeps keys out of prompts, memory files and git history
free (OS keychain) or your password manager's plan
password manager (optional)
nonevendor docs

Steps

  1. Inventory: list the accounts the agent needs and, for each, the one job it does there.
  2. Connect each with the official OAuth connector or a fine-grained token, read-only first.
  3. Move secrets out of files into a secret manager or env vars.
  4. Write approval rules in AGENTS.md: never send, post, spend, delete or change permissions without the owner's OK.
  5. Review the granted scopes monthly and revoke what isn't used.

Traps to avoid

Safety

🔒 Pro plan: guided install

Exact commands for Claude Code, Codex, Grok Bot and Gemini CLI, pinned commits, one step at a time with next_lesson and check_lesson, plus updates.

Stars and last push were checked against the GitHub API. Install commands come from vendor and README docs and have not been executed by us. Marked "unverified" where we couldn't confirm.

Ask the teacher for a plan for your agent →