{"_id":"2faa-mcp","name":"2faa-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"2faa-mcp","version":"1.0.0","description":"MCP server for generating and verifying TOTP 2FA codes. Use with Claude Code, Claude Desktop, or any MCP client.","type":"module","bin":{"2faa-mcp":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsx src/index.ts"},"keywords":["mcp","mcp-server","model-context-protocol","2fa","totp","otp","authenticator","two-factor-authentication","claude","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/skysilence/2faa.git","directory":"mcp"},"homepage":"https://2faa.app","license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.27.1","otpauth":"^9.5.0"},"devDependencies":{"@types/node":"^25.5.0","tsx":"^4.21.0","typescript":"^6.0.2"},"_id":"2faa-mcp@1.0.0","gitHead":"39c05449aae98dcecc865f8a26e51cf5251728c3","bugs":{"url":"https://github.com/skysilence/2faa/issues"},"_nodeVersion":"20.18.2","_npmVersion":"11.3.0","dist":{"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"}]},"_npmUser":{"name":"skysilence","email":"136153278@qq.com"},"directories":{},"maintainers":[{"name":"skysilence","email":"136153278@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/2faa-mcp_1.0.0_1774424201153_0.7379902379992835"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-25T07:36:41.069Z","1.0.0":"2026-03-25T07:36:41.298Z","modified":"2026-03-25T07:36:41.550Z"},"maintainers":[{"name":"skysilence","email":"136153278@qq.com"}],"description":"MCP server for generating and verifying TOTP 2FA codes. Use with Claude Code, Claude Desktop, or any MCP client.","homepage":"https://2faa.app","keywords":["mcp","mcp-server","model-context-protocol","2fa","totp","otp","authenticator","two-factor-authentication","claude","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/skysilence/2faa.git","directory":"mcp"},"bugs":{"url":"https://github.com/skysilence/2faa/issues"},"license":"MIT","readme":"# @2faa/mcp-server\n\nMCP (Model Context Protocol) server for generating and verifying TOTP 2FA codes. Allows AI agents to handle two-factor authentication programmatically.\n\n## Tools\n\n### `generate_totp`\n\nGenerate a TOTP code from a secret key.\n\n**Parameters:**\n- `secret` (required) — Base32 encoded secret key or `otpauth://` URI\n- `digits` — Number of digits (default: 6)\n- `period` — Time period in seconds (default: 30)\n- `algorithm` — `SHA1` | `SHA256` | `SHA512` (default: SHA1)\n\n**Returns:** Current code, next code, seconds remaining, and configuration details.\n\n### `verify_totp`\n\nVerify if a TOTP code is valid for a given secret.\n\n**Parameters:**\n- `secret` (required) — Base32 encoded secret key or `otpauth://` URI\n- `code` (required) — The TOTP code to verify\n- `window` — Number of time windows to check before/after current (default: 1)\n\n**Returns:** Whether the code is valid and the time delta.\n\n## Setup\n\n### Build\n\n```bash\ncd mcp\nnpm install\nnpm run build\n```\n\n### Claude Code\n\nAdd to your Claude Code MCP settings (`~/.claude/settings.json` or project `.mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"2faa\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/2faa/mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"2faa\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/2faa/mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n### npx (after publishing)\n\n```json\n{\n  \"mcpServers\": {\n    \"2faa\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@2faa/mcp-server\"]\n    }\n  }\n}\n```\n\n## Example Usage\n\nOnce configured, ask your AI agent:\n\n- \"Generate a TOTP code for secret JBSWY3DPEHPK3PXP\"\n- \"Verify code 123456 against secret JBSWY3DPEHPK3PXP\"\n- \"Generate a 2FA code from this otpauth URI: otpauth://totp/GitHub:user?secret=ABCDEF...\"\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-45edfe733abdd0acc90c9ed7f6d8adcd"}