# sign_up, get_api_key (/mcp/sign-up)



`https://api.finic.ai/mcp/keys` is for clients that can't sign in with OAuth, such as headless scripts. The key passes through the agent, so prefer [`/mcp`](/agent-quickstart) whenever the client supports sign-in.

1. The agent calls `sign_up` and shows the user the link (it works for 24 hours).
2. The user creates an account or signs in, and approves an API key: 30 days by default, or 1 hour, 1 day, 7 days, 90 days, 1 year or never.
3. When the user says they're done, the agent calls `get_api_key` and receives the key, once. It stores it securely, such as in `FINIC_API_KEY`, and sends it as the `Authorization` header or the `api_key` argument (the argument wins if both are sent).

The key is listed under [API keys](https://portal.finic.ai/keys) as "Agent: " and the agent's name; revoke it there anytime. Every other tool works on `/mcp/keys` too, with the optional `api_key` argument.

## sign\_up [#sign_up]

| Input                 | Description                                                    |
| --------------------- | -------------------------------------------------------------- |
| `agent_name`          | Optional. Shown to the user on the page, such as "Claude Code" |
| `company`, `use_case` | Optional. The user's company, and what they want Finic for     |

Returns `signup_url` (for the user), `setup_code` (for the agent only; never show it), `expires_at` and `next_steps`.

## get\_api\_key [#get_api_key]

Takes `setup_code`. Call it after the user says they've approved, not repeatedly: repeated calls are slowed down.

| `status`        | Meaning                                                                                               |
| --------------- | ----------------------------------------------------------------------------------------------------- |
| `pending`       | Not approved yet                                                                                      |
| `ready`         | With `api_key` (returned only this once), `key_expires_at`, `organization` and `credit_usd`           |
| `already_taken` | The key was already returned. If it's lost, create one in the Finic Portal                            |
| `declined`      | The user declined                                                                                     |
| `expired`       | The link is over 24 hours old, or the approved key wasn't taken within 24 hours. Call `sign_up` again |
| `invalid`       | Not a setup code from `sign_up`                                                                       |
