# Authn8 MCP server

> Allows AI agents to fetch TOTP codes for shared 2FA accounts to complete sign-in processes automatically.

- Repository: https://github.com/authn8/mcp-server
- Page: https://hostedmcp.org/servers/authn8/mcp-server
- Transport: stdio, remote
- Stars: 0
- License: MIT
- Latest version: 1.1.3

## Install

### Claude Code

```sh
claude mcp add --env 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' mcp-server -- npx -y @authn8/mcp-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@authn8/mcp-server"
      ],
      "env": {
        "AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@authn8/mcp-server"
      ],
      "env": {
        "AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp-server","type":"stdio","command":"npx","args":["-y","@authn8/mcp-server"],"env":{"AUTHN8_API_KEY":"<YOUR_AUTHN8_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@authn8/mcp-server"
      ],
      "env": {
        "AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp-server --env 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' -- npx -y @authn8/mcp-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp-server]
command = "npx"
args = ["-y", "@authn8/mcp-server"]

[mcp_servers.mcp-server.env]
AUTHN8_API_KEY = "<YOUR_AUTHN8_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'AUTHN8_API_KEY=<YOUR_AUTHN8_API_KEY>' mcp-server npx -- -y @authn8/mcp-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@authn8/mcp-server"
      ],
      "env": {
        "AUTHN8_API_KEY": "<YOUR_AUTHN8_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AUTHN8_API_KEY` | yes | yes | An Authn8 MCP token (pat_...), created on the MCP Tokens page in Authn8 |

## Tools (2)

- `account_id`
- `account_name`

## FAQ

### 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.
