worldai-browser-login
Browser-based login to WorldAI via Firebase Google OAuth using Chrome Superpowers MCP
What this skill does
# WorldAI Browser Login via MCP This skill documents how to authenticate with WorldAI in a real browser using Chrome Superpowers MCP or Playwright MCP for browser-based testing. ## Test Accounts | Account | Purpose | Campaigns | |---------|---------|-----------| | `[email protected]` | Secondary test account | 44 campaigns | | `[email protected]` | Primary account (owner) | 146 campaigns | ## Server URLs | Environment | URL | |-------------|-----| | Deployed Dev | `https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app` | | Local | `http://localhost:8081` | ## Chrome Superpowers MCP Login Flow ### Step 1: Navigate to WorldAI ```python # Navigate to deployed server mcp__chrome-superpower__use_browser( action="navigate", payload="https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app" ) ``` ### Step 2: Click Sign In with Google ```python # Click the Google sign-in button mcp__chrome-superpower__use_browser( action="click", selector="//button[contains(text(), 'Sign in with Google')]" ) ``` ### Step 3: Complete OAuth in Popup The Firebase OAuth popup will open. The MCP browser cannot track the popup window, but: - If you've previously signed in with Google in the same browser profile, it may auto-complete - Manual intervention may be needed to click your Google account - After successful auth, the main page will show your email in the header ### Step 4: Verify Login Success ```python # Extract page content to verify login mcp__chrome-superpower__use_browser( action="extract", payload="text", selector="body" ) ``` **Success indicators:** - Email address visible in header (e.g., `[email protected]`) - "My Campaigns" section visible - Campaign count shown (e.g., "Showing 146 of 146 campaigns") ### Step 5: Navigate to Campaign ```python # Navigate directly to a campaign mcp__chrome-superpower__use_browser( action="navigate", payload="http://localhost:8081/game/CAMPAIGN_ID" ) ``` ## Evidence Collection ### Screenshot Capture ```python # Capture screenshot as evidence mcp__chrome-superpower__use_browser( action="screenshot", payload="evidence-name.png" ) ``` Screenshots are saved to Chrome Superpowers temp directory: `/var/folders/j0/.../chrome-session-*/XXX-action-timestamp/screenshot.png` ### Copy to Evidence Directory ```bash # Create evidence directory mkdir -p /tmp/worldai-browser-evidence/ # Copy screenshot cp /path/to/chrome-session/*/screenshot.png /tmp/worldai-browser-evidence/ ``` ### OCR Validation **Primary Method: Claude Code Native Vision** Claude Code can directly read and analyze image files as a multimodal LLM: ```python # Use the Read tool on PNG files - Claude sees the image directly Read(file_path="/tmp/worldai-browser-evidence/screenshot.png") # Claude will describe what it sees: user email, campaign list, UI state ``` **Secondary Method: Tesseract OCR (Cross-validation)** ```python python3 - <<'PY' from PIL import Image import pytesseract image_path = "/tmp/worldai-browser-evidence/screenshot.png" img = Image.open(image_path) text = pytesseract.image_to_string(img) # Verify login success if "[email protected]" in text or "[email protected]" in text: print("SUCCESS: User is logged in") if "My Campaigns" in text: print("SUCCESS: Campaigns page visible") print("\n=== Full OCR Output ===") print(text) PY ``` ## Example: Full Login Test ```python # 1. Navigate mcp__chrome-superpower__use_browser(action="navigate", payload="https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app") # 2. Click Sign In mcp__chrome-superpower__use_browser(action="click", selector="//button[contains(text(), 'Sign in with Google')]") # 3. Wait for OAuth popup (manual intervention if needed) # 4. Take screenshot mcp__chrome-superpower__use_browser(action="screenshot", payload="login-test.png") # 5. Extract and verify mcp__chrome-superpower__use_browser(action="extract", payload="text", selector="body") ``` ## Playwright MCP Alternative If Chrome Superpowers is unavailable, use Playwright MCP: ```python # Navigate mcp__playwright-mcp__browser_navigate(url="https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app") # Get snapshot mcp__playwright-mcp__browser_snapshot() # Click login button mcp__playwright-mcp__browser_click(element="Sign in with Google button", ref="button-ref") # Take screenshot mcp__playwright-mcp__browser_take_screenshot() ``` ## Troubleshooting ### Session Lost After Navigation Firebase OAuth sessions may not persist across page navigations in MCP browsers. **Solution**: Navigate to the target page directly after authentication completes, or use the same tab for all operations. ### OAuth Popup Not Completing The MCP browser cannot interact with popup windows. **Solution**: Use a browser profile that's already logged into Google, or manually complete the OAuth flow when the popup appears. ### "No token provided" Error The API endpoint requires Firebase authentication. **Solution**: Ensure you've completed the OAuth flow and the session is active. Check the header for your email address. ## Related Skills - [browser-testing-ocr-validation.md](browser-testing-ocr-validation.md) - OCR validation for browser tests - [chrome-superpowers-reference.md](chrome-superpowers-reference.md) - Chrome Superpowers MCP reference - [playwright-mcp-manual-interaction.md](playwright-mcp-manual-interaction.md) - Playwright MCP manual interaction
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.