Skip to content

Token Refresh

Claude Code OAuth tokens expire periodically. y0mcp includes automatic refresh.

  1. A scheduled job runs every 2 hours
  2. Checks token expiry in ~/.claude/.credentials.json
  3. Refreshes if expiring within 30 minutes
  4. File locking prevents race conditions

Installed automatically by scripts/install.sh. For manual setup:

Terminal window
bash scripts/setup-token-refresh.sh
Terminal window
bash scripts/token-refresh.sh
Terminal window
cat ~/.y0mcp/token-refresh.log

If auto-refresh fails, re-login manually:

Terminal window
claude /login