Skip to content

Authentication

Providers authenticate with a provider ID and API key. This is used on Claude Code, Codex, and Generic MCP.

Terminal window
npx @famasi/agents@latest link provider --provider-id YOUR_PROVIDER_ID

This 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):

Terminal window
export FAMASI_PROVIDER_API_KEY=pk_live_...

Or persist it in .mcp.json during install:

Terminal window
npx @famasi/agents@latest install claude-code --provider-api-key pk_live_... --persist-secrets

Note: Without --persist-secrets, the API key is not written to .mcp.json (secure default). Use the environment variable instead.

Getting an API key

  1. Log in to your Famasi provider dashboard
  2. Go to Settings → API Keys
  3. Generate a new key
  4. Copy and use with the CLI

Session details

Tools available26 provider tools + 2 documentation tools
Auth methodAPI key (x-api-key header) or browser-link
DurationKey-based — persistent, no expiry
Credential storage.mcp.json and .famasi/provider-link.json

Security

  • API keys are stored locally in .mcp.json and .famasi/
  • Never commit API keys to version control
  • Use the FAMASI_PROVIDER_API_KEY environment 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.