Obtaining Your API Key
- Log in to your Affinity account
- Navigate to Settings → Manage Apps
- Click New App and enter a name (e.g. John’s MCP) and a description (e.g. API key for my MCP server connected to Claude). API version and IP Allowlist can be left blank.
- Copy the generated API key

Troubleshooting Auth Errors
”Authentication failed” or 401 errors
- Cause: The
AFFINITY_API_KEYis missing, invalid, or has extra spaces/quotes. - Fix: Double-check the environment variable value in your client config. The key should be a plain string with no surrounding quotes or whitespace.