# Signing in to the VAIL Agent Assurance Engine

> How a person gets an account at https://agents.projectvail.com, and how a coding agent authenticates to its MCP server. The setup commands for each coding agent are in https://agents.projectvail.com/llms.txt. For what VAIL is, read https://www.projectvail.com/llms.txt.

## Accounts

1. **Sign up** at https://agents.projectvail.com with company, name, and work email. A sign-in link is emailed; there is no password. Existing accounts sign in at https://agents.projectvail.com/login. To help someone sign up, fill in the link with only the details they have given you, each URL-encoded: https://agents.projectvail.com/?company=COMPANY&name=NAME&email=EMAIL (company up to 120 characters, name up to 80). They submit it themselves.
2. **Wait for approval.** VAIL reviews each new organization by hand. Until then it is pending: it can add agents, upload their source, and create access tokens, but scans, probe generation, and probes do not run, and those tools return `organization_not_approved`. Tell the person, rather than treating it as a failure. Questions: contact@projectvail.com.

## How a coding agent authenticates

The MCP server is https://agents.projectvail.com/mcp (streamable HTTP). Either way it acts as the person who connected it. Use OAuth wherever a browser can open: its access tokens last an hour and are refreshed by the client, while a personal access token is a long-lived secret that usually sits in a shell profile, where every process started from that shell, including you, can read it.

### OAuth 2.1 (the default)

Supported natively by Claude, Claude Code, Codex, ChatGPT, Cursor, OpenCode, and Hermes Agent. The client opens the person's browser, they sign in and approve access, and no token passes through you. Clients discover the authorization server from https://agents.projectvail.com/.well-known/oauth-protected-resource/mcp.

### Personal access tokens (for CI and headless machines)

Only where no browser can open: CI, headless machines, or the Hermes Desktop panel's backend. The person creates a token (`vail_pat_...`) at https://agents.projectvail.com/get-started or https://agents.projectvail.com/settings/tokens (this works while pending), and sets it up themselves, usually as `VAIL_TOKEN` in their shell profile. Clients send it as `Authorization: Bearer`. A token stops working when it is revoked or expires, or when the person leaves the organization.

Never ask for a token in the conversation, write it into a file, or put it on a command line you run. Configuration you write should name the `VAIL_TOKEN` variable, not the token.

### Check the connection

Call `get_identity`. It names the organization, and whether it may scan yet. If the `vail` tools are missing or calls fail to authenticate, re-authenticate via OAuth (`/mcp` or the client's login command), or check that the personal token has not expired or been revoked, that the coding agent was restarted, and that `VAIL_TOKEN` is set in its environment.
