Skip to main content
Glama
go2fa-mcp

go2fa-mcp

by TASCOHN

go2fa

Local TOTP (2FA) codes: a web page, a CLI and an MCP server. Your secret never leaves your device.

  • Web: https://go2fa.app (English and Vietnamese, works offline, light and dark theme)

  • Core: one file of plain JavaScript on WebCrypto, no runtime dependencies (src/core.js)

  • Same house as Key Atlas (API key recipes and a local leak scanner)

  • License: MIT

For your own accounts only. go2fa does not accept lists of accounts or id|password|2fa lines, does not check whether accounts are alive, and never puts a secret in a URL.

CLI

npx go2fa selftest          # runs the RFC 6238 test vectors, prints "match 18/18"

The secret comes from the GO2FA_SECRET environment variable or from stdin (a hidden prompt in a terminal). It is never accepted as an argument, so it cannot end up in your shell history.

# PowerShell
$env:GO2FA_SECRET = Read-Host -MaskInput 'secret'
npx go2fa code              # current code
npx go2fa code --next       # next code
npx go2fa check 123456      # which 30-second window does this code belong to? (clock drift)
# bash
read -rs GO2FA_SECRET && export GO2FA_SECRET
npx go2fa code

Options: --digits 6|7|8, --period N, --algo SHA1|SHA256|SHA512. An otpauth://totp/... link works instead of a bare Base32 secret and carries its own settings.

Related MCP server: 1Password Agent MCP

MCP server (stdio, local)

An AI assistant can ask for a code by label. The server never returns a secret and never accepts one as a tool argument.

{
  "mcpServers": {
    "go2fa": {
      "command": "npx",
      "args": ["-y", "-p", "go2fa", "go2fa-mcp"],
      "env": { "GO2FA_FILE": "C:\\Users\\you\\go2fa-secrets.json" }
    }
  }
}

Secrets are loaded by you, by label, in one of two ways:

  • environment variable GO2FA_SECRET_<LABEL> (label upper-cased, other characters become _)

  • a JSON file named by GO2FA_FILE: { "github": "JBSWY3DPEHPK3PXP" } (keep it out of version control and protect it with file permissions)

Tools:

Tool

Input

Returns

totp_code

label

the current code and seconds left

totp_check

label, code

which window (+-3) the code belongs to

Verify

npm test      # RFC 6238 vectors, cross-check against otpauth on random inputs, boundaries, CLI and MCP checks

Development

npm run build copies the core into public/ and generates the site pages; npm run dev serves public/ locally.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Access your team's 2FA codes from AI agents without sharing secrets. List accounts, generate TOTP codes, and maintain full audit trails. Built for DevOps, CI/CD pipelines, and automated workflows that need to authenticate to protected services.
      116 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Local MCP server that lets agents save copied secrets into 1Password and use approved fields through encrypted handles without plaintext secret tool arguments or responses. Includes a local permissions dashboard and optional service-account access for unattended work. Requires the 1Password CLI and runs on your computer.
      112 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to list, retrieve, add, and audit credentials from an encrypted vault during an active human-unlocked session, while providing no tool to unlock the vault itself.
      5
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to look up stored logins by URL, name, or alias and use them without seeing the secrets, injecting authentication into HTTP requests, running commands with credentials in the environment and scrubbed output, and fetching 2FA codes, subject to per-credential policies and user approval.
      23
      MIT