Authn8

官方

從AI代理存取團隊的雙重驗證碼,無需共享機密。列出帳戶、生成TOTP碼,並保留完整稽核軌跡。

文件

@authn8/mcp-server

提供 AI 代理透過 PAT 驗證存取 Authn8 雙因素驗證碼的 MCP 伺服器。

先決條件

  • 一個 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"
}

連結