Skip to Content
MCP GatewayConnect n8n

Connect n8n

n8n  is a workflow automation tool. It has an MCP node built in, so an n8n workflow can call Scrapewise directly — search Google and Amazon, find local businesses, read a page, read your saved rows — and send the result on to Google Sheets, Slack, a database or anything else n8n connects to.

No AI model is needed. The node calls one Scrapewise tool you choose yourself, with the arguments you give it. You do not need an OpenAI key or an AI Agent node.

If you want a finished workflow rather than a blank one, take one of the six ready-made templates and skip to step 3.

Prerequisites

  • n8n 1.80 or newer (n8n Cloud, or self-hosted). Older versions do not have the MCP node.
  • A Scrapewise API key. Scope LLM_READ is enough to get data; LLM_FULL is needed to create or run scrapers. See Scopes.

1. Add the credential

In n8n, open Credentials → Create credential → search for Bearer Auth.

FieldValue
NameScrapewise API key
Bearer Tokenyour full key, for example sw_live_abc1234.your-secret-here

Paste the key on its own. Do not type the word Bearer in front of it — n8n adds that.

2. Add the node

Add a node and search for MCP Client Tool. Set it up like this:

FieldValue
Endpoint URLhttps://mcp.scrapewise.ai/mcp
Server TransportHTTP Streamable
AuthenticationBearer Auth
CredentialScrapewise API key
Operation / Toolthe tool you want, for example search_amazon

The node then lists the Scrapewise tools in a dropdown, so you can confirm the connection is live before you run anything.

Which address to use

AddressWhat you get
https://mcp.scrapewise.ai/mcpThe short data list — Google, Amazon, Maps, trends, fetch a page, read saved rows
https://mcp.scrapewise.ai/mcp?toolsets=outcome,adminThe same, plus every tool that creates, edits and runs scrapers

An account that gets its first MCP key now lists only the short data list at the first address. Accounts that still hold an older MCP key keep every tool there. Check the spelling: a misspelt switch such as ?toolset=admin is ignored without an error. More: the toolsets switch.

3. Pass the arguments

Switch the node’s input to JSON and write the arguments as JSON. Almost every Scrapewise tool takes its arguments inside a body object:

{ "body": { "queries": ["lego duplo"], "marketplace": "de", "pages": 1, "quote_only": false } }

Three tools are different and take their arguments at the top level, with no body:

ToolArguments
get_resultsjobId
cancel_jobjobId
scrapewise_get_scraper_data_group_clientid, page, size, sort, filters, categories

You can build the JSON from earlier nodes with n8n expressions. The safest way is to let n8n do the quoting for you:

{{ JSON.stringify({ body: { queries: $json.keywords, marketplace: 'de', pages: 1 } }) }}

4. Read the answer

The answer is JSON. Depending on your n8n version it arrives already parsed in structuredContent, or as a string in content[0].text. Handle both in a Code node:

function payloadOf(item) { const j = item.json || {}; if (j.structuredContent) return j.structuredContent; if (Array.isArray(j.content) && j.content[0] && typeof j.content[0].text === 'string') { try { return JSON.parse(j.content[0].text); } catch (e) { return {}; } } return j; }

Inside, the rows are under rows (or under content when you read a group’s saved data, because that answer is a page). Every scraped string is wrapped in an envelope so you can tell page text apart from your own data:

{ "type": "scraped", "content": "LEGO Duplo Town", "origin": "amazon.de", "truncated": false }

Unwrap it before writing it to a sheet:

function plain(v) { if (v && typeof v === 'object' && v.type === 'scraped') return v.content || ''; return v; }

The wrapper is there on purpose: it marks text a stranger wrote on a web page. Never let a later AI step treat it as an instruction. See Prompt injection.

5. Handle the background job

A small request answers straight away with status: "DONE" and the rows. A bigger one answers with status: "RUNNING" and a job_id, and the rows are fetched later. Two ways to deal with it:

  • Wait and collect. An If node on status != "RUNNING"; the running branch goes to a Wait node and then an MCP node calling get_results with the job_id.
  • Keep it small. One keyword and one page usually answers straight away.

Templates 3 and 4 show both patterns.

Verify

Add a node calling scrapewise_get_scraper_group_list with an empty {} input and execute it. The tool is free and is on both tool lists. An empty list on a new account still proves the connection works.

Troubleshooting

The tool dropdown is empty

The node could not reach the gateway or could not authenticate. Check the Endpoint URL has no trailing space, and that the Bearer Token is the full sw_live_<prefix>.<secret> string with no Bearer prefix.

HTTP 401

Bad key. Re-copy it from the portal.

HTTP 403 scope_rejected

The key has USER scope. MCP needs LLM_READ or higher. Creating or running scrapers needs LLM_FULL.

HTTP 402

The wallet has no balance and no free requests left. See what a tool call costs.

No tool that creates or runs a scraper

The account shows the short data list. Change the Endpoint URL to https://mcp.scrapewise.ai/mcp?toolsets=outcome,admin and reopen the dropdown. If they are still missing, the key is LLM_READ — building needs LLM_FULL.

The Code node gets nothing

You read $json.rows directly. The rows sit inside the MCP envelope — use the payloadOf helper above. When reading a group’s saved data the rows are under content, not rows.

It charged twice when I retried

Send the same idempotency_key in body on the retry. Identical requests within 24 hours are charged once.

What’s next