What OS, NodeJS and OpenSSL version are you running?
It works fine for me on
Linux
Node 24.5
OpenSSL 3.6.0
◄ 0s ◎ npx @discourse/mcp@latest generate-user-api-key \
--site https://meta.discourse.org \
--save-to profile.json
🔑 Discourse User API Key Generator
Site: https://meta.discourse.org
Scopes: read,write
Generating RSA key pair...
✓ Key pair generated
Please visit this URL to authorize the application:
https://meta.discourse.org/user-api-key/new?application_name=Discourse+MCP&client_id=discourse-mcp&scopes=read%2Cwrite&public_key=-----BEGIN+PUBLIC+KEY-----blablabla----END+PUBLIC+KEY-----%0A&nonce=1764619683010
After authorizing, you will be redirected to a URL like:
discourse://auth_redirect?payload=<encrypted_payload>
Or you may see the encrypted payload displayed on the page.
Paste the encrypted payload here: longkey
Decrypting payload...
✓ User API Key retrieved successfully
✓ Saved to profile: profile.json
{
"success": true,
"profile": "profile.json"
}
◄ 16s ◎ node --version
v24.5.0
◄ 0s ◎ openssl --version
OpenSSL 3.6.0 1 Oct 2025 (Library: OpenSSL 3.6.0 1 Oct 2025)