Authn8

官方

从AI代理访问您团队的2FA代码,无需共享机密。列出账户、生成TOTP代码,并维护完整的审计追踪。

文档

@authn8/mcp-server

MCP 服务器,通过 PAT 认证为 AI 代理提供 Authn8 双重验证码访问。

前提条件

  • 一个 Authn8 账户
  • 在 Authn8 仪表板中创建的个人访问令牌 (PAT)

快速开始

npx @authn8/mcp-server

AUTHN8_API_KEY 环境变量设置为您的 PAT 令牌。

Docker

docker run -e AUTHN8_API_KEY=pat_xxx ghcr.io/authn8/mcp-server

配置

Claude Desktop

添加到您的 Claude Desktop 配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "authn8": {
      "command": "npx",
      "args": ["-y", "@authn8/mcp-server"],
      "env": {
        "AUTHN8_API_KEY": "pat_your_token_here"
      }
    }
  }
}

Claude Code (CLI)

添加到您的 Claude Code 配置文件中:

macOS: ~/.claude.json Windows: %USERPROFILE%\.claude.json

{
  "mcpServers": {
    "authn8": {
      "command": "npx",
      "args": ["-y", "@authn8/mcp-server"],
      "env": {
        "AUTHN8_API_KEY": "pat_your_token_here"
      }
    }
  }
}

Cursor

添加到您的 Cursor MCP 设置中:

{
  "mcpServers": {
    "authn8": {
      "command": "npx",
      "args": ["-y", "@authn8/mcp-server"],
      "env": {
        "AUTHN8_API_KEY": "pat_your_token_here"
      }
    }
  }
}

环境变量

变量必需默认值描述
AUTHN8_API_KEY-来自 Authn8 的 PAT 令牌
AUTHN8_API_URLhttps://api.authn8.comAPI 端点 URL

可用工具

list_accounts

返回此令牌可访问的所有双重验证账户。

示例响应:

[
  {
    "id": "924c52a6-4457-4970-a39f-4dc620217683",
    "name": "AWS Production",
    "issuer": "amazon.com"
  }
]

get_otp

为特定账户生成 TOTP 验证码。

参数:

  • account_id(字符串,可选)- 账户的 UUID
  • account_name(字符串,可选)- 要搜索的名称(部分匹配)

提供 account_idaccount_name 之一。如果多个账户匹配该名称,工具将返回匹配项列表。

示例响应:

{
  "account": "AWS Production",
  "code": "483920"
}

whoami

返回当前令牌的信息。

示例响应:

{
  "business": "Bytecode Solutions",
  "token_name": "MCP Server 2",
  "scoped_groups": ["HR"],
  "account_count": 1,
  "expires_at": "2025-12-25T23:59:59Z"
}

链接