browser-director
# browser-director
<!-- mcp-name: io.github.abhinav-nigam/browser-director -->
[](https://pypi.org/project/browser-director/)
[](https://github.com/abhinav-nigam/agent-browser/actions/workflows/ci.yml)
[](https://opensource.org/licenses/MIT)
<img src="docs/brand/logo.svg" alt="browser-director" width="320">
Pick this over [Playwright MCP](https://github.com/microsoft/playwright-mcp) or [Vercel agent-browser](https://github.com/vercel-labs/agent-browser) when the agent should both operate the site and direct a narrated demo of it — spotlight, zoom, voiceover, and cursor — from the same server.
<a href="docs/demo/browser-director-demo.mp4"><img src="docs/demo/browser-director-demo.gif" alt="Narrated demo of browser-director on the Wikipedia article for the Model Context Protocol" width="560"></a>
The clip is browser-director on the English Wikipedia article for the Model Context Protocol: search, a ring spotlight on the opening paragraph, a zoom, then a focus spotlight on an infobox row. The mp4 is 50 seconds at 1280×720. The gif is a 13.6 second highlight. The voice is OpenAI tts-1-hd, voice `nova`, mixed with `render_demo`. [MP4](docs/demo/browser-director-demo.mp4).
<!-- tool-count: 71 -->
The GitHub repository is still `abhinav-nigam/agent-browser`. The installable name is `browser-director`.
## Install
```bash
pip install browser-director
playwright install chromium
```
`ffmpeg` is required for `render_demo`. The Wikipedia demo’s voiceover uses `generate_voiceover(provider="openai", voice="nova")`, which reads `OPENAI_API_KEY`. `get_audio_duration` needs mutagen, so install the extra:
```bash
pip install 'browser-director[video]'
```
`uvx browser-director mcp` starts the server from PyPI without a separate install. That command was checked against 0.3.0: it speaks MCP over stdio and lists **71 tools**.
## MCP config
Copy one of these. They all run `uvx browser-director mcp`. Add `--allow-private` to the args only when the agent should open localhost or another private address.
### Claude Desktop
`claude_desktop_config.json`:
```json
{
"mcpServers": {
"browser-director": {
"command": "uvx",
"args": ["browser-director", "mcp"]
}
}
}
```
### Cursor
`.cursor/mcp.json`:
```json
{
"mcpServers": {
"browser-director": {
"command": "uvx",
"args": ["browser-director", "mcp"]
}
}
}
```
### Claude Code
```bash
claude mcp add browser-director -- uvx browser-director mcp
```
## Recipes
Run these from a checkout after `pip install -e .` and `playwright install chromium`. Details are in [examples/README.md](examples/README.md).
| Recipe | |
| --- | --- |
| [Scrape and summarise](examples/recipes/scrape_and_summarise.py) | Read example.com and print the title, first paragraph, and word count. |
| [Form fill](examples/recipes/form_fill.py) | Fill the public httpbin form and check the echo. |
| [Screenshot](examples/recipes/screenshot_page.py) | Save a viewport PNG of example.com. |
| [Narrated demo](examples/recipes/record_narrated_demo.py) | Wikipedia search, ring and focus spotlights, zoom, cursor, OpenAI `nova` (espeak-ng if `OPENAI_API_KEY` is unset), `render_demo`. |
## Comparison
Checked against the Playwright MCP README and the Vercel agent-browser README plus its video-recording notes, in November 2026. "Not documented" means I did not find it there. It is not a claim that the feature can never exist.
| | browser-director | Playwright MCP | Vercel agent-browser |
| --- | --- | --- | --- |
| Drive a browser (open, click, type, read) | Yes | Yes. Tool list in its README. | Yes. Rust CLI; `snapshot` returns refs such as `@e1`. |
| MCP server | Yes. `uvx browser-director mcp`. | Yes. | Yes. Docs say `agent-browser mcp`. |
| Save a video of the session | `start_recording` / `stop_recording`. | `browser_start_video` / `browser_stop_video`. Also chapter cards and action callouts. | `record start` / `record stop` to webm or mp4. `--cursor` draws a pointer. |
| Spotlight, camera zoom, and a voiceover on that same server | Yes. `spotlight`, `camera_zoom`, `generate_voiceover` or your own audio, then `render_demo`. | Not in the tool list I read. | Not in the recording docs I read. |
## Tools
The server registers **71 tools**. CI checks this sentence against the registered list (`<!-- tool-count: 71 -->`).
They cover navigation, interaction, waits, extraction, assertions, and the demo tools: voiceover, recording, annotations, spotlight, camera, and `render_demo`. `evaluate` runs JavaScript in the page.
## Security
Private-network access is off unless the server is started with `--allow-private`.
- Schemes other than `http` and `https` are rejected, including `file`, `javascript`, and `data`.
- Hostnames that resolve to loopback, link-local, or private ranges are rejected, including `169.254.169.254`.
- URLs with embedded usernames or passwords are rejected.
- Screenshot and export paths have to stay inside the working directory.
`evaluate` is arbitrary JavaScript in the page's origin. Private-IP blocking does not make that safe.
## License
MIT. See [LICENSE](LICENSE). Author: Abhinav Nigam.
TDQS
Scored across 71 tools
The set has many overlapping families such as wait/wait_for/wait_for_text/wait_for_url, click/click_nth, fill/type/type_human, scroll/smooth_scroll, and highlight/spotlight/annotate. Descriptions usually clarify the intended differences, but generic names like 'value', 'text', 'clear', and multiple 'call first' entry points make some selections less obvious.
Almost all names use snake_case, but the semantic pattern is mixed: many are verb_noun (get_url, start_recording), while many are bare nouns or verbs (value, text, attr, count, cookies, dialog, scroll, wait, clear). The convention is readable but not predictably consistent across 71 tools.
71 tools is far beyond a well-scoped set for a browser automation plus cinematic recording server. The surface combines two large domains and many specialized variants, making discovery and correct selection unnecessarily costly.
Coverage is broad and lifecycle-oriented: navigation, interaction, waits, assertions, storage/cookies, console/network, mocks, page-state extraction, voiceover, recording, cinematic effects, music, and MP4 rendering are all present. Minor gaps like tab/iframe management or file download handling are workable via evaluate or external commands.