Catalog npm
Back to packageRELEASE DETAILS

1.0.0

npm

2faa-mcp

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
Published25 Mar 2026
Direct dependencies5
Transitive dependenciesNot calculated

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.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@modelcontextprotocol/sdk
Environment
{
  "local_name": "@modelcontextprotocol/sdk",
  "alias": false,
  "peer_metadata": null
}
^1.27.1runtime
otpauth
Environment
{
  "local_name": "otpauth",
  "alias": false,
  "peer_metadata": null
}
^9.5.0runtime
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^25.5.0development
tsx
Environment
{
  "local_name": "tsx",
  "alias": false,
  "peer_metadata": null
}
^4.21.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^6.0.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-rufpsl7RdYAXvQK2nE2N0dB53SHzFOrLkkKkqhCkjY0nwXweicvaMMZcFvaiRE0SsO/zImDFouAeNnYHcCtkrw==",
  "shasum": "9c9f2c76f13f2b93351bc5e9bb5b1c44014b3b9c",
  "tarball": "https://registry.npmjs.org/2faa-mcp/-/2faa-mcp-1.0.0.tgz",
  "fileCount": 4,
  "unpackedSize": 8938,
  "signatures": [
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEYCIQCNrsbFs1SfZc5rhP38zXs21ouMmnHGpY7N6KJZ+kEP2AIhAKq/CsZQKatV7SCEOT+fUvH8KslcrFfq0F0G6vV0uSeT"
    }
  ]
}

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_version:fe2232602769abe154e293741ca41daf65b1d0ffb835adfe3ddabb40e9cfc8fa

Other collected versions

View all collected versions →