Skip to content

Commit 77b29a3

Browse files
committed
docs: update with the latest changes
1 parent 78e388f commit 77b29a3

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

docs/ai/mcp-server.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The **Scrapling MCP Server** is a new feature that brings Scrapling's powerful W
66

77
## Features
88

9-
The Scrapling MCP Server provides nine powerful tools for web scraping:
9+
The Scrapling MCP Server provides ten powerful tools for web scraping:
1010

1111
### 🚀 Basic HTTP Scraping
1212
- **`get`**: Fast HTTP requests with browser fingerprint impersonation, generating real browser headers matching the TLS version, HTTP/3, and more!
@@ -20,6 +20,9 @@ The Scrapling MCP Server provides nine powerful tools for web scraping:
2020
- **`stealthy_fetch`**: Uses our Stealthy browser to bypass Cloudflare Turnstile/Interstitial and other anti-bot systems with complete control over the request/browser!
2121
- **`bulk_stealthy_fetch`**: An async version of the above tool that allows stealth scraping of multiple URLs in different browser tabs at the same time!
2222

23+
### 📸 Screenshots
24+
- **`screenshot`**: Capture a PNG or JPEG screenshot of a page using an open browser session, returned as an image content block the model can actually see (not a base64 string blob). Supports full-page captures, JPEG quality, and the usual readiness controls (`wait`, `wait_selector`, `network_idle`).
25+
2326
### 🔌 Session Management
2427
- **`open_session`**: Create a persistent browser session (dynamic or stealthy) that stays open across multiple fetch calls, avoiding the overhead of launching a new browser each time.
2528
- **`close_session`**: Close a persistent browser session and free its resources.
@@ -331,6 +334,14 @@ This protection runs automatically on all MCP tool responses. Keep `main_content
331334
- Always close sessions with `close_session` when done to free resources
332335
- Use `list_sessions` to check which sessions are still active
333336
- A `session_id` from a dynamic session can only be used with `fetch`/`bulk_fetch`, and a stealthy session can only be used with `stealthy_fetch`/`bulk_stealthy_fetch`
337+
- Pass a custom `session_id` to `open_session` to give sessions meaningful names (e.g. `"search"`, `"checkout"`) instead of the random hex default. `open_session` raises if the chosen ID is already in use, so you can detect collisions up front
338+
339+
### 7. Capturing Screenshots
340+
- `screenshot` only works through an existing browser session, so call `open_session` first (either `dynamic` or `stealthy` works)
341+
- The image is returned as a real `ImageContent` block, not a base64 string in JSON, so the model sees the page directly
342+
- Use `full_page=True` when you need everything below the fold; the default captures only the visible viewport
343+
- Pick `image_type="jpeg"` with a `quality` value (0-100) for smaller payloads when pixel-perfect color isn't needed
344+
- The same `wait`, `wait_selector`, `network_idle`, and `timeout` controls used by `fetch` are available here too
334345
335346
## Legal and Ethical Considerations
336347

0 commit comments

Comments
 (0)