

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Computer Use
incomplete
2: Browser Automation
incomplete
3: Accessibility Trees
incomplete
4: Vision Models
incomplete
5: Playwright MCP
incomplete
6: Chrome DevTools MCP
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Playwright MCP gives an agent control of a real browser via the Model Context Protocol (MCP). It can navigate pages, inspect accessibility snapshots, fill forms, click controls, and capture screenshots. To enable this MCP server, add the following to opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"playwright": {
"type": "local",
"command": [
"bunx",
"--bun",
"@playwright/[email protected]",
"--isolated",
"--browser",
"chromium",
],
},
},
},
}
The --isolated flag starts the browser with a temporary profile. Cookies and local storage disappear when the session closes, which is exactly what we want for repeatable local testing. The --browser chromium option selects Chromium.
Playwright MCP uses accessibility snapshots by default. A text-only model can locate a button by its role and name, click it, then inspect the updated page. Coordinate-based vision tools are optional, and you'll be able to use them only if you're working with an image-capable model:
"command": ["bunx", "--bun", "@playwright/[email protected]", "--isolated", "--browser", "chromium", "--caps=vision"]
Have OpenCode run a program through the playground's browser interface. This code:
hallucinate(“browser slop”, 42)✨
prints browser slop 42 on one line.
Tell OpenCode to run and submit the CLI tests from the project root.