Authentication
Providers authenticate with a provider ID and API key. This is used on Claude Code, Codex, and Generic MCP.
Link your provider
npx @famasi/agents@latest link provider --provider-id YOUR_PROVIDER_IDThis writes your provider identity to .famasi/provider-link.json so the agent knows which account to use.
Set your API key
Via environment variable (recommended):
export FAMASI_PROVIDER_API_KEY=pk_live_...Or persist it in .mcp.json during install:
npx @famasi/agents@latest install claude-code --provider-api-key pk_live_... --persist-secretsNote: Without
--persist-secrets, the API key is not written to.mcp.json(secure default). Use the environment variable instead.
Getting an API key
- Log in to your Famasi provider dashboard
- Go to Settings → API Keys
- Generate a new key
- Copy and use with the CLI
Session details
| Tools available | 26 provider tools + 2 documentation tools |
| Auth method | API key (x-api-key header) or browser-link |
| Duration | Key-based — persistent, no expiry |
| Credential storage | .mcp.json and .famasi/provider-link.json |
Security
- API keys are stored locally in
.mcp.jsonand.famasi/ - Never commit API keys to version control
- Use the
FAMASI_PROVIDER_API_KEYenvironment variable in CI/CD - You can rotate keys at any time — ask the agent to “rotate my API key” (uses
refreshProviderApiToken)
Warning: Rotating your API key invalidates the current one. You’ll need to update your configuration after rotating.