Allows AI agents to fetch TOTP codes for shared 2FA accounts to complete sign-in processes automatically.
Also known as authn8/mcp-server, mcp-server, @authn8/mcp-server
- Stars
- 0
- Tools
- 2
- Downloads, 30 days
- 711
- Latest version
- 1.1.3
- Last commit
- Nov 5, 2026
- License
- MIT
What is Authn8 MCP?
Authn8 allows AI agents to fetch TOTP codes for shared 2FA accounts to complete sign-in processes automatically. It exposes 2 tools, such as account_id, account_name.
Summary generated from the project's README
About Authn8 MCP server
Authn8 provides a way for AI agents to access shared two-factor authentication codes for team accounts. This allows an agent to complete sign-in processes automatically without requiring a human to read a code from a mobile device. The server includes tools to list accessible accounts, generate specific TOTP codes, and identify the current token status. Every code request is logged in the Authn8 access log with the name of the requesting token for security auditing.
Developers can connect via a hosted endpoint using streamable HTTP or run the server locally using the npm package via stdio. Using the hosted version requires an Authorization header with a bearer token, while the local version uses the AUTHENT8_API_KEY environment variable. Access requires an Authn8 business account on a paid plan and a specific MCP token starting with the prefix pat_. The server is compatible with clients like Claude Code, Claude Desktop, and Cursor.
What you can do with it
- 1Automate team sign-insAn AI agent can retrieve a TOTP code to finish a login process for a shared account.
- 2Identify available 2FA accountsA developer can ask an agent to find which shared authentication accounts are accessible via the current token.
- 3Retrieve specific security codesAn agent can generate a six-digit code for a specific service like AWS using a name or ID.
- 4Verify token permissionsAn agent can check the expiration date and business name associated with the active MCP token.
Written from the project's README. Every use case is checked against a quote from it.
How to install Authn8 MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Authn8 MCP in Claude Code
$ claude mcp add --env 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' mcp-server -- npx -y @authn8/mcp-serverInstall Authn8 MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@authn8/mcp-server"
],
"env": {
"AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
}
}
}
}Install Authn8 MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@authn8/mcp-server"
],
"env": {
"AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
}
}
}
}Install Authn8 MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp-server","type":"stdio","command":"npx","args":["-y","@authn8/mcp-server"],"env":{"AUTHN8_API_KEY":"<YOUR_AUTHN8_API_KEY>"}}'Install Authn8 MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@authn8/mcp-server"
],
"env": {
"AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
}
}
}
}Install Authn8 MCP in Codex
$ codex mcp add mcp-server --env 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' -- npx -y @authn8/mcp-serverInstall Authn8 MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp-server] command = "npx" args = ["-y", "@authn8/mcp-server"] [mcp_servers.mcp-server.env] AUTHN8_API_KEY = "<YOUR_AUTHN8_API_KEY>"
Install Authn8 MCP in Gemini CLI
$ gemini mcp add -s user -e 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' mcp-server npx -- -y @authn8/mcp-serverInstall Authn8 MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@authn8/mcp-server"
],
"env": {
"AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
}
}
}
}Needs a key before it starts
Started on 16 Nov 2026 with no keys, it stopped and asked for one, so a client sees no tools until you set the variables above.
Authn8 MCP tools 2
Detected from the READMEaccount_idaccount_name
| account_id | — | |
| account_name | — |
Configuration
AUTHN8_API_KEYRequiredSecretAn Authn8 MCP token (pat_...), created on the MCP Tokens page in Authn8
| Name | Description | |
|---|---|---|
| AUTHN8_API_KEY | An Authn8 MCP token (pat_...), created on the MCP Tokens page in Authn8 | RequiredSecret |
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSPass
- Destructive tools are labelledPass
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub@authn8/mcp-server
MCP server for Authn8, shared 2FA for teams. It lets AI agents fetch TOTP codes for the 2FA accounts your team shares in Authn8, so an agent can finish a sign-in without anyone reading a code out of a phone. Every code it fetches is recorded in Authn8's access log with the name of the token that asked for it.
Listed in the MCP Registry as
io.github.authn8/mcp-server.
Requirements
- An Authn8 business on a paid plan. MCP tokens are not available on the Free plan, and a business's tokens stop working if its subscription ends.
- An MCP token. Create one in Authn8 under Settings → MCP Tokens
(how to create an MCP token).
Tokens start with
pat_. A token only reaches the 2FA accounts its creator can already access, and you can narrow it further to chosen groups and give it an expiry date. - Node.js 18 or later, if you run the npm package. The hosted endpoint needs nothing installed.
Two ways to connect
| Hosted endpoint | npm package | |
|---|---|---|
| Install | None | npx runs it locally |
| Transport | Streamable HTTP | stdio |
| Address | https://api.authn8.com/mcp |
npx -y @authn8/mcp-server |
| Token | Authorization: Bearer pat_... header |
AUTHN8_API_KEY environment variable |
Both offer the same three tools: list_accounts, get_otp and whoami.
Hosted endpoint
Point any MCP client that supports streamable HTTP at https://api.authn8.com/mcp
and send your token in the Authorization header as Bearer pat_your_token_here.
Claude Code
claude mcp add --transport http --scope user authn8 https://api.authn8.com/mcp \
--header "Authorization: Bearer pat_your_token_here"
npm package
Claude Code
claude mcp add --env AUTHN8_API_KEY=pat_your_token_here --transport stdio --scope user authn8 \
-- npx -y @authn8/mcp-server
--scope user makes the server available in all your projects. Leave it out to add
it to the current project only.
Claude Desktop
Open Settings → Developer → Edit Config, or edit the file directly:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"authn8": {
"command": "npx",
"args": ["-y", "@authn8/mcp-server"],
"env": {
"AUTHN8_API_KEY": "pat_your_token_here"
}
}
}
}
Quit and restart Claude Desktop after saving.
Cursor
Add this to ~/.cursor/mcp.json for all projects, or to .cursor/mcp.json in a
project:
{
"mcpServers": {
"authn8": {
"command": "npx",
"args": ["-y", "@authn8/mcp-server"],
"env": {
"AUTHN8_API_KEY": "pat_your_token_here"
}
}
}
}
Other clients
Run npx -y @authn8/mcp-server as a stdio server with AUTHN8_API_KEY set.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
AUTHN8_API_KEY |
Yes | - | Your MCP token (pat_...) |
AUTHN8_API_URL |
No | https://api.authn8.com |
API base URL |
On startup the server checks the token and prints the business name, token name, account count and expiry date to stderr. It exits if the token is missing or rejected.
Tools
All tools declare an output schema and return structuredContent alongside the
text block, so clients get typed results without re-parsing JSON out of text.
list_accounts
Returns all 2FA accounts accessible to this token.
Example response:
{
"accounts": [
{
"id": "924c52a6-4457-4970-a39f-4dc620217683",
"name": "AWS Production",
"issuerDomain": "amazon.com"
}
]
}
get_otp
Generates a TOTP code for a specific account.
Parameters:
account_id(string, optional): UUID of the accountaccount_name(string, optional): name or issuer domain to search for (case-insensitive partial match)
Provide either account_id or account_name. If more than one account matches
the name, the tool returns them in multipleMatches so you can retry with an
account_id.
Example response:
{
"name": "AWS Production",
"code": "483920",
"length": 6
}
Ambiguous match:
{
"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
Returns information about the current token.
Example response:
{
"tokenName": "Claude Code",
"businessName": "Acme Ltd",
"scopedGroups": [
{ "id": "cfeba14a-e990-49e8-b6e5-61d63f7d68c8", "name": "Engineering" }
],
"expiresAt": "2027-06-30T23:59:59Z",
"accountCount": 12
}
Links
- Authn8: shared 2FA for teams
- How to create an MCP token
- GitHub repository
- MCP Registry entry
Authn8 MCP questions
How do I add Authn8 MCP to Claude Code?
Run claude mcp add --env 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' mcp-server -- npx -y @authn8/mcp-server in your terminal. Add --scope user to make it available in every project.
How do I add Authn8 MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Authn8 MCP provide?
It exposes 2 tools, including account_id, account_name.
What are the requirements to use the Authn8 MCP server?
You need an Authn8 business account on a paid plan and an MCP token starting with 'pat_'.
Is my activity tracked when an agent fetches a code?
Yes, every code fetched is recorded in the Authn8 access log along with the name of the token used.