career-ops
Guides

Set up Playwright

Install and configure Playwright for browser automation.

This guide walks through three setup steps that give career-ops its browser automation capabilities:

Install the Playwright Node package

Download the Chromium browser Playwright controls

Configure the Playwright MCP so Claude can operate the browser during the apply step

Before you start

Complete the Quick Start guide. Node.js 22.13 or later (23.4 or later on Node 23) must be installed and you must be inside the career-ops root folder.


Install the Playwright package

Run npm install from the career-ops root folder:

Terminal
npm install

This installs Playwright and all other project dependencies declared in package.json. Skip this step if you already ran it during initial setup.

Download Chromium

Playwright needs its own copy of Chromium to automate. The installer normally downloads it automatically right after dependencies; if npm run doctor reports it missing, download it by running:

Terminal
npx playwright install chromium

This is a one-time step. You do not need to repeat it after npm updates.

npm install skips the automatic download when PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD is set in your environment to anything other than empty, 0 or false; in that case, run the command above yourself. On NixOS, skip it altogether: the downloaded browsers cannot start there, and the repository's flake dev shell provides working ones and the Playwright MCP server instead, as the core's NixOS guide explains.

Configure the Playwright MCP

The Playwright MCP lets Claude control the browser directly during the /career-ops apply step — navigating to job application forms, reading field labels, and suggesting answers.

Register the MCP server

Run this command from the career-ops root folder to register the Playwright MCP with Claude Code:

Terminal
claude mcp add --scope project playwright -- npx @playwright/mcp@latest

This is the one-step registration method from the Playwright MCP docs, with --scope project added so Claude Code writes the server entry to .mcp.json in the career-ops root, one of the files npm run doctor checks. The next time you start Claude Code there, approve the server when it asks.

To use it in every project instead, run the command with --scope user. npm run doctor finds it there too: it reads the servers Claude Code keeps for your user and for this project, not only .mcp.json.

Manual configuration (alternative)

If you prefer to configure it by hand, add the following entry to .mcp.json in the career-ops root (create the file if it does not exist):

.mcp.json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}

Restart Claude Code after saving the file and approve the server when it asks. career-ops will then have access to browser_navigate and browser_snapshot during apply sessions.


Verify the setup

Run the doctor script to confirm all three components are in place:

Terminal
npm run doctor

Look for confirmation that Playwright, Chromium, and the MCP server are all ready. If the check passes, setup is complete.


Watch the browser fill out the form

The Playwright MCP opens a visible browser window by default (the setup above does not pass --headless), so you can see each page it reads and each field it fills.

To have it open the application in that window and fill out the entire form, add an instruction to the apply command:

/career-ops apply {company_name} open up with playwright the browser and fill out the entire form
Run the /career-ops apply command with the {company_name} argument. Then, use the Playwright MCP to open a browser window and fill out the entire form live.
Run the /career-ops apply command with the {company_name} argument. Then, use the Playwright MCP to open a browser window and fill out the entire form live.
Run the /career-ops apply command with the {company_name} argument. Then, use the Playwright MCP to open a browser window and fill out the entire form live.

For Ashby, Playwright can inspect the form and help draft answers, but finish and submit in your ordinary system browser. Verify a success page or confirmation email before marking the application submitted.

Without that instruction, career-ops still uses Playwright and the MCP to read the form and draft your answers, in the same visible window.

What each component enables

ComponentPurpose
Playwright packageCore library that drives browser automation
ChromiumRenders pages, generates print-quality PDFs via /career-ops pdf, checks whether job postings are still live, and powers full ATS scans
Playwright MCPAllows career-ops to navigate forms and suggest field answers during /career-ops apply

On this page