From b52dbeca06a7b7952d09636895886eb926a70974 Mon Sep 17 00:00:00 2001 From: MrScraper <261125219+ai-mrscraper@users.noreply.github.com> Date: Fri, 20 Nov 2026 09:50:32 +0700 Subject: [PATCH] Update the skills and docs for the seven tools in MCP server 0.5.0 Copy the canonical MrScraper MCP skills for MrScraper MCP server 0.5.0 (mrscraper-com/mrscraper-mcp#43): status, scrapeHtml, scrapeMarkdown, getScreenshot, scrapeBrand, scrapeJson, and webSearch replace scraperAPI; webSearch takes query, country, and numResults; the server's scopes are scraper:read and account:read. List the seven tools with the standard descriptions in the README, update the publishing smoke test, bump the version to 0.5.0, and add the changelog entry. --- CHANGELOG.md | 17 +++ PUBLISHING.md | 4 +- README.md | 22 ++-- package-lock.json | 4 +- package.json | 2 +- skills/mrscraper-fetch/SKILL.md | 211 ++++++++++++++------------------ skills/mrscraper-serp/SKILL.md | 46 +++---- skills/mrscraper/SKILL.md | 113 +++++++++++------ 8 files changed, 221 insertions(+), 198 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca6c24..1f1e98e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to the MrScraper OpenCode plugin are documented here. The project follows [Semantic Versioning](https://semver.org/). +## 0.5.0 - 2026-11-20 + +- Updated the skills, README, and publishing checklist for MrScraper MCP + server 0.5.0, which follows the MrScraper Integrations Standard. The server + has seven tools with the standard descriptions: `status`, `scrapeHtml`, + `scrapeMarkdown`, `getScreenshot`, `scrapeBrand`, `scrapeJson`, and + `webSearch`. `scraperAPI` is gone; use `scrapeHtml`, `scrapeMarkdown`, or + `getScreenshot`, and `scrapeBrand` or `scrapeJson` for brand data and JSON + extraction. `webSearch` now takes `query`, `country`, and `numResults` + instead of `url`, `region`, `num_results`, and `timeout`, and all tool + inputs are camelCase. Skills are identical to the MrScraper Claude 0.4.0, + Cursor 0.5.0, Grok 0.4.0, and Antigravity 0.4.0 plugins. +- The hosted server now uses two OAuth scopes: `scraper:read` for the six + scraping and search tools and `account:read` for `status`. Connections + authorized with the older `scrape:read` and `scrape:write` scopes must run + `opencode mcp auth mrscraper` again so OpenCode requests `scraper:read`. + ## 0.4.0 - 2026-11-02 - Updated the `mrscraper-serp` skill for MrScraper MCP server 0.3.0, which diff --git a/PUBLISHING.md b/PUBLISHING.md index a173a2e..e48a860 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -43,8 +43,8 @@ Use this checklist for every public release of `@mrscraper/opencode`. `mrscraper-fetch`, and `mrscraper-serp`; - with the README's API-key configuration, `opencode mcp list` shows `connected`, which also proves that a user-defined server is kept; - - the prompt `Fetch https://www.scrapethissite.com/pages/simple/ and summarize the page.` - calls the `scraperAPI` tool and summarizes the page. + - the prompt `Fetch https://www.scrapethissite.com and summarize the page.` + calls the `scrapeMarkdown` or `scrapeHtml` tool and summarizes the page. ## Publish diff --git a/README.md b/README.md index 54fd146..22f9965 100644 --- a/README.md +++ b/README.md @@ -143,24 +143,28 @@ your full account authority; OAuth scopes do not apply to it. ## Try it ```text -Fetch https://www.scrapethissite.com/pages/simple/ and summarize the page. +Fetch https://www.scrapethissite.com and summarize the page. ``` The server provides these tools. OpenCode 1 shows them as `mrscraper_`; OpenCode 2 reaches MCP tools through Code Mode by default. -| Tool | Purpose | +| Tool | Description | | --- | --- | -| `scraperAPI` | Retrieve a known page as HTML, Markdown, a screenshot, or a combination. | -| `webSearch` | Discover public pages through web search. | -| `status` | Inspect subscription status, token usage, and remaining tokens. | +| `status` | Return the raw account status API response without summarizing, redacting body fields, or adding calculated fields. | +| `scrapeHtml` | Retrieve the raw HTML of a page. Browser rendering is optional. | +| `scrapeMarkdown` | Retrieve a page as Markdown. Including HTML also enables browser rendering and returns both outputs as JSON. | +| `getScreenshot` | Capture a base64 screenshot of the full page or top viewport. Browser rendering is always enabled. | +| `scrapeBrand` | Extract a website's colors, typography, logos, and social links as JSON. | +| `scrapeJson` | Extract structured JSON from a page using a natural-language prompt. Append Json Schema: and a JSON schema to shape the output. | +| `webSearch` | Search the web and return ranked results with titles, URLs, descriptions, and sources. | ## Retrieve-first routing When a public URL is already known, the skills direct OpenCode to retrieve it -with `scraperAPI` first and treat the raw response as the source of truth. The -agent can read, summarize, compare, or derive structured output locally without -losing details. +with `scrapeMarkdown` or `scrapeHtml` first and treat the raw response as the +source of truth. The agent can read, summarize, compare, or derive structured +output locally without losing details. For roughly 100 known pages with a shared layout, the agent can retrieve pages concurrently, retain every raw response, and apply one reusable local @@ -194,7 +198,7 @@ To control updates, pin a version and change it when you upgrade: ```json { - "plugin": ["@mrscraper/opencode@0.3.0"] + "plugin": ["@mrscraper/opencode@0.5.0"] } ``` diff --git a/package-lock.json b/package-lock.json index fa4aeca..a192271 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mrscraper/opencode", - "version": "0.4.0", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mrscraper/opencode", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "devDependencies": { "@opencode-ai/plugin": "1.19.0", diff --git a/package.json b/package.json index 8908b19..c586a00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mrscraper/opencode", - "version": "0.4.0", + "version": "0.5.0", "description": "MrScraper for OpenCode: the hosted MrScraper MCP server plus fetch-first skills for web scraping, structured data extraction, and web search.", "type": "module", "main": "index.ts", diff --git a/skills/mrscraper-fetch/SKILL.md b/skills/mrscraper-fetch/SKILL.md index 52eead1..6717113 100644 --- a/skills/mrscraper-fetch/SKILL.md +++ b/skills/mrscraper-fetch/SKILL.md @@ -1,38 +1,22 @@ --- name: mrscraper-fetch description: | - Retrieve a known public URL with MrScraper's scraperAPI tool as HTML, Markdown, a screenshot, or a combination. Use for reading, summarizing, archiving, or analyzing a page and before local extraction; supports automatic browser fallback, real-device routing, proxies, and retries. Use mrscraper-serp when no URL is known. + Retrieve a known public URL with MrScraper MCP as HTML, Markdown, a screenshot, brand data, or structured JSON. Use for reading, summarizing, archiving, or extracting a page; supports browser rendering, page and proxy countries, selector waits, and retry limits. Use mrscraper-serp when no URL is known. --- # Retrieve Page Content with MrScraper MCP -Use the scraperAPI tool supplied by the MrScraper MCP server whenever the user -already has a public URL. Keep using the retrieved content for summarization, -comparison, transformation, and structured output. Use +Use the MrScraper MCP tool that matches the requested representation whenever +the user already has a public URL. Keep using the retrieved content for +summarization, comparison, transformation, and structured output. Use [mrscraper](../mrscraper/SKILL.md) for connection and authentication checks, account status, or broader routing, and [mrscraper-serp](../mrscraper-serp/SKILL.md) when discovery must happen first. -## Page Retrieval Context - -scraperAPI calls MrScraper's -[page-fetching service](https://docs.mrscraper.com/docs/features/unblocker) once. -Browser rendering executes page JavaScript, geographic routing selects the -proxy country, selector waits let delayed content appear, and homepage -navigation visits the site root before the target. Real-device routing (super) -is independent of browser rendering. - -Use scraperAPI only for content the user is authorized to access and in -accordance with the site's requirements. - -Start with the URL alone and add only the controls the target needs. Plan-token -usage is based on runtime and bandwidth: one token per 30 seconds and one token -per 0.25 MB, rounded up per component. Resource blocking can reduce bandwidth -for text-focused pages. Retries stop when the request succeeds, max_retries is -reached, or the running token total reaches token_cap. The initial request -always runs even when it exceeds that cap. See the -[Token Plan](https://docs.mrscraper.com/docs/getting-started/api-token) for the -maintained calculation. +Use these tools only for content the user is authorized to access and in +accordance with the site's requirements. Browser rendering loads a page; it +does not click controls, submit forms, or provide an authenticated interactive +browser session. ## Step 1 — Define the Outcome @@ -41,153 +25,140 @@ Confirm the target URL and what the user wants: - Read, summarize, cite, or inspect the page. - Check whether specific text appears. - Archive the page or capture a screenshot. -- Produce fields, JSON, tables, or other structured output with local logic. -- Load JavaScript-rendered or geo-sensitive content. +- Produce fields, JSON, tables, or other structured output. +- Get the site's brand colors, typography, logos, and social links. +- Load JavaScript-rendered or country-specific content. When many pages share a layout, retrieve representative pages, define one local extractor, retrieve the remaining pages in parallel when safe and proportional, and apply the same extractor to every saved response. -## Step 2 — Retrieve the Page +## Step 2 — Choose the Tool + +| Tool | Description | data in the response | +| --- | --- | --- | +| scrapeHtml | Retrieve the raw HTML of a page. Browser rendering is optional. | HTML text. | +| scrapeMarkdown | Retrieve a page as Markdown. Including HTML also enables browser rendering and returns both outputs as JSON. | Markdown text; with html set to true, an object with html and markdown. | +| getScreenshot | Capture a base64 screenshot of the full page or top viewport. Browser rendering is always enabled. | An object with screenshot and the requested html and markdown. | +| scrapeJson | Extract structured JSON from a page using a natural-language prompt. Append Json Schema: and a JSON schema to shape the output. | The extracted data in data.data, with run metadata. | +| scrapeBrand | Extract a website's colors, typography, logos, and social links as JSON. | The brand in data.data.brand. | + +The client may namespace the tool names; select the tool from the MrScraper MCP +provider. Start with the URL alone and add only the inputs the outcome needs. -The client may namespace the tool name; select scraperAPI from the MrScraper -MCP provider. Start with one call containing only the required URL, which -requests HTML: +scrapeMarkdown for readable text: { - "url": "https://www.scrapethissite.com/pages/simple/" + "url": "https://example.com" } -Request Markdown instead of HTML for readable text: +scrapeHtml rendered in a browser, waiting for an element: { - "url": "https://www.scrapethissite.com/pages/simple/", - "html": false, - "markdown": true + "url": "https://example.com", + "browserRendering": true, + "waitForSelector": "body" } -The result is available in MCP structuredContent and as formatted JSON text. -The requested representations are in data: +scrapeMarkdown with the page HTML as well: { - "status_code": 200, - "data": { - "html": "...", - "markdown": null, - "screenshot": null, - "token_usage": 3, - "runtime": 18.02, - "retry_count": 0, - "error": null - }, - "headers": { - "x-status-code": "200" - } + "url": "https://example.com", + "html": true } -Prefer structuredContent. Check isError, error, status_code, and -headers["x-status-code"] (the target page's status) before using data. - -A screenshot is a base64 JPEG that can be large. Request it only when the user -needs an image, and save it to a file rather than reading it into the -conversation: +getScreenshot of the top viewport, with Markdown instead of HTML: { - "url": "https://www.scrapethissite.com/pages/simple/", + "url": "https://example.com", + "screenshot": "top", "html": false, - "screenshot": true + "markdown": true } -## Step 3 — Choose Page-Loading Options - -Omit browser_rendering to let the service choose: it falls back to a browser -automatically when needed. true forces a browser and false disables it. -screenshot=true always uses a browser. +A screenshot is base64 image data that can be large. Request it only when the +user needs an image, and save it to a file rather than reading it into the +conversation. -Use real-device routing when routing may be the problem: +scrapeJson with a prompt; append Json Schema: and a JSON schema to shape the +output: { - "url": "https://www.scrapethissite.com/pages/simple/", - "super": true + "url": "https://example.com", + "prompt": "Extract the first 2 items with title and price. Json Schema: {\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"},\"price\":{\"type\":\"string\"}},\"required\":[\"title\",\"price\"]}}" } -Wait for delayed content with a CSS selector: - - { - "url": "https://www.scrapethissite.com/pages/ajax-javascript/#2015", - "browser_rendering": true, - "wait_for_selector": ".film" - } +The prompt describes the data to extract from the loaded page; it does not +navigate, click, or sign in. Without a prompt, scrapeJson extracts all data as +completely as possible. Long prompts are sent in a request body automatically. -Use geographic routing or homepage navigation when the target requires it: +scrapeBrand takes only the URL: { - "url": "https://www.scrapethissite.com/pages/simple/", - "geo_code": "ID", - "home_page": true + "url": "https://mrscraper.com" } -Bound resource use: +scrapeBrand waits up to 120 seconds. HTTP 422 with a settled job means the page +has no usable brand data. - { - "url": "https://www.scrapethissite.com/pages/ajax-javascript/#2015", - "block_resources": true, - "max_retries": 1, - "token_cap": 10, - "timeout": 60 - } +## Step 3 — Choose Page-Loading Options -### Parameters +scrapeHtml, scrapeMarkdown, getScreenshot, and scrapeJson share the page +inputs. scrapeBrand accepts only url. -| MCP input | Default | Request mapping | Use | +| MCP input | Tools | Default | Description | | --- | --- | --- | --- | -| url | required | Body url | Absolute HTTP or HTTPS target URL. | -| html | true | Query html | Request HTML content. | -| markdown | false | Query markdown | Request Markdown content. | -| screenshot | false | Query screenshot | Capture a base64 JPEG; forces browser rendering. | -| browser_rendering | automatic | Query browserRendering | true forces and false disables browser rendering. | -| super | false | Query super | Real-device routing, independent of browser rendering. | -| geo_code | US | Query geoCode | Proxy country, such as US, ID, or SG. | -| proxy_country | omitted | Query proxyCountry | Compatibility country option. | -| use_proxy | true | Query useProxy | Set false to skip the service's configured proxy. | -| proxy | omitted | Query proxy | Custom proxy as username:password@host:port. | -| wait_for_selector | omitted | Query waitForSelector | CSS selector to wait for. | -| home_page | false | Query warmStart | Visit the site root before the target page. | -| block_resources | false | Query blockResources | Block images, CSS, and fonts. | -| bypass_proxy | false | Query bypassProxy | Enable the proxy-bypass behavior. | -| cookie_jar | omitted | Query cookieJar | Cookie configuration string. | -| headers | omitted | Query headers | Target page request headers as an object or JSON string. | -| max_retries | 3 | Body maxRetries | Maximum retries; zero disables retries. | -| token_cap | omitted | Body tokenCap | Running token total that stops further retries. | -| timeout | 120 | Query timeout | Page timeout from 1 to 300 seconds. | -| stream | omitted | Query stream | Ask the API to stream; the response is still returned once. | -| discard_token_secret | empty | Header x-discard-token-secret | Optional upstream header. | +| url | All | Required | Absolute HTTP or HTTPS URL of the page to process. | +| timeout | HTML, Markdown, screenshot, JSON | 300 | Page load timeout in seconds, from 1 to 300. The HTTP request allows 30 additional seconds. | +| geoCode | HTML, Markdown, screenshot, JSON | "us" | Two-letter country code to load the page from, sent in lowercase. | +| proxyCountry | HTML, Markdown, screenshot, JSON | "us" | Two-letter country code of the proxy server, sent in lowercase. | +| super | HTML, Markdown, screenshot, JSON | false | Whether to route the request through real devices. | +| waitUntil | HTML, Markdown, screenshot, JSON | "domcontentloaded" | Navigation completion event to wait for: domcontentloaded, load, networkidle0, or networkidle2. | +| proxy | HTML, Markdown, screenshot, JSON | Omitted | Custom proxy URL used to load the page. | +| maxRetries | HTML, Markdown, screenshot, JSON | Omitted | Maximum number of retries, as a nonnegative integer. Omit this parameter for no limit. | +| saveResult | HTML, Markdown, screenshot, JSON | false | Whether to save the result to the dashboard Result tab. | +| blockResources | HTML, Markdown, screenshot | false | Whether to block images, fonts, and stylesheets while loading the page. | +| waitForSelector | HTML, Markdown, screenshot | Omitted | Wait for the page to contain the specified CSS selector before returning the result. | +| returnCookie | HTML, Markdown, screenshot | false | Whether to include browser session cookies in the response. | +| browserRendering | HTML, Markdown, JSON | false | Whether to render the page in a browser before returning the result. | +| warmStart | HTML, Markdown | false | Whether to enable warm start for more reliable scraping, at the cost of additional latency. | +| html | Markdown, JSON | false | Whether to include the page HTML in the response. | +| html | Screenshot | true | Whether to include the page HTML in the response. | +| markdown | Screenshot | false | Whether to include the page Markdown in the response. | +| screenshot | Screenshot | "full" | Screenshot area to capture: full for the entire page or top for the top viewport. | +| screenshot | JSON | false | Whether to include a base64 screenshot in the response. | +| prompt | JSON | "Extract all data as complete as possible." | Instructions describing the data to extract. Append Json Schema: and a JSON schema to shape the output. | + +In the Tools column, HTML is scrapeHtml, Markdown is scrapeMarkdown, screenshot +is getScreenshot, and JSON is scrapeJson. Authentication is handled by the MCP client's OAuth 2.1 connection and is never a tool input. ## Step 4 — Inspect and Retry Deliberately -Start with the URL alone unless the task already establishes a requirement. If -the response fails, is blocked, incomplete, or missing dynamic content: - -1. Inspect status_code, data.error, headers["x-status-code"], and the content. -2. Change one axis at a time: force or disable browser_rendering, or set super - when routing may be the problem. -3. Add wait_for_selector, geo_code, or home_page only when evidence shows that - the target requires it. +Prefer structuredContent. Check isError, error, status_code, and +headers["x-status-code"] (the target page's status) before using data. If the +response fails, is blocked, incomplete, or missing dynamic content: + +1. Inspect status_code, error, headers["x-status-code"], and the content. +2. Change one input at a time: set browserRendering, wait for a later + waitUntil event, or add waitForSelector for content that loads late. +3. Set geoCode or proxyCountry only when evidence shows that the page differs + by country. Set super or warmStart when routing or a cold start may be the + problem. 4. Stop after a usable response unless the user requests a comparison. -Do not repeat an identical request. Treat wait_for_selector as a CSS selector, -not a duration. Browser rendering loads a page; it does not click controls, -submit forms, or provide an authenticated interactive browser session. +Do not repeat an identical request. Treat waitForSelector as a CSS selector, +not a duration. Omitting maxRetries means no retry limit; set a small number +when the user wants to bound retries. ## Step 5 — Deliver the Result Answer the user's request from data. Keep the full envelope when headers or diagnostics matter. When the user requests an archive, save the successful response or the requested field with the environment's local file-writing -capability; scraperAPI itself has no output-path input. +capability; the tools have no output-path input. Keep retrieved content as the source of truth for later steps. Build summaries, tables, JSON transformations, and extraction scripts from it, and diff --git a/skills/mrscraper-serp/SKILL.md b/skills/mrscraper-serp/SKILL.md index 41ada1c..8a2aad9 100644 --- a/skills/mrscraper-serp/SKILL.md +++ b/skills/mrscraper-serp/SKILL.md @@ -7,51 +7,49 @@ description: | # Discover Pages with MrScraper MCP Web Search Use the webSearch tool supplied by the MrScraper MCP server when a task begins -with a search query rather than a known target URL. Use +with a search query rather than a known target URL. webSearch: Search the web +and return ranked results with titles, URLs, descriptions, and sources. Use [mrscraper](../mrscraper/SKILL.md) for connection troubleshooting, account status, or broader routing. ## Step 1 — Build the Query -Pass the query in url. Include the important entity, attribute, location, or -date: +Pass the query text in query. Include the important entity, attribute, +location, or date: { - "url": "web scraping best practices" + "query": "web scraping best practices" } -The input can also be a search results URL; its q parameter becomes the query. - ## Step 2 — Set the Country and Result Count -Set region to a two-letter country code when results must come from one +Set country to a two-letter country code when results must come from one country. It defaults to us: { - "url": "running shoes", - "region": "id" + "query": "running shoes", + "country": "id" } The search returns 10 results by default. Ask for more, up to 100, only when the user needs broader coverage: { - "url": "running shoes", - "region": "id", - "num_results": 30 + "query": "site:example.com documentation", + "country": "id", + "numResults": 20 } ### Parameters -| MCP input | Default | Request mapping | Use | -| --- | --- | --- | --- | -| url | required | Body query | Search query, or a search results URL whose q value is used. | -| region | us | Body country | Two-letter result country, such as us or id. | -| num_results | 10 | Body numResults | Number of results, from 10 to 100; fewer may come back. | -| timeout | 600 | MCP upstream deadline | Maximum wait in seconds; not sent in the search body. | +| MCP input | Default | Description | +| --- | --- | --- | +| query | Required | Search query text, trimmed before sending, containing 1 to 1000 characters. | +| country | "us" | Two-letter country code to search from, sent in lowercase. | +| numResults | 10 | Number of search results to request, as an integer from 10 to 100. Fewer results may be returned. | -Authentication is handled by the MCP client's OAuth 2.1 connection and is -never a tool input. +A search waits up to 120 seconds. Authentication is handled by the MCP client's +OAuth 2.1 connection and is never a tool input. ## Step 3 — Inspect the Results @@ -76,12 +74,8 @@ coverage. If the user only requested URL discovery, stop after the search. ## Step 5 — Handle Weak or Missing Results -- Set region when the results come from the wrong country. +- Set country when the results come from the wrong country. - Rewrite noisy queries around the important entity, attribute, and location. -- Raise num_results only after checking the first results. -- Increase timeout when the MCP request deadline is too short. +- Raise numResults only after checking the first results. - Use [mrscraper](../mrscraper/SKILL.md) when the connection or authentication fails. - -webSearch is for public web search, not for discovering URLs within one -known site. diff --git a/skills/mrscraper/SKILL.md b/skills/mrscraper/SKILL.md index 0c60b51..7c869e3 100644 --- a/skills/mrscraper/SKILL.md +++ b/skills/mrscraper/SKILL.md @@ -1,7 +1,7 @@ --- name: mrscraper description: | - Connect, authenticate, route, and troubleshoot MrScraper MCP, and check account usage with the status tool. For known public URLs, retrieve and preserve page content with mrscraper-fetch first; use mrscraper-serp for query-first discovery through web search. + Connect, authenticate, route, and troubleshoot MrScraper MCP, and check account usage with the status tool. For a known public URL, retrieve HTML, Markdown, a screenshot, brand data, or structured JSON with mrscraper-fetch; use mrscraper-serp for query-first discovery through web search. --- # MrScraper MCP @@ -10,12 +10,24 @@ Use this skill for connection and authentication checks, tool selection, shared response handling, account status, and troubleshooting. Load the focused fetch or SERP skill for page retrieval and web search. +MrScraper MCP has six scraping and search tools, plus account status: + +| Tool | Description | +| --- | --- | +| status | Return the raw account status API response without summarizing, redacting body fields, or adding calculated fields. | +| scrapeHtml | Retrieve the raw HTML of a page. Browser rendering is optional. | +| scrapeMarkdown | Retrieve a page as Markdown. Including HTML also enables browser rendering and returns both outputs as JSON. | +| getScreenshot | Capture a base64 screenshot of the full page or top viewport. Browser rendering is always enabled. | +| scrapeBrand | Extract a website's colors, typography, logos, and social links as JSON. | +| scrapeJson | Extract structured JSON from a page using a natural-language prompt. Append Json Schema: and a JSON schema to shape the output. | +| webSearch | Search the web and return ranked results with titles, URLs, descriptions, and sources. | + ## Step 1 — Verify or Connect MrScraper MCP -Check whether the current client exposes these three tools from the MrScraper +Check whether the current client exposes these seven tools from the MrScraper MCP provider: - scraperAPI webSearch status + status scrapeHtml scrapeMarkdown getScreenshot scrapeBrand scrapeJson webSearch The client may display server-qualified names. Match the provider and unqualified tool name; do not assume a fixed namespace. @@ -28,8 +40,10 @@ the managed Streamable HTTP endpoint: A self-managed deployment may expose the same tools over Streamable HTTP or stdio. Connection setup belongs to the MCP client. After setup or reconnection, -list the available tools and confirm all three names before claiming the -integration is ready. +list the available tools and confirm all seven names before claiming the +integration is ready. A client that still lists scraperAPI has cached the +previous tool list; start a new session or reconnect so it loads the current +tools. ## Step 2 — Authenticate @@ -47,33 +61,41 @@ Never place credentials in tool arguments, print them, write them into project artifacts, or manually reproduce the OAuth exchange. Do not configure an API-key or bearer-token fallback from these skills. -The connection uses three scopes: scrape:write for scraperAPI, scrape:read for -webSearch, and account:read for status. A tool called without its scope returns +The connection uses two scopes: scraper:read for the six scraping and search +tools, and account:read for status. A tool called without its scope returns 403 insufficient_scope; reauthorize the connection so the client requests it. +Connections authorized with the older scrape:read and scrape:write scopes must +be authorized again. Verify end-to-end access with status, which reads the account without retrieving a page: {} -A successful account summary confirms that the connection can authenticate and -reach MrScraper. If it fails, report the error and do not claim setup is -complete. +A successful response confirms that the connection can authenticate and reach +MrScraper. If it fails, report the error and do not claim setup is complete. ## Step 3 — Route the Request | User outcome | MCP tool or skill | | --- | --- | -| Retrieve and preserve a known public page as HTML, Markdown, or a screenshot | [mrscraper-fetch](../mrscraper-fetch/SKILL.md) with scraperAPI | +| Read, summarize, or preserve a known public page | [mrscraper-fetch](../mrscraper-fetch/SKILL.md) with scrapeMarkdown, or scrapeHtml when the page structure matters | +| Capture what a page looks like | [mrscraper-fetch](../mrscraper-fetch/SKILL.md) with getScreenshot | +| Extract specific fields from a page as JSON | [mrscraper-fetch](../mrscraper-fetch/SKILL.md) with scrapeJson, or local extraction from retrieved content | +| Get a website's colors, typography, logos, and social links | [mrscraper-fetch](../mrscraper-fetch/SKILL.md) with scrapeBrand | | Discover relevant pages from a web search query | [mrscraper-serp](../mrscraper-serp/SKILL.md) with webSearch, then retrieve selected pages | | Check the plan, token usage, or remaining tokens | status | ### Retrieve first, extract locally -scraperAPI returns raw page content. Produce summaries, tables, JSON, and other -structured output from that content with local analysis or extraction logic. -The raw response preserves complete page context for later questions, -validation, and changes to the requested schema. +scrapeHtml and scrapeMarkdown return raw page content. Produce summaries, +tables, JSON, and other structured output from that content with local analysis +or extraction logic. The raw response preserves complete page context for later +questions, validation, and changes to the requested schema. + +Use scrapeJson when the user asks MrScraper to extract the data, or when a +prompt-driven extraction is clearly simpler than local logic. Keep the raw page +as well when later questions may need details that the extraction leaves out. Prefer this workflow for pages with a shared layout: @@ -95,8 +117,8 @@ for those. ## Step 4 — Handle Output and Artifacts -scraperAPI and webSearch return the same response envelope in MCP -structuredContent and in a formatted JSON text block: +Every tool returns the same response envelope in MCP structuredContent and in a +formatted JSON text block: { "status_code": 200, @@ -104,58 +126,73 @@ structuredContent and in a formatted JSON text block: "headers": {} } -Prefer structuredContent when available. An API failure adds error and sets the -MCP result's isError flag. An input-contract failure is returned as a tool -error. Check those signals before trusting data. Credential-bearing headers and -credential metadata are removed from responses. +data holds the API response body: HTML or Markdown text from scrapeHtml and +scrapeMarkdown, and JSON from the other tools. Prefer structuredContent when +available. An HTTP or network failure adds error and sets the MCP result's +isError flag; a network failure has status_code null. Invalid inputs are +rejected before any request is sent. Check those signals before trusting data. +Credential-bearing response headers are removed. MrScraper tools do not accept output paths. When the user requests an artifact, wait for a successful tool result, select the requested value, and save it with -the environment's local file-writing capability. A screenshot is a base64 JPEG -in data.screenshot; decode it before saving an image. +the environment's local file-writing capability. A screenshot is base64 image +data in data.screenshot; decode it before saving an image. Save substantial intermediate artifacts under the current project's .mrscraper directory unless the user specifies another location. This project artifact directory is unrelated to MCP connection credentials. Keep artifacts out of version control unless the user asks to commit them. +saveResult defaults to false. Set it to true only when the user wants a +scraping result kept in the MrScraper dashboard Result tab. + ## Step 5 — Review Account Usage Call status with an empty object: {} -The result summarizes the subscription status, token limit, token usage, -remaining tokens, usage percentage, rate limit, auto-renewal, renewal date, -and the account's name, email, and verification state: +data is the raw account status response, without summaries or calculated +fields. Account details are in data.data, including tokenLimit, tokenUsage, +subscriptionItem, and scraperAllowance: { - "kind": "mrscraper-cli-status-summary", "status_code": 200, "data": { - "account": { - "subscription_status": "active", - "token_usage": 250, - "token_limit": 1000, - "token_remaining": 750, - "usage_percent": 25 + "message": "...", + "data": { + "tokenLimit": 100000, + "tokenUsage": 2500, + "stripeStatus": "active", + "subscriptionItem": { + "name": "...", + "tokenLimit": 100000 + }, + "scraperAllowance": { + "remaining": 97500 + } } - } + }, + "headers": {} } +Report the fields the user asked about. The response also carries account +identity and billing identifiers; do not repeat them unless the user asks. Check remaining tokens before a large batch of page retrievals. status reports account usage, not the progress of a request. ## Step 6 — Troubleshoot - Missing tools: enable or reconnect the MrScraper MCP connection, then confirm - scraperAPI, webSearch, and status are exposed. + all seven tools are exposed. - Unauthorized or expired authorization: reauthorize the OAuth 2.1 connection through the MCP client. -- 403 insufficient_scope: reauthorize so the client requests the missing scope. +- 403 insufficient_scope: reauthorize so the client requests scraper:read for + scraping and search, or account:read for status. - Input-contract error: inspect the tool schema and omit inputs that do not - apply. The previous fetch, scrape, serp, rerun, results, and result tools were - replaced by scraperAPI, webSearch, and status. + apply. scraperAPI was replaced by scrapeHtml, scrapeMarkdown, and + getScreenshot; brand and JSON extraction are scrapeBrand and scrapeJson; and + webSearch takes query, country, and numResults. - Page incomplete or missing dynamic content: load mrscraper-fetch and revise page-loading inputs deliberately. - Search results weak: load mrscraper-serp and refine the query, country, or