mcp-camoufox 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -90
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,16 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
MCP server for **stealth browser automation** via [Camoufox](https://github.com/daijro/camoufox) — a privacy-focused Firefox fork with C++ level anti-detection patches.
|
|
7
7
|
|
|
8
|
-
**Chrome DevTools MCP-level power
|
|
8
|
+
**65 tools. Chrome DevTools MCP-level power. Anti-bot stealth. One command install.**
|
|
9
9
|
|
|
10
10
|
## Why?
|
|
11
11
|
|
|
12
|
-
| Tool |
|
|
13
|
-
|
|
14
|
-
| Chrome DevTools MCP | 30+
|
|
15
|
-
| whit3rabbit/camoufox-mcp | 1
|
|
16
|
-
|
|
|
17
|
-
|
|
|
12
|
+
| Tool | Tools | Stealth | npx Install | Persistent Session |
|
|
13
|
+
|------|-------|---------|-------------|--------------------|
|
|
14
|
+
| Chrome DevTools MCP | 30+ | No | Built-in | Yes |
|
|
15
|
+
| whit3rabbit/camoufox-mcp | 1 | Yes | Yes | No |
|
|
16
|
+
| redf0x1/camofox-mcp | 45 | Yes | No (clone) | Yes |
|
|
17
|
+
| Sekinal/camoufox-mcp | 49 | Yes | No (clone) | Yes |
|
|
18
|
+
| Playwright CLI | 60+ | No | Yes | Yes |
|
|
19
|
+
| **mcp-camoufox** | **65** | **Yes** | **Yes** | **Yes** |
|
|
18
20
|
|
|
19
21
|
## Quick Start
|
|
20
22
|
|
|
@@ -30,9 +32,9 @@ That's it. No pip, no Python, no manual downloads.
|
|
|
30
32
|
|
|
31
33
|
Add to your config file:
|
|
32
34
|
|
|
33
|
-
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
34
|
-
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
35
|
-
**Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
35
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
36
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
37
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
36
38
|
|
|
37
39
|
```json
|
|
38
40
|
{
|
|
@@ -96,130 +98,191 @@ Add to `~/.windsurf/mcp.json`:
|
|
|
96
98
|
|-------------|---------|--------------|
|
|
97
99
|
| **Node.js** | 18+ | `node --version` |
|
|
98
100
|
|
|
99
|
-
That's all.
|
|
101
|
+
That's all. Camoufox browser binary is downloaded automatically on first launch (~80MB, once).
|
|
100
102
|
|
|
101
|
-
##
|
|
103
|
+
## All 65 Tools
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
- **Camoufox stealth** — C++ fingerprint patches at browser engine level, bypasses Cloudflare Turnstile and bot detection
|
|
105
|
-
- **Persistent session** — browser stays alive between tool calls, cookies and state maintained across sessions
|
|
106
|
-
- **JS click fallback** — automatically falls back to JavaScript click when elements are blocked by overlays
|
|
107
|
-
- **1280x800 default window** — fits any screen without cropping, customizable via width/height params
|
|
108
|
-
- **Ref-based interaction** — `browser_snapshot` returns compact element list with ref IDs, not raw HTML (token-efficient)
|
|
109
|
-
|
|
110
|
-
## Tools (39)
|
|
111
|
-
|
|
112
|
-
### Browser Lifecycle
|
|
105
|
+
### Browser Lifecycle (2)
|
|
113
106
|
|
|
114
107
|
| Tool | Description |
|
|
115
108
|
|------|-------------|
|
|
116
|
-
| `browser_launch` | Launch Camoufox and navigate to URL. Options: `url`, `headless
|
|
117
|
-
| `browser_close` | Close browser. Cookies are preserved in persistent profile
|
|
109
|
+
| `browser_launch` | Launch Camoufox stealth browser and navigate to URL. Browser persists between calls — cookies and sessions maintained. Options: `url`, `headless` (true/false), `humanize` (human-like mouse), `geoip` (auto timezone), `locale`, `width`, `height` |
|
|
110
|
+
| `browser_close` | Close browser gracefully. Cookies and localStorage are preserved in persistent profile at `~/.camoufox-mcp/profile/` |
|
|
118
111
|
|
|
119
|
-
### Navigation
|
|
112
|
+
### Navigation (4)
|
|
120
113
|
|
|
121
114
|
| Tool | Description |
|
|
122
115
|
|------|-------------|
|
|
123
|
-
| `navigate` | Go to URL with configurable wait strategy (`domcontentloaded`, `load`, `networkidle`) and timeout |
|
|
116
|
+
| `navigate` | Go to URL with configurable wait strategy (`domcontentloaded`, `load`, `networkidle`) and timeout in ms |
|
|
124
117
|
| `go_back` | Navigate back in browser history |
|
|
125
118
|
| `go_forward` | Navigate forward in browser history |
|
|
126
119
|
| `reload` | Reload current page |
|
|
127
120
|
|
|
128
|
-
### DOM & Page Content
|
|
121
|
+
### DOM Snapshot & Page Content (6)
|
|
129
122
|
|
|
130
123
|
| Tool | Description |
|
|
131
124
|
|------|-------------|
|
|
132
|
-
| `browser_snapshot` | Get all visible interactive elements with ref IDs.
|
|
133
|
-
| `screenshot` | Capture viewport or full-page screenshot. Saved to `~/.camoufox-mcp/screenshots
|
|
134
|
-
| `get_text` | Get visible text from page or CSS selector
|
|
135
|
-
| `get_html` | Get inner
|
|
136
|
-
| `get_url` | Get current URL and
|
|
137
|
-
| `save_pdf` | Export current page as PDF |
|
|
125
|
+
| `browser_snapshot` | Get all visible interactive elements with ref IDs. Returns compact list — use ref IDs with `click`, `fill`, etc. **Always call after navigation to get fresh refs.** |
|
|
126
|
+
| `screenshot` | Capture viewport or full-page screenshot. Saved to `~/.camoufox-mcp/screenshots/`. Options: `name` (filename prefix), `full_page` |
|
|
127
|
+
| `get_text` | Get visible text from page or specific CSS selector. Truncated at 5000 chars for token efficiency. |
|
|
128
|
+
| `get_html` | Get inner or outer HTML from page or CSS selector. Truncated at 10000 chars. Options: `selector`, `outer` |
|
|
129
|
+
| `get_url` | Get current page URL and title |
|
|
130
|
+
| `save_pdf` | Export current page as PDF file |
|
|
138
131
|
|
|
139
|
-
### Element Interaction
|
|
132
|
+
### Element Interaction (9)
|
|
140
133
|
|
|
141
134
|
| Tool | Description |
|
|
142
135
|
|------|-------------|
|
|
143
|
-
| `click` | Click element by ref ID
|
|
144
|
-
| `click_text` | Click element by visible text. Options: `exact` (true
|
|
136
|
+
| `click` | Click element by ref ID from `browser_snapshot`. Auto JS-fallback when element is blocked by overlay. Options: `button` (left/right/middle), `dblclick` |
|
|
137
|
+
| `click_text` | Click element by its visible text content. Options: `exact` (true = exact match, false = partial) |
|
|
145
138
|
| `click_role` | Click element by ARIA role and accessible name (e.g. role=`button`, name=`Submit`) |
|
|
146
|
-
| `hover` | Hover over element by ref ID |
|
|
147
|
-
| `fill` | Fill input
|
|
148
|
-
| `select_option` | Select option from `<select>` dropdown by ref ID |
|
|
139
|
+
| `hover` | Hover over element by ref ID — triggers hover effects, tooltips, dropdown menus |
|
|
140
|
+
| `fill` | Fill text into input or textarea by ref ID. Clears existing content first. Works for standard form inputs. |
|
|
141
|
+
| `select_option` | Select option from `<select>` dropdown by ref ID and option value/label |
|
|
149
142
|
| `check` | Check a checkbox or radio button by ref ID |
|
|
150
143
|
| `uncheck` | Uncheck a checkbox by ref ID |
|
|
151
|
-
| `upload_file` | Upload file to a file input by ref ID |
|
|
144
|
+
| `upload_file` | Upload file to a file input element by ref ID. Takes absolute file path. |
|
|
145
|
+
|
|
146
|
+
### Keyboard (2)
|
|
147
|
+
|
|
148
|
+
| Tool | Description |
|
|
149
|
+
|------|-------------|
|
|
150
|
+
| `type_text` | Type text character by character via keyboard. Options: `delay` (ms between keys). Use for masked inputs, OTP fields, date pickers — anything that doesn't support `fill`. |
|
|
151
|
+
| `press_key` | Press keyboard key or combination. Examples: `Enter`, `Escape`, `Tab`, `ArrowDown`, `Control+a`, `Meta+c`, `Shift+Tab`, `F5` |
|
|
152
|
+
|
|
153
|
+
### Mouse XY (3)
|
|
154
|
+
|
|
155
|
+
| Tool | Description |
|
|
156
|
+
|------|-------------|
|
|
157
|
+
| `mouse_click_xy` | Click at exact x,y pixel coordinates on the page. Options: `button` (left/right/middle). Use when ref-based click isn't possible. |
|
|
158
|
+
| `mouse_move` | Move mouse cursor to exact x,y coordinates. Use for triggering hover effects at specific positions. |
|
|
159
|
+
| `drag_and_drop` | Drag element from one position to another by ref IDs. Use for sortable lists, kanban boards, file drop zones. |
|
|
160
|
+
|
|
161
|
+
### Wait (4)
|
|
162
|
+
|
|
163
|
+
| Tool | Description |
|
|
164
|
+
|------|-------------|
|
|
165
|
+
| `wait_for` | Wait for CSS selector or text to become visible/hidden/attached/detached. Options: `selector`, `text`, `state`, `timeout` |
|
|
166
|
+
| `wait_for_navigation` | Wait for page load to complete after a click or form submission |
|
|
167
|
+
| `wait_for_url` | Wait for URL to match a substring or regex pattern. Use after actions that trigger redirects. |
|
|
168
|
+
| `wait_for_response` | Wait for a specific network response matching a URL pattern. Use to wait for API calls to complete. |
|
|
169
|
+
|
|
170
|
+
### Tab Management (4)
|
|
171
|
+
|
|
172
|
+
| Tool | Description |
|
|
173
|
+
|------|-------------|
|
|
174
|
+
| `tab_list` | List all open tabs with index, URL, title, and active status |
|
|
175
|
+
| `tab_new` | Open new tab, optionally navigate to URL. New tab becomes active. |
|
|
176
|
+
| `tab_select` | Switch active tab by index from `tab_list` |
|
|
177
|
+
| `tab_close` | Close tab by index. Default: close active tab. |
|
|
178
|
+
|
|
179
|
+
### Cookies (3)
|
|
180
|
+
|
|
181
|
+
| Tool | Description |
|
|
182
|
+
|------|-------------|
|
|
183
|
+
| `cookie_list` | List all cookies, optionally filter by domain. Shows name, value (truncated), domain. |
|
|
184
|
+
| `cookie_set` | Set a cookie with name, value, domain, and path |
|
|
185
|
+
| `cookie_delete` | Delete cookies by name and/or domain. Both empty = clear ALL cookies. |
|
|
186
|
+
|
|
187
|
+
### Local Storage (3)
|
|
188
|
+
|
|
189
|
+
| Tool | Description |
|
|
190
|
+
|------|-------------|
|
|
191
|
+
| `localstorage_get` | Get all localStorage data or a specific key. Returns JSON for all, or value for specific key. |
|
|
192
|
+
| `localstorage_set` | Set a localStorage key-value pair |
|
|
193
|
+
| `localstorage_clear` | Clear all localStorage data |
|
|
152
194
|
|
|
153
|
-
###
|
|
195
|
+
### Session Storage (2)
|
|
154
196
|
|
|
155
197
|
| Tool | Description |
|
|
156
198
|
|------|-------------|
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
199
|
+
| `sessionstorage_get` | Get all sessionStorage data or a specific key |
|
|
200
|
+
| `sessionstorage_set` | Set a sessionStorage key-value pair |
|
|
159
201
|
|
|
160
|
-
###
|
|
202
|
+
### JavaScript (2)
|
|
161
203
|
|
|
162
204
|
| Tool | Description |
|
|
163
205
|
|------|-------------|
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
206
|
+
| `evaluate` | Execute JavaScript in page context and return result. Supports expressions and IIFE functions. |
|
|
207
|
+
| `inject_init_script` | Inject a script that runs automatically before every page load. Use for modifying page behavior, intercepting requests, etc. |
|
|
166
208
|
|
|
167
|
-
###
|
|
209
|
+
### Element Inspection (4)
|
|
168
210
|
|
|
169
211
|
| Tool | Description |
|
|
170
212
|
|------|-------------|
|
|
171
|
-
| `
|
|
172
|
-
| `
|
|
173
|
-
| `
|
|
174
|
-
| `
|
|
213
|
+
| `inspect_element` | Get detailed info about an element: tag, id, class, all attributes, bounding box, computed styles (font size, color, background), text content, value |
|
|
214
|
+
| `get_attribute` | Get a specific attribute value from an element by ref ID |
|
|
215
|
+
| `query_selector_all` | Query multiple elements by CSS selector. Returns text, tag, and optional attribute for all matches. Options: `limit` |
|
|
216
|
+
| `get_links` | Get all hyperlinks on the page with URL and text. Options: `filter` (URL pattern to match) |
|
|
175
217
|
|
|
176
|
-
###
|
|
218
|
+
### Frames / Iframes (2)
|
|
177
219
|
|
|
178
220
|
| Tool | Description |
|
|
179
221
|
|------|-------------|
|
|
180
|
-
| `
|
|
181
|
-
| `
|
|
182
|
-
| `cookie_delete` | Delete cookies by name/domain, or clear all |
|
|
222
|
+
| `list_frames` | List all frames and iframes in the page with index, name, and URL |
|
|
223
|
+
| `frame_evaluate` | Execute JavaScript inside a specific frame/iframe by name or index. Use for interacting with embedded content. |
|
|
183
224
|
|
|
184
|
-
###
|
|
225
|
+
### Batch Operations (3)
|
|
185
226
|
|
|
186
227
|
| Tool | Description |
|
|
187
228
|
|------|-------------|
|
|
188
|
-
| `
|
|
229
|
+
| `batch_actions` | Execute multiple actions in one call. Each action: `{type, ref?, value?, text?, key?, timeout?}`. Types: click, fill, type, press, select, check, uncheck, wait. Reduces round-trips significantly. |
|
|
230
|
+
| `fill_form` | Fill multiple form fields at once and optionally click submit. Takes array of `{ref, value}` pairs + optional `submit_ref`. |
|
|
231
|
+
| `navigate_and_snapshot` | Navigate to URL then return element snapshot — two operations in one call. Saves a round-trip. |
|
|
189
232
|
|
|
190
|
-
###
|
|
233
|
+
### Viewport (2)
|
|
234
|
+
|
|
235
|
+
| Tool | Description |
|
|
236
|
+
|------|-------------|
|
|
237
|
+
| `get_viewport_size` | Get current viewport width and height in pixels |
|
|
238
|
+
| `set_viewport_size` | Set viewport dimensions. Use for testing responsive layouts. |
|
|
239
|
+
|
|
240
|
+
### Scroll (1)
|
|
191
241
|
|
|
192
242
|
| Tool | Description |
|
|
193
243
|
|------|-------------|
|
|
194
244
|
| `scroll` | Scroll page in any direction: `up`, `down`, `left`, `right` with configurable `amount` in pixels |
|
|
195
245
|
|
|
196
|
-
### Dialog
|
|
246
|
+
### Dialog (1)
|
|
247
|
+
|
|
248
|
+
| Tool | Description |
|
|
249
|
+
|------|-------------|
|
|
250
|
+
| `dialog_handle` | Pre-set handler for the next browser dialog (alert/confirm/prompt). Options: `accept` or `dismiss`, with optional `prompt_text` for prompt dialogs. Must be called BEFORE the action that triggers the dialog. |
|
|
251
|
+
|
|
252
|
+
### Accessibility (1)
|
|
197
253
|
|
|
198
254
|
| Tool | Description |
|
|
199
255
|
|------|-------------|
|
|
200
|
-
| `
|
|
256
|
+
| `accessibility_snapshot` | Get accessibility tree snapshot — compact hierarchical view of page structure with roles and names. Useful for LLM understanding of complex pages. |
|
|
201
257
|
|
|
202
|
-
###
|
|
258
|
+
### Console & Network Capture (4)
|
|
203
259
|
|
|
204
260
|
| Tool | Description |
|
|
205
261
|
|------|-------------|
|
|
206
|
-
| `console_start` | Start capturing browser console messages |
|
|
207
|
-
| `console_get` | Retrieve captured console messages
|
|
208
|
-
| `network_start` | Start capturing network requests
|
|
209
|
-
| `network_get` | Retrieve captured network requests
|
|
262
|
+
| `console_start` | Start capturing browser console messages (log, warn, error, info) |
|
|
263
|
+
| `console_get` | Retrieve captured console messages since `console_start`. Shows last 50 messages with type and text. |
|
|
264
|
+
| `network_start` | Start capturing network requests and responses |
|
|
265
|
+
| `network_get` | Retrieve captured network requests since `network_start`. Shows last 50 with method, status, URL. |
|
|
266
|
+
|
|
267
|
+
### Debug & Health (3)
|
|
268
|
+
|
|
269
|
+
| Tool | Description |
|
|
270
|
+
|------|-------------|
|
|
271
|
+
| `server_status` | Health check — shows browser status, active tab count, current URL, profile directory |
|
|
272
|
+
| `get_page_errors` | Get JavaScript errors from the current page |
|
|
273
|
+
| `export_har` | Export captured network traffic as HAR (HTTP Archive) file for analysis in browser dev tools |
|
|
210
274
|
|
|
211
275
|
## Usage Examples
|
|
212
276
|
|
|
213
|
-
### Basic: Open
|
|
277
|
+
### Basic: Open and interact
|
|
214
278
|
|
|
215
279
|
```
|
|
216
280
|
browser_launch(url="https://example.com", headless=false)
|
|
217
|
-
browser_snapshot()
|
|
218
|
-
click(ref="e5")
|
|
281
|
+
browser_snapshot()
|
|
282
|
+
click(ref="e5")
|
|
219
283
|
fill(ref="e12", value="hello@example.com")
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
browser_close() # done, cookies saved
|
|
284
|
+
screenshot()
|
|
285
|
+
browser_close()
|
|
223
286
|
```
|
|
224
287
|
|
|
225
288
|
### Login flow
|
|
@@ -227,22 +290,47 @@ browser_close() # done, cookies saved
|
|
|
227
290
|
```
|
|
228
291
|
browser_launch(url="https://site.com/login")
|
|
229
292
|
browser_snapshot()
|
|
230
|
-
fill(ref="e3", value="user@email.com")
|
|
293
|
+
fill(ref="e3", value="user@email.com")
|
|
231
294
|
click(ref="e5") # Continue
|
|
232
295
|
wait_for(selector='input[type="password"]')
|
|
233
296
|
browser_snapshot()
|
|
234
|
-
fill(ref="e2", value="mypassword")
|
|
297
|
+
fill(ref="e2", value="mypassword")
|
|
235
298
|
click(ref="e4") # Sign in
|
|
236
299
|
wait_for_navigation()
|
|
237
300
|
browser_snapshot() # verify logged in
|
|
238
301
|
```
|
|
239
302
|
|
|
303
|
+
### Fill form in one call
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
browser_snapshot()
|
|
307
|
+
fill_form(
|
|
308
|
+
fields=[
|
|
309
|
+
{ref: "e3", value: "John Doe"},
|
|
310
|
+
{ref: "e5", value: "john@example.com"},
|
|
311
|
+
{ref: "e7", value: "Hello world"}
|
|
312
|
+
],
|
|
313
|
+
submit_ref="e10"
|
|
314
|
+
)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Batch actions (reduce round-trips)
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
batch_actions(actions=[
|
|
321
|
+
{type: "click", ref: "e5"},
|
|
322
|
+
{type: "wait", timeout: 1000},
|
|
323
|
+
{type: "fill", ref: "e8", value: "search query"},
|
|
324
|
+
{type: "press", key: "Enter"}
|
|
325
|
+
])
|
|
326
|
+
```
|
|
327
|
+
|
|
240
328
|
### Multi-tab research
|
|
241
329
|
|
|
242
330
|
```
|
|
243
331
|
browser_launch(url="https://github.com")
|
|
244
332
|
tab_new(url="https://stackoverflow.com")
|
|
245
|
-
tab_list()
|
|
333
|
+
tab_list()
|
|
246
334
|
tab_select(index=0) # switch to GitHub
|
|
247
335
|
```
|
|
248
336
|
|
|
@@ -251,15 +339,46 @@ tab_select(index=0) # switch to GitHub
|
|
|
251
339
|
```
|
|
252
340
|
browser_launch(url="https://google.com")
|
|
253
341
|
browser_snapshot()
|
|
254
|
-
click(ref="e5")
|
|
342
|
+
click(ref="e5")
|
|
255
343
|
type_text(text="mcp-camoufox npm")
|
|
256
344
|
press_key(key="Enter")
|
|
257
345
|
```
|
|
258
346
|
|
|
259
|
-
|
|
347
|
+
### Wait for API response
|
|
260
348
|
|
|
261
349
|
```
|
|
262
|
-
|
|
350
|
+
click(ref="e10") # trigger action
|
|
351
|
+
wait_for_response(url_pattern="/api/data") # wait for API call
|
|
352
|
+
browser_snapshot() # see updated page
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Inspect and debug
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
inspect_element(ref="e5") # detailed element info
|
|
359
|
+
get_links(filter="github.com") # all GitHub links
|
|
360
|
+
query_selector_all(selector=".product-card") # all matching elements
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Work with iframes
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
list_frames()
|
|
367
|
+
frame_evaluate(frame_index=1, expression="document.title")
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Manage storage
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
localstorage_get() # dump all localStorage
|
|
374
|
+
localstorage_set(key="token", value="abc123")
|
|
375
|
+
cookie_list(domain="example.com")
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Architecture
|
|
379
|
+
|
|
380
|
+
```
|
|
381
|
+
AI Agent (Claude, Cursor, Windsurf, VS Code)
|
|
263
382
|
|
|
|
264
383
|
| MCP Protocol (stdio JSON-RPC)
|
|
265
384
|
v
|
|
@@ -274,34 +393,34 @@ Camoufox (Patched Firefox binary)
|
|
|
274
393
|
Website (Cloudflare, bot detection — bypassed)
|
|
275
394
|
```
|
|
276
395
|
|
|
277
|
-
**
|
|
396
|
+
**Juggler, not CDP** — Camoufox is Firefox-based. Sites that detect Chrome DevTools Protocol automation cannot detect Camoufox.
|
|
397
|
+
|
|
398
|
+
**Persistent profile** — Browser state stored at `~/.camoufox-mcp/profile/`. Cookies, localStorage, IndexedDB survive across sessions.
|
|
278
399
|
|
|
279
|
-
**
|
|
400
|
+
**Ref-based interaction** — `browser_snapshot` tags elements with `data-mcp-ref` attributes. More token-efficient than raw HTML, more reliable than CSS selectors.
|
|
280
401
|
|
|
281
|
-
**
|
|
402
|
+
**JS click fallback** — When Playwright's actionability checks fail (element behind overlay), automatically falls back to `element.click()` via JavaScript.
|
|
282
403
|
|
|
283
404
|
## Persistent Data
|
|
284
405
|
|
|
285
406
|
| Path | Purpose |
|
|
286
407
|
|------|---------|
|
|
287
408
|
| `~/.camoufox-mcp/profile/` | Browser profile (cookies, localStorage, cache) |
|
|
288
|
-
| `~/.camoufox-mcp/screenshots/` | Screenshots
|
|
409
|
+
| `~/.camoufox-mcp/screenshots/` | Screenshots, PDFs, HAR exports |
|
|
289
410
|
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
rm -rf ~/.camoufox-mcp/profile/
|
|
293
|
-
```
|
|
411
|
+
Reset all data: `rm -rf ~/.camoufox-mcp/`
|
|
294
412
|
|
|
295
413
|
## Troubleshooting
|
|
296
414
|
|
|
297
415
|
| Problem | Solution |
|
|
298
416
|
|---------|----------|
|
|
299
|
-
| "Browser not running" | Call `browser_launch` first
|
|
300
|
-
| Click fails / element intercepted |
|
|
301
|
-
|
|
|
417
|
+
| "Browser not running" | Call `browser_launch` first |
|
|
418
|
+
| Click fails / element intercepted | Auto JS-fallback handles most cases. Try `press_key("Escape")` to dismiss overlays, then `browser_snapshot` |
|
|
419
|
+
| Stale ref IDs | Refs regenerate on each `browser_snapshot` call. Always snapshot after navigation. |
|
|
420
|
+
| Window too large | `browser_launch(width=1024, height=768)` |
|
|
302
421
|
| First launch slow (~30s) | Camoufox downloading browser binary. Only happens once. |
|
|
303
|
-
|
|
|
304
|
-
|
|
|
422
|
+
| Snapshot too large | Normal for element-heavy pages (Wikipedia). Use `get_text` or `evaluate` instead. |
|
|
423
|
+
| iframe content not accessible | Use `list_frames` + `frame_evaluate` to interact with iframe content |
|
|
305
424
|
|
|
306
425
|
## License
|
|
307
426
|
|
package/package.json
CHANGED