Catalog npm
PACKAGE EXPLORERView in registry

2faa-mcp

npm

MCP server for generating and verifying TOTP 2FA codes. Use with Claude Code, Claude Desktop, or any MCP client.

2faai-agentauthenticatorclaudemcpmcp-servermodel-context-protocolotptotptwo-factor-authentication
Versions collected1
Direct dependencies5From release 1.0.0
Last observed20 Oct, 19:13 UTC

README

Current package documentation

@2faa/mcp-server

MCP (Model Context Protocol) server for generating and verifying TOTP 2FA codes. Allows AI agents to handle two-factor authentication programmatically.

Tools

generate_totp

Generate a TOTP code from a secret key.

Parameters:

  • secret (required) — Base32 encoded secret key or otpauth:// URI
  • digits — Number of digits (default: 6)
  • period — Time period in seconds (default: 30)
  • algorithm — SHA1 | SHA256 | SHA512 (default: SHA1)

Returns: Current code, next code, seconds remaining, and configuration details.

verify_totp

Verify if a TOTP code is valid for a given secret.

Parameters:

  • secret (required) — Base32 encoded secret key or otpauth:// URI
  • code (required) — The TOTP code to verify
  • window — Number of time windows to check before/after current (default: 1)

Returns: Whether the code is valid and the time delta.

Setup

Build

cd mcp
npm install
npm run build

Claude Code

Add to your Claude Code MCP settings (~/.claude/settings.json or project .mcp.json):

{
  "mcpServers": {
    "2faa": {
      "command": "node",
      "args": ["/absolute/path/to/2faa/mcp/dist/index.js"]
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "2faa": {
      "command": "node",
      "args": ["/absolute/path/to/2faa/mcp/dist/index.js"]
    }
  }
}

npx (after publishing)

{
  "mcpServers": {
    "2faa": {
      "command": "npx",
      "args": ["-y", "@2faa/mcp-server"]
    }
  }
}

Example Usage

Once configured, ask your AI agent:

  • "Generate a TOTP code for secret JBSWY3DPEHPK3PXP"
  • "Verify code 123456 against secret JBSWY3DPEHPK3PXP"
  • "Generate a 2FA code from this otpauth URI: otpauth://totp/GitHub:user?secret=ABCDEF..."

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.0Registry latest25 Mar 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
skysilence/2faa

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:fd9d7815842a4f067bf108d53116f9d302d46d3d5c725f45921dd214cc4f7d36