Set up with an AI agent
Give your coding agent a short-lived token and it can set up Credflare for you: create a profile, a Sandbox API key and a test verification, then wire the integration into your app.
What the agent can do
The token works in one workspace, in Sandbox only. It can read profile templates, create profiles, create Sandbox API keys, open and read verification cases, run document checks and face matches, and register webhooks.
It cannot use Live, billing, members, roles, account settings or other agent tokens. It expires after the days you choose (seven by default, thirty at most), and you can revoke it at any time. Open Activity on the token in the dashboard to see its 100 most recent changes. Reading a case is not recorded.
1. Create a token
In the dashboard, open Developers → AI agents, name the agent and create the token. You need to be a workspace owner or admin. The token is shown once. Copy it, run this, then paste the token and press Enter. It is read without being shown, so it stays out of your shell history:
read -rs CREDFLARE_AGENT_TOKEN && export CREDFLARE_AGENT_TOKEN 2. Connect your agent
The MCP server is at https://api.credflare.net/mcp and takes the token as a bearer header.
Claude Code
claude mcp add --transport http credflare https://api.credflare.net/mcp \
--header "Authorization: Bearer $CREDFLARE_AGENT_TOKEN" Codex
In ~/.codex/config.toml:
[mcp_servers.credflare]
url = "https://api.credflare.net/mcp"
bearer_token_env_var = "CREDFLARE_AGENT_TOKEN" Cursor
In .cursor/mcp.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"credflare": {
"url": "https://api.credflare.net/mcp",
"headers": {
"Authorization": "Bearer ${env:CREDFLARE_AGENT_TOKEN}"
}
}
}
} Other agents: use their remote MCP server setting with the same URL and an Authorization: Bearer header.
3. Ask it to set things up
Set up Credflare identity verification in this app.
Use the credflare MCP server: check whoami, pick a profile template that fits what we need to verify,
create the profile, create a Sandbox API key and put its id and secret in .env (never in code),
then open a test verification and give me its link. Finish by wiring the server-side call
from integration_guide for this app's stack, and a case.outcome webhook handler following
https://developers.credflare.net/result-webhooks. Keep Activity open on the token in the dashboard to watch each profile, key and case appear as the agent creates it.
Tools
| Tool | Does |
|---|---|
whoami | The workspace, Sandbox, and when the token expires. |
list_profile_templates, create_profile, list_profiles | Pick a template and create a Sandbox profile from it. |
create_sandbox_api_key | A Sandbox key for your server. The secret is returned once. |
create_test_verification, get_case, list_cases | Open a test verification, get its link and read the result. |
create_webhook | Register a Sandbox webhook. |
integration_guide | How to wire the API or an SDK into your stack. |
Keep the setup in your repo
Add this to AGENTS.md or CLAUDE.md so later sessions follow the same rules:
## Credflare
- Identity verification runs through Credflare. Docs: https://developers.credflare.net
- Keys live in .env as CREDFLARE_CLIENT_ID and CREDFLARE_CLIENT_SECRET. Never commit them or send them to a browser or mobile app.
- Work in Sandbox. Live keys are created by a person in the dashboard. Going live
When the Sandbox flow works, create a profile, an API key and a webhook in Live yourself, and configure production with the Live profile ID, key and webhook secret. Revoke the agent token once setup is done.
A token that expired or was revoked gets HTTP 401. Create a new one and update CREDFLARE_AGENT_TOKEN. Claude Code stores the header value when you add the server, so run claude mcp remove credflare and add it again.