Play.fun Authentication Setup
This guide helps users configure Play.fun API credentials for Claude Code integration.
When to Use
Use this skill when:
- •A user wants to register or update a game on Play.fun
- •A user wants to launch a playcoin
- •A user wants to perform any authenticated Play.fun operation
- •The
test_connectionMCP tool fails with authentication errors
Prerequisites
Users need a Play.fun account with creator credentials:
- •Go to https://app.play.fun and sign in
Authentication Methods
Method 1: Web Callback (Recommended)
This method starts a local server that receives credentials via redirect from Play.fun.
Steps:
- •Run the callback server in the background and ensure it is running:
bash
node skills/scripts/playfun-auth.js callback
- •The server will start on
http://localhost:9876 - •Prompt the user to open the browser to:
https://app.play.fun/skills-auth?callback=http://localhost:9876/callback - •The user will be prompted to authenticate with Play.fun if not done already, and then the redirect will occur with the credentials (also displayed in the browser window to be pasted into the terminal if needed)
- •The script automatically saves credentials to
~/.claude.json
Notes:
- •Server auto-shuts down after 5 minutes if no credentials received
- •Server only listens on localhost for security
Method 2: Manual Paste
For users who have their credentials in base64 format.
Steps:
- •User provides base64-encoded credentials (format:
base64(apiKey:secretKey)) - •Run:
bash
node skills/scripts/playfun-auth.js manual <base64-credentials>
- •Credentials are decoded and saved
Example:
node skills/scripts/playfun-auth.js manual YXBpLWtleTpzZWNyZXQta2V5
Interactive Setup
For a guided experience:
node skills/scripts/playfun-auth.js setup
This prompts the user to choose between callback and manual methods.
Verifying Credentials
After setup, verify credentials work using the MCP tool:
Use the test_connection MCP tool to verify the credentials are valid.
Checking Status
To check current authentication status:
node skills/scripts/playfun-auth.js status
This shows:
- •Whether credentials exist
- •Partial API key (for identification)
- •When credentials were created
- •Source method (callback or manual)
- •Claude config status
Clearing Credentials
To remove stored credentials:
node skills/scripts/playfun-auth.js clear
This removes credentials from:
- •
~/.claude.jsonMCP server config
Credential Storage
Locations:
- •Claude config:
~/.claude.json
Config format:
{
"apiKey": "user-uuid",
"secretKey": "secret-key",
"createdAt": "2026-01-26T00:00:00Z",
"source": "callback|manual"
}
Troubleshooting
Port 9876 already in use
Another process is using the callback port. Either:
- •Kill the process using port 9876
- •Use the manual method instead
Invalid credentials
- •Ensure the base64 string is correctly formatted
- •Format must be:
base64(apiKey:secretKey)with a colon separator - •Get fresh credentials from Play.fun dashboard
Claude config not updating
- •Check that
~/.claude.jsonis writable - •Restart Claude Code after credential setup
test_connection fails after setup
- •Credentials may be invalid or expired
- •Run
node skills/scripts/playfun-auth.js clearand set up again with fresh credentials
Workflow for Claude
When performing authenticated Play.fun operations:
- •
Check credentials exist:
bashnode skills/scripts/playfun-auth.js status
- •
If no credentials, offer setup options:
- •Ask if user prefers callback or manual method
- •For callback: Run server and provide instructions
- •For manual: Ask for base64 credentials string
- •
After setup, validate:
- •Use
test_connectionMCP tool - •If valid, proceed with the requested operation
- •Use
- •
Handle errors:
- •If authentication fails, suggest clearing and re-setting credentials
- •Provide link to Play.fun dashboard for credential generation