totp-oauth

totp-oauth is a skill for Claude Code from abel30567/fermi-mcp. It costs 38 tokens per session (468 once invoked), scanned A, original, MIT.

Authentication guidance for protecting web endpoints and private applications with OAuth 2.0, a token-based login standard, plus TOTP, the six-digit codes used by authenticator apps for two-step verification.

In plain words
What is it for?
Use it to protect MCP connections and private R2-hosted apps, configure owner login, register clients, manage sessions, and roll authentication back safely.
Why use it?
It explains how to require owner credentials and time-based codes, issue access tokens, and temporarily disable authentication when troubleshooting.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to protect MCP connections and private R2-hosted apps, configure owner login, register clients, manage sessions, and roll authentication back safely.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abel30567/fermi-mcp/totp-oauth
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.

Any agent
npx skills add abel30567/fermi-mcp --skill totp-oauth
Clone the repo
git clone --depth 1 https://github.com/abel30567/fermi-mcp

Made for: Claude Code.

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 totp-oauth

README.md
[![agentmods](https://agentmods.dev/badge/skills/abel30567/fermi-mcp/totp-oauth/github.svg)](https://agentmods.dev/skills/abel30567/fermi-mcp/totp-oauth)
Your own site
<a href="https://agentmods.dev/skills/abel30567/fermi-mcp/totp-oauth"><img src="https://agentmods.dev/badge/skills/abel30567/fermi-mcp/totp-oauth/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 totp-oauth

Your own site · 80×15
<a href="https://agentmods.dev/skills/abel30567/fermi-mcp/totp-oauth"><img src="https://agentmods.dev/badge/skills/abel30567/fermi-mcp/totp-oauth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 468 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00038 $0.00468
Opus 5.5 $0.00015 $0.00187
Sonnet 5.5 $0.00008 $0.00094
Haiku 4.5 $0.00004 $0.00047

Measured 1mo ago against content hash 81daccd09f1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

totp-oauth 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 1mo 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.

packages/worker/seeds/skills/totp-oauth/SKILL.md · 35 lines

What it actually says

Fermi OAuth 2.0 + TOTP owner auth

Built in PR #5 (issue #4); provider refactored onto @cloudflare/workers-oauth-provider (issue #7). Protects the MCP endpoints and private R2-hosted apps.

Flow

  1. MCP client hits /mcp or /sse; with auth enabled it is redirected into the OAuth flow at /oauth/authorize (PKCE required, plain PKCE disallowed).
  2. The authorize page asks for the owner secret + a 6-digit TOTP code (Google Authenticator, seeded from {{secret:FERMI_TOTP_SECRET}}).
  3. On success the provider issues tokens via /oauth/token; client registration is at /oauth/register (scope: mcp).
  4. Private apps under /apps/* use the same owner+TOTP login at /apps/_login; the session cookie lasts 24h. /apps/public/* skips auth entirely.

Rollback flag

FERMI_AUTH_ENABLED (worker var). 'true' routes everything through the OAuthProvider; any other value serves the default handler with no auth. If auth breaks (e.g. client Zod validation of redirect_uris), set it to 'false', redeploy, and debug offline.

Gotchas

  • TOTP codes are all-numeric — a historical regex bug rejected valid codes (fixed in #9); validate with a numeric-aware pattern.
  • The owner secret and TOTP seed live in the secrets store; never hardcode them.
  • Token lifetimes follow the provider defaults; the apps session cookie (24h) is independent of MCP tokens.
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. 1mo ago First seen · 35 lines · 38 tokens per session scan A 81daccd09f1b

Subscribe to this mod's changes

totp-oauth is a skill published in the GitHub repository abel30567/fermi-mcp (1 stars, last pushed 4d ago), licensed MIT. It adds 38 tokens to every session and 468 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

starchild-auth

Starchild Auth SDK: add OAuth login to any web app with one SDK. Use when integrating Starchild login into a project (e.g. add Starchild sign-in to my React app, set up OAuth with iamstarchild.com, implement login/logout with Starchild Auth SDK). Also use for local OAuth/CORS testing guidance (localhost:6066 web…

Starchild-ai-agent/official-skills · 92 tokens

frontmcp-auth-ui

Use when customizing, branding, or replacing the built-in FrontMCP OAuth pages (the login, consent, federated-select, incremental-authorization, and error pages) with your own React components. Covers the auth.ui slot-to-file map and auth.extras name-to-handler map on the auth config (no decorator, no class); the…

agentfront/frontmcp · 184 tokens

google-cloud-auth

Skill "google-cloud-auth" from VKirill/claude-lane-stack, covering 🎯 version requirements (june 2026), usage, use this skill when, do not use this skill when and purpose.

VKirill/claude-lane-stack · 104 tokens

api-connector-builder

Use when writing a client for someone else's REST or GraphQL API: auth flow choice and token refresh, pagination to exhaustion, retry-with-jitter on transient failures only, rate-limit-aware throttling. NOT inbound callbacks (that is webhooks), NOT chaining services (that is automation-flows), NOT designing your own…

ericrisco/rsc-harness · 80 tokens

firebase

Use when building on Firebase — Firestore data modeling, Security Rules, Auth and custom claims, Cloud Functions, Storage, modular Web/Admin SDK imports — including symptoms like a database open to the internet, a query rejected by rules, or a doc stuck at 1 write/sec. NOT managed-Postgres BaaS with SQL and RLS (that…

ericrisco/rsc-harness · 77 tokens

linkedin-api

Use when wiring an app to LinkedIn's organic Posts / Community Management API — 3-legged OAuth, publishing text, article or document posts to a member profile or company page, and pulling impressions, engagement and follower stats into a durable feedback record. NOT writing the post copy (that is linkedin-content)…

ericrisco/rsc-harness · 89 tokens