# Audn Login

> Authenticate with Audn.ai for red-team security testing. Sets up OAuth login or API token. Run this before using any other audn skill. Use when the user needs to log in, authenticate, connect to Audn, or set up their API credentials.

- Skill: `audn-ai/audn-login` (Agent Skill)
- Install (CLI): `npx skillmds@latest add audn-ai/audn-login`
- Raw SKILL.md: https://api.skillmd.com/api/skills/audn-ai/audn-login/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: audn-ai (https://skillmd.com/u/audn-ai)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/audn-ai/audn-login

---


# Audn.ai Authentication Setup

Set up authentication to the Audn.ai API. This must be done before using any other audn skill.

## Step 1 — Check if MCP server is already configured

Run this command to check:

```bash
claude mcp get audn-redteam 2>/dev/null && echo "EXISTS" || echo "NOT_FOUND"
```

## Step 2 — Register the MCP server (if NOT_FOUND)

If the MCP server is not configured, register it now. Run this exact command:

```bash
claude mcp add --transport http audn-redteam https://mcp.audn.ai/mcp/audn-rn8sx
```

This adds the Audn.ai MCP server with OAuth 2.1 support. Claude Code will auto-discover the OAuth endpoints at `https://mcp.audn.ai/.well-known/oauth-authorization-server/mcp/audn-rn8sx` and handle Dynamic Client Registration automatically.

## Step 3 — IMPORTANT: Restart Claude Code

After adding the MCP server, the user **MUST restart Claude Code** for it to pick up the new server. MCP servers are only loaded at startup — they cannot be hot-reloaded mid-session.

Tell the user exactly this:

> **The MCP server has been registered. You need to restart Claude Code to activate it.**
>
> 1. Exit this session — type `/exit` or press `Ctrl+C`
> 2. Start Claude Code again: `claude`
> 3. Run `/audn-login` again to continue authentication

**STOP HERE.** Do not proceed to Step 4 until the user has restarted and re-invoked this skill.

## Step 4 — Authenticate via OAuth

After restarting, the MCP server should now appear in the server list. Tell the user:

> **Run `/mcp` now, select `audn-redteam`, and click "Authenticate".**
> A browser window will open — log in at auth.audn.ai (or sign up at https://audn.ai if you don't have an account).
> After approving, your tokens are stored securely in the system keychain and refresh automatically.

Wait for the user to complete authentication.

## Step 5 — Verify

After the user authenticates, check the MCP server status:

```bash
claude mcp get audn-redteam
```

If it shows `connected`, authentication is complete. All 34 Audn API tools are now available as MCP tools.

If the user has trouble with OAuth, fall back to API token method (see below).

## Fallback — API Token Method

If OAuth doesn't work (firewall, SSH, container), use an API token instead:

1. Tell the user to generate a token at: https://audn.ai/dashboard/settings (API Keys section)
2. Then run in this session:

```bash
export AUDN_API_TOKEN="<their-token>"
```

3. For persistence, add to shell profile:

```bash
echo 'export AUDN_API_TOKEN="<token>"' >> ~/.zshrc
```

4. Verify it works:

```bash
curl -s -H "Authorization: Bearer $AUDN_API_TOKEN" https://audn.ai/api/user/profile
```

Should return user profile with `success: true`.

## Output

After successful authentication (either method), report:

```
## Authenticated with Audn.ai

**Method**: MCP OAuth / API Token
**Status**: Connected

Ready to use audn skills:
- /audn-red <api-url> — Full red-team audit
- /audn-quick-scan <api-url> — Quick vulnerability scan
- /audn-agent-setup — Register an agent
- /audn-vuln-monitor — Check vulnerabilities
```

$ARGUMENTS

