Authn8

官方

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

你可以用 Authn8 MCP 做什麼?

  • 列出 2FA 帳戶 — 請您的助理呼叫 list_accounts 以查看令牌可存取的所有 2FA 帳戶。
  • 產生 TOTP 驗證碼 — 使用 get_otp 搭配帳戶名稱或 ID 取得目前的一次性驗證碼。
  • 解決模糊比對 — 當 get_otp 回傳多個結果時,請使用帳戶 ID 重試。
  • 檢查令牌詳細資料 — 呼叫 whoami 以查看令牌名稱、企業、限定群組、到期日,以及帳戶數量。

文件

@authn8/mcp-server

提供 AI 代理程式透過 PAT 驗證存取 Authn8 2FA 驗證碼的 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

可用工具

所有工具都會宣告輸出結構描述,並在文字區塊旁傳回 structuredContent,讓用戶端無需重新解析文字中的 JSON 即可取得型別化結果。

list_accounts

傳回此權杖可存取的所有 2FA 帳戶。

範例回應:

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

get_otp

為特定帳戶產生 TOTP 驗證碼。

參數:

  • account_id(字串,選用)- 帳戶的 UUID
  • account_name(字串,選用)- 要搜尋的名稱或發行者網域(不區分大小寫的部分比對)

請提供 account_idaccount_name。如果多個帳戶符合該名稱,工具會在 multipleMatches 中傳回這些帳戶,以便您使用 account_id 重試。

範例回應:

{
  "name": "AWS Production",
  "code": "483920",
  "length": 6
}

模糊比對:

{
  "error": "Multiple accounts match 'aws'. Please be more specific or use account_id.",
  "length": 0,
  "multipleMatches": [
    {
      "id": "924c52a6-4457-4970-a39f-4dc620217683",
      "name": "AWS Production",
      "issuerDomain": "amazon.com"
    }
  ]
}

whoami

傳回目前權杖的相關資訊。

範例回應:

{
  "tokenName": "MCP Server 2",
  "businessName": "Bytecode Solutions",
  "scopedGroups": [
    { "id": "cfeba14a-e990-49e8-b6e5-61d63f7d68c8", "name": "HR" }
  ],
  "expiresAt": "2025-12-25T23:59:59Z",
  "accountCount": 1
}

連結