You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(browser-rendering): add quick-action tools for REST parity (#407)
* feat(browser-rendering): add quick-action tools for REST parity
Adds MCP tools wrapping the remaining Browser Rendering REST quick
actions so MCP-compatible agents no longer need to drop to raw HTTP:
- get_url_pdf
- get_url_snapshot
- scrape_url_elements
- get_url_json
- get_url_links
- start_crawl / get_crawl_result / cancel_crawl
- list_browser_sessions / kill_browser_session
BRAPI-1319, BRAPI-1320, BRAPI-1321 / RM-29118
* fix(browser-rendering): handle bare-array response from list_browser_sessions
The /devtools/session endpoint returns a bare JSON array rather than the
usual { success, result } envelope. Verified against the live REST API.
Add MCP tools for the remaining Browser Rendering REST quick actions, bringing the Browser Run MCP server to parity with the REST API: `get_url_pdf`, `get_url_snapshot`, `scrape_url_elements`, `get_url_json`, `get_url_links`, `start_crawl`, `get_crawl_result`, `cancel_crawl`, `list_browser_sessions`, and `kill_browser_session`.
|`get_url_html_content`| Retrieves the HTML content of the specified URL. |
16
+
|`get_url_markdown`| Fetches the webpage content and converts it into Markdown format. |
17
+
|`get_url_screenshot`| Captures a screenshot of the webpage. Optionally, specify the viewport size. |
18
+
|`get_url_pdf`| Renders the webpage to a PDF document. |
19
+
|`get_url_snapshot`| Returns the page HTML content and a screenshot in a single call. |
20
+
|`scrape_url_elements`| Scrapes elements from the page by CSS selector. |
21
+
|`get_url_json`| Extracts structured JSON from the page using AI. Supports a prompt and JSON schema. |
22
+
|`get_url_links`| Returns the list of links on the page. |
23
+
|`start_crawl`| Starts an asynchronous crawl of a website and returns a `job_id`. |
24
+
|`get_crawl_result`| Returns the status and records of a crawl job. |
25
+
|`cancel_crawl`| Cancels a running crawl job. |
26
+
|`list_browser_sessions`| Lists active Browser Rendering sessions for the account. |
27
+
|`kill_browser_session`| Closes (kills) a Browser Rendering session by its session ID. |
18
28
19
29
**Note:** These tools are account-scoped. Single-account credentials (and account-scoped API tokens) are detected automatically. If your credentials can access multiple accounts, pass `account_id` to the tool, or set a `cf-account-id` request header in your MCP client config.
20
30
@@ -25,6 +35,11 @@ This MCP server is still a work in progress, and we plan to add more tools in th
25
35
-`Get the HTML content of https://example.com.`
26
36
-`Convert https://example.com to Markdown.`
27
37
-`Take a screenshot of https://example.com.`
38
+
-`Render https://example.com to a PDF.`
39
+
-`Extract the product name and price from https://example.com as JSON.`
40
+
-`List all the links on https://example.com.`
41
+
-`Crawl https://example.com two levels deep and give me the results.`
42
+
-`List my active browser sessions and kill the oldest one.`
28
43
29
44
## Access the remote MCP server from any MCP Client
0 commit comments