The “unsafe_url” error happens when the OAuth redirect URI doesn’t exactly match what’s registered in your OpenAI app or fails security checks (e.g., non-HTTPS, localhost without a tunnel, or mismatched domain/port/path). To fix it, ensure the redirect URL is identical to the registered one, use HTTPS (ngrok for local testing), and make sure your MCP server doesn’t modify the URL in transit. This alignment should resolve the error and allow the OAuth flow to complete.