Skip to main content
Both the CLI and MCP server use OAuth 2.0 to authenticate with your PickFu account. The CLI also supports API key authentication for non-interactive environments.

How it works

When you use the CLI or MCP server for the first time, you’ll be redirected to your PickFu account to authorize the app. Once you approve, the tool handles tokens automatically.

CLI

Run the login command to authenticate:
pickfu auth login
This opens a browser window where you sign in to your PickFu account and authorize the CLI. Once approved, your credentials are stored locally and refreshed automatically. For headless environments (servers, CI), use --headless to print the URL instead of opening a browser:
pickfu auth login --headless

API key

For CI pipelines, scripts, and automation, you can authenticate with an API key instead of OAuth:
# Via environment variable
export PICKFU_API_KEY=your_api_key
pickfu survey list

# Via flag (takes highest precedence)
pickfu survey list --token your_api_key
Token precedence: --token flag > PICKFU_API_KEY environment variable > stored OAuth token.

Check status

pickfu auth status          # Verify authentication against the API
pickfu auth status --local  # Check locally without API call
pickfu auth logout          # Clear stored credentials

MCP server

The MCP server authenticates through your MCP client. When you first connect, your client prompts you to sign in to your PickFu account via OAuth. For example, Cursor prompts for WorkOS login automatically — no manual token setup required. See the MCP server guide for client-specific setup instructions.

Token management

Both tools handle token storage and refresh automatically. You don’t need to manage tokens manually.
  • CLI — Tokens are stored in ~/.config/pickfu/config.json and refreshed when they expire. Run pickfu auth login again if you need to re-authenticate.
  • MCP server — Your MCP client manages the OAuth session. Re-authorize through your client if needed.

Need help?

Having trouble authenticating? Contact support@pickfu.com for assistance.