Viewing server logs
If the server isn’t working as expected, check the logs first.- Claude Code (macOS/Linux)
- Claude Code (Windows)
- Claude Desktop (macOS)
- Claude Desktop (Windows)
Logs are written per session to
~/.claude/debug/. The latest symlink always points to the most recent session:Common issues
”Authentication failed” or 401 errors
Cause: TheAFFINITY_API_KEY is missing, invalid, or has extra spaces or quotes around it.
Fix: Double-check the environment variable value in your client config. The key should be a plain string with no surrounding quotes or whitespace.
”Connection refused” or timeout errors
Cause: The server cannot reachapi.affinity.co.
Fix:
- Check your internet connection
- If you’re on a corporate VPN, ensure it allows traffic to Affinity’s API