# Install

> How to set up screw-bugs in a project, from your coding agent or a terminal.

Source: https://docs.screwbugs.dev/get-started/install

**Ask your agent:**

Paste this into your coding agent, in your project:

```text
Set up screw-bugs in this project: run npx -y screw-bugs@latest setup --agent with the id of the agent you are (claude, codex, cursor, vscode or opencode). Then tell me how to load it in you, and give me a first message to paste.
```

**Terminal:**

In your project folder:

```sh
npx -y screw-bugs@latest setup
```

## Load it in your agent

The new tools appear only after your agent loads the server:

| Agent       | Do this                                                     |
| ----------- | ----------------------------------------------------------- |
| Claude Code | Run `/mcp` (or restart) and approve "screw-bugs"            |
| Codex       | Restart in the project, and trust the folder if asked       |
| Cursor      | Cursor Settings → MCP: check "screw-bugs" is on             |
| VS Code     | Open `.vscode/mcp.json`, click **Start** above "screw-bugs" |
| OpenCode    | Restart in the project                                      |

## Details

### What setup does

- Adds the MCP server (`npx -y screw-bugs@latest mcp`) to each agent it finds: Claude Code (`.mcp.json`), Codex (`.codex/config.toml`), Cursor (`.cursor/mcp.json`), VS Code (`.vscode/mcp.json`), OpenCode (`opencode.json`).
- Writes `screw-bugs.json` when the project has none.
- Downloads Playwright's ffmpeg if missing, and Chromium if there's no Chrome, Edge or Chromium.
- Ends with `doctor`'s report. Running it again changes only what is out of date.

| Flag             | What it does                                                       |
| ---------------- | ------------------------------------------------------------------ |
| `--agent <id>`   | Only this agent: `claude`, `codex`, `cursor`, `vscode`, `opencode` |
| `--url <url>`    | Save your dev server's URL as the default                          |
| `--no-downloads` | Skip the ffmpeg and Chromium downloads                             |

### Add the MCP server by hand

For Claude Code, in every project:

```sh
claude mcp add screw-bugs -- npx -y screw-bugs@latest mcp
```

Other agents: a stdio server with command `npx` and args `["-y", "screw-bugs@latest", "mcp"]`.

### Requirements and doctor

- Node.js 22.19 or newer.
- Google Chrome, Microsoft Edge, or Playwright's Chromium.
- Playwright's ffmpeg: every run is recorded, and no run starts without it.

```sh
npx -y screw-bugs@latest doctor
```

It installs nothing: it lists what's missing and the command that fixes it (exit code 4).

## For agents

- You can't restart yourself: tell the user the step under "Load it in your agent".
- Until the tools load, use the CLI from the project root: `npx -y screw-bugs@latest run --url <url>`.
- Run `setup` outside any sandbox: it downloads from npm, writes your config file and starts a browser.

**Next:** [Run your first test](/get-started/first-run.md)