Skip to main content
Glama
README.md
# Brave Connector

A local [MCP](https://modelcontextprotocol.io) server that lets Claude work in
**your own browser**: read job postings, fill application forms and attach your
CV, using the sessions you are already logged into. Built for job hunting with a
human in the loop: **nothing gets submitted without your explicit approval.**

It also keeps a tiny job tracker, so the agent can explore 20 or 30 postings,
score them, and show you a ranking before you decide where to apply.

## Why

Browser agents that drive a fresh, logged-out browser hit login walls, and
agents that drive your real browser with no limits are scary. Brave Connector
sits in between: it attaches to the browser you already use, but every risky
action is blocked **in code**, not just discouraged in a prompt.

## Guardrails

| Rule | Enforced by |
|---|---|
| Opens, reads, fills and closes tabs only on `allowed_domains` | every browser tool |
| Tabs on other sites (mail, bank, chats) show only their domain | `browser_status` |
| Never types into password fields; logins, CAPTCHAs and 2FA stay with you | `browser_fill` |
| Files can only be attached from `attach_dirs` | `browser_attach` |
| Submit, Apply, Accept, Pay... buttons require `confirmed_by_user=True` | `browser_click` |
| At most `max_tabs` tabs of its own, oldest closed first | `browser_open` |
| Random delays between actions, human pace | all actions |

`confirmed_by_user` is a contract with the model: it must only set it after you
say yes in the chat. Your MCP client's own tool approval prompts add a second layer.

## How it works

```mermaid
flowchart LR
    U[You] <-->|chat, approvals| C[Claude]
    C <-->|MCP stdio| S[Brave Connector]
    S <-->|CDP :9222| B[Your Brave / Chromium]
    S --> D[(SQLite job tracker)]
```

The server uses Playwright's `connect_over_cdp`, so it controls the browser you
start yourself instead of launching a new one. Pages are read as text and form
fields as a compact list (`f1`, `f2`...), which is far cheaper in tokens than
screenshots.

## Tools

**Browser**

| Tool | What it does |
|---|---|
| `browser_status` | Check the connection and list tabs |
| `browser_open` | Open a URL, optionally reusing a tab |
| `browser_read` | Visible text of a tab |
| `browser_fields` | Form fields and buttons with short refs |
| `browser_fill` | Type into a field or pick a dropdown option |
| `browser_attach` | Attach a CV or cover letter |
| `browser_click` | Click, with a lock on submit buttons |
| `browser_screenshot` | Screenshot of a tab |
| `browser_close` | Close one tab or every tab the server opened |

**Job tracker**

| Tool | What it does |
|---|---|
| `job_save` | Save a posting card with a 0 to 100 fit score and a one line reason |
| `job_ranking` | Compact ranking by score, per session or overall |
| `job_detail` | Full card with URL, requirements and skill gaps |
| `job_status` | `candidate`, `shortlisted`, `discarded` or `applied` |

A typical session: *"Explore data science roles on Indeed and LinkedIn, save 20
cards and show me the top 5."* Then: *"Apply to 2 and 4."* The agent fills the
forms, shows you what it entered, and waits for your yes before submitting.

## Setup

Requires Python 3.11+, a Chromium browser (Brave, Chrome, Edge) and an MCP
client such as Claude Desktop.

```bash
git clone https://github.com/JalilSynth/brave-connector-mcp.git
cd brave-connector-mcp
python -m venv venv
venv\Scripts\activate          # macOS/Linux: source venv/bin/activate
pip install -r requirements.txt
copy config.example.yaml config.yaml   # macOS/Linux: cp
```

1. Edit `config.yaml`: allowed domains and the folder with your CVs.
2. Close every Brave window, then run `start-brave.bat` (or start your browser
   with `--remote-debugging-port=9222`). Check that
   `http://127.0.0.1:9222/json/version` answers.
3. Add the server to your client. For Claude Desktop on Windows, merge
   `claude_desktop_config.example.json` (with your paths) into
   `%APPDATA%\Claude\claude_desktop_config.json`, then fully quit and reopen Claude.
4. Ask Claude: *"Check browser_status."*

## Security notes

- The debugging port gives full control of that browser profile to anything
  running on your machine. Only open it while you use the tool, and never expose
  it to your network.
- Consider a separate browser profile with just your job board logins.
- Some job boards forbid automation in their terms. Keep a human pace and review
  every application; use is your responsibility.

## Part of JobCopilot

This server came out of JobCopilot, my personal job search system (Telegram bot,
AI-tailored CVs and an application log). The connector works on its own.

## License

MIT