mcp-scraper 0.80.0 → 0.83.0

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +59 -1
  2. package/README.md +4 -2
  3. package/dist/{analytics-repository-YOY5KMOD.js → analytics-repository-GA6P5S5J.js} +1 -1
  4. package/dist/bin/api-server.js +3 -3
  5. package/dist/bin/mcp-scraper-cli.js +61 -46
  6. package/dist/bin/mcp-scraper-core.js +7 -7
  7. package/dist/bin/mcp-scraper-install.js +2 -2
  8. package/dist/bin/mcp-stdio-server.js +7 -7
  9. package/dist/bin/paa-harvest.js +2 -2
  10. package/dist/{chunk-PMONKQGJ.js → chunk-4NZ6JFK5.js} +2 -2
  11. package/dist/{chunk-VEQPA65D.js → chunk-ACDNW7TG.js} +1 -1
  12. package/dist/{chunk-ID7J23WP.js → chunk-AIVNZZO3.js} +4 -3
  13. package/dist/{chunk-VXLU74YZ.js → chunk-BGD7U3AE.js} +207 -1
  14. package/dist/{chunk-HEUMDX4I.js → chunk-CNAJWRJT.js} +131 -1
  15. package/dist/{chunk-YPOOARYN.js → chunk-FUG2IRKP.js} +1 -1
  16. package/dist/{chunk-XBEUZJHS.js → chunk-HGJJQY24.js} +49 -5
  17. package/dist/{chunk-KNGTQD6U.js → chunk-NH4QAH3X.js} +3 -1
  18. package/dist/{chunk-5UAFBKJR.js → chunk-OPQIGAFB.js} +24 -5
  19. package/dist/{chunk-OY25W46Q.js → chunk-QSZXAA5F.js} +3121 -2222
  20. package/dist/{chunk-P4447RNF.js → chunk-UXVT7FWW.js} +2 -2
  21. package/dist/{chunk-62W6UER7.js → chunk-ZHPGPVJJ.js} +2 -2
  22. package/dist/{extract-bundle-232SA7MI.js → extract-bundle-HTWWJD6N.js} +2 -2
  23. package/dist/{gmail-service-IMUHMRH4.js → gmail-service-VXE7OYNA.js} +3 -3
  24. package/dist/index.cjs +23 -5
  25. package/dist/index.js +2 -2
  26. package/dist/{server-XBRLYGTR.js → server-ICMRDYI4.js} +4789 -2842
  27. package/dist/{site-extract-repository-VDONDDMR.js → site-extract-repository-Y5WQFSQW.js} +6 -2
  28. package/dist/{worker-ICCZR443.js → worker-FM3ZRDY4.js} +3 -3
  29. package/package.json +6 -2
  30. package/public/.well-known/xray-install.json +178 -0
  31. package/public/agent-install.md +194 -0
@@ -1,4 +1,5 @@
1
1
  import {
2
+ XRAY_ENTITLED_EXTRACT_BILLING_CLASS,
2
3
  abandonExtractSettlement,
3
4
  claimFailedExtractJobForRefinalize,
4
5
  completeExtractJob,
@@ -9,6 +10,7 @@ import {
9
10
  failExtractJob,
10
11
  failStaleRunningExtractJob,
11
12
  failUnfundedExtractJob,
13
+ finalizeXRayEntitledExtractJobCharge,
12
14
  finishExtractJob,
13
15
  getExtractJob,
14
16
  getExtractJobByIdempotencyKey,
@@ -28,11 +30,12 @@ import {
28
30
  setExtractJobTotal,
29
31
  settleExtractJob,
30
32
  terminalExtractJobStatus
31
- } from "./chunk-XBEUZJHS.js";
33
+ } from "./chunk-HGJJQY24.js";
32
34
  import "./chunk-DNM65UCK.js";
33
- import "./chunk-PMONKQGJ.js";
35
+ import "./chunk-4NZ6JFK5.js";
34
36
  import "./chunk-YXNDOQXN.js";
35
37
  export {
38
+ XRAY_ENTITLED_EXTRACT_BILLING_CLASS,
36
39
  abandonExtractSettlement,
37
40
  claimFailedExtractJobForRefinalize,
38
41
  completeExtractJob,
@@ -43,6 +46,7 @@ export {
43
46
  failExtractJob,
44
47
  failStaleRunningExtractJob,
45
48
  failUnfundedExtractJob,
49
+ finalizeXRayEntitledExtractJobCharge,
46
50
  finishExtractJob,
47
51
  getExtractJob,
48
52
  getExtractJobByIdempotencyKey,
@@ -9,7 +9,7 @@ import {
9
9
  import "./chunk-OZJMVCDK.js";
10
10
  import {
11
11
  harvest
12
- } from "./chunk-KNGTQD6U.js";
12
+ } from "./chunk-NH4QAH3X.js";
13
13
  import {
14
14
  sanitizeAttempts,
15
15
  sanitizeHarvestResult
@@ -17,13 +17,13 @@ import {
17
17
  import {
18
18
  MC_COSTS,
19
19
  serpActualCostMc
20
- } from "./chunk-PMONKQGJ.js";
20
+ } from "./chunk-4NZ6JFK5.js";
21
21
  import {
22
22
  browserServiceApiKey
23
23
  } from "./chunk-OM7HVEJ3.js";
24
24
  import {
25
25
  runWithCostContext
26
- } from "./chunk-5UAFBKJR.js";
26
+ } from "./chunk-OPQIGAFB.js";
27
27
  import "./chunk-OWF2JJKN.js";
28
28
  import {
29
29
  claimPendingJob,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-scraper",
3
- "version": "0.80.0",
3
+ "version": "0.83.0",
4
4
  "description": "MCP server for MCP Scraper web intelligence tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,6 +30,8 @@
30
30
  "dist/*.d.cts",
31
31
  "dist/bin/*.js",
32
32
  "dist/editorial-reading-room/assets",
33
+ "public/agent-install.md",
34
+ "public/.well-known/xray-install.json",
33
35
  "README.md",
34
36
  "CHANGELOG.md"
35
37
  ],
@@ -57,6 +59,8 @@
57
59
  "mcp:measure-catalog": "node scripts/run-ts-sandbox-safe.mjs scripts/measure-mcp-catalog.ts",
58
60
  "mcp:lint-tools": "node scripts/run-ts-sandbox-safe.mjs scripts/lint-mcp-tool-craft.ts",
59
61
  "mcp:lint-tools:write": "node scripts/run-ts-sandbox-safe.mjs scripts/lint-mcp-tool-craft.ts --write",
62
+ "xray:install-contract": "node --import tsx scripts/generate-xray-install-contract.ts",
63
+ "xray:install-contract:check": "node --import tsx scripts/generate-xray-install-contract.ts --check",
60
64
  "api": "node scripts/run-ts-sandbox-safe.mjs bin/api-server.ts",
61
65
  "dev": "node scripts/run-ts-sandbox-safe.mjs src/cli.ts",
62
66
  "test": "vitest run tests/unit tests/contract",
@@ -97,7 +101,7 @@
97
101
  "assistant:deployment:preflight": "node --import tsx scripts/verify-personal-assistant-deployment-config.ts",
98
102
  "analytics:rollups": "node --import tsx scripts/run-analytics-rollups.ts",
99
103
  "test:mcp-output-contract": "vitest run --config vitest.mcp-output-contract.config.ts tests/unit/golden-payloads.test.ts tests/unit/mcp-formatter-structured.test.ts tests/unit/mcp-2026-stdio.test.ts",
100
- "mcp:verify": "npm run build && npm run mcp:manifest && npm run build:rates && npm run mcp:measure-catalog && npm run mcp:lint-tools && npm run test:mcp-output-contract && npm run typecheck && npm test && npm run package:verify-entrypoints",
104
+ "mcp:verify": "npm run xray:install-contract:check && npm run build && npm run mcp:manifest && npm run build:rates && npm run mcp:measure-catalog && npm run mcp:lint-tools && npm run test:mcp-output-contract && npm run typecheck && npm test && npm run package:verify-entrypoints",
101
105
  "prepack": "npm run mcp:verify",
102
106
  "package:verify-entrypoints": "node scripts/verify-package-entrypoints.mjs",
103
107
  "product:install": "node scripts/run-product-command.mjs install",
@@ -0,0 +1,178 @@
1
+ {
2
+ "schema": "https://mcpscraper.dev/schemas/xray-install-contract-v1.json",
3
+ "protocolVersion": "2.0.0",
4
+ "product": "Thorbit X-Ray",
5
+ "triggerPhrases": [
6
+ "Install X-Ray",
7
+ "Install X-Ray on this site and tell me what drives customers"
8
+ ],
9
+ "canonicalUrls": {
10
+ "markdown": "https://mcpscraper.dev/agent-install.md",
11
+ "json": "https://mcpscraper.dev/.well-known/xray-install.json",
12
+ "hostedMcp": "https://mcpscraper.dev/mcp"
13
+ },
14
+ "facade": {
15
+ "tool": "analytics_setup_site",
16
+ "initialCall": {
17
+ "startUrl": "<site URL>",
18
+ "goal": "Install X-Ray and tell me what drives customers"
19
+ },
20
+ "continuationRule": "Treat setupId plus revision as the durable continuation handle. Reuse both after approval, runtime publication, verification, retry, or return."
21
+ },
22
+ "topologies": {
23
+ "local_stdio": {
24
+ "label": "Local npm MCP process",
25
+ "authority": "The client starts MCP Scraper locally. After the one-time Pixel insertion, X-Ray setup publishes only owner-confirmed runtime configuration.",
26
+ "secretHandling": "Set MCP_SCRAPER_API_KEY in the local environment or client secret field. Never paste it into chat or commit it."
27
+ },
28
+ "hosted_remote": {
29
+ "label": "Hosted authenticated MCP",
30
+ "authority": "The hosted MCP inspects approved public pages and publishes owner-confirmed X-Ray runtime configuration. It cannot read or write a caller-local path.",
31
+ "secretHandling": "Use the MCP OAuth/connection flow. Never put a credential in a URL, prompt, or config shown in chat."
32
+ }
33
+ },
34
+ "hosts": [
35
+ {
36
+ "id": "codex",
37
+ "label": "Codex",
38
+ "supportedTopologies": [
39
+ "local_stdio",
40
+ "hosted_remote"
41
+ ],
42
+ "mcpConfigMode": "toml",
43
+ "workspaceRead": true,
44
+ "workspaceWrite": true,
45
+ "restartRequired": true,
46
+ "exactConfig": "[mcp_servers.mcp-scraper]\ncommand = \"npx\"\nargs = [\"-y\", \"--package\", \"mcp-scraper@latest\", \"mcp-scraper\"]\nenv_vars = [\"MCP_SCRAPER_API_KEY\"]",
47
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
48
+ "rollback": "Remove the mcp_servers.mcp-scraper table, then restart Codex. Pixel removal is a separate owner-controlled site action."
49
+ },
50
+ {
51
+ "id": "claude-code",
52
+ "label": "Claude Code",
53
+ "supportedTopologies": [
54
+ "local_stdio",
55
+ "hosted_remote"
56
+ ],
57
+ "mcpConfigMode": "command",
58
+ "workspaceRead": true,
59
+ "workspaceWrite": true,
60
+ "restartRequired": true,
61
+ "exactConfig": "claude mcp add mcp-scraper --scope user --env MCP_SCRAPER_API_KEY=\"$MCP_SCRAPER_API_KEY\" -- npx -y --package mcp-scraper@latest mcp-scraper",
62
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
63
+ "rollback": "Run: claude mcp remove mcp-scraper -s user. Pixel removal is a separate owner-controlled site action."
64
+ },
65
+ {
66
+ "id": "claude-desktop",
67
+ "label": "Claude Desktop",
68
+ "supportedTopologies": [
69
+ "local_stdio"
70
+ ],
71
+ "mcpConfigMode": "desktop_extension",
72
+ "workspaceRead": false,
73
+ "workspaceWrite": false,
74
+ "restartRequired": true,
75
+ "exactConfig": "Install https://mcpscraper.dev/downloads/mcp-scraper.mcpb and enter the API key only in Claude Desktop's protected configuration field.",
76
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
77
+ "rollback": "Remove the MCP Scraper extension in Claude Desktop. Pixel removal is a separate owner-controlled site action."
78
+ },
79
+ {
80
+ "id": "cursor",
81
+ "label": "Cursor",
82
+ "supportedTopologies": [
83
+ "local_stdio",
84
+ "hosted_remote"
85
+ ],
86
+ "mcpConfigMode": "json",
87
+ "workspaceRead": true,
88
+ "workspaceWrite": true,
89
+ "restartRequired": true,
90
+ "exactConfig": "{\n \"mcpServers\": {\n \"mcp-scraper\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"--package\",\n \"mcp-scraper@latest\",\n \"mcp-scraper\"\n ],\n \"env\": {\n \"MCP_SCRAPER_API_KEY\": \"${env:MCP_SCRAPER_API_KEY}\"\n }\n }\n }\n}",
91
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
92
+ "rollback": "Remove mcp-scraper from .cursor/mcp.json (or the user MCP settings), then restart Cursor."
93
+ },
94
+ {
95
+ "id": "windsurf",
96
+ "label": "Windsurf",
97
+ "supportedTopologies": [
98
+ "local_stdio"
99
+ ],
100
+ "mcpConfigMode": "json",
101
+ "workspaceRead": true,
102
+ "workspaceWrite": true,
103
+ "restartRequired": true,
104
+ "exactConfig": "{\n \"mcpServers\": {\n \"mcp-scraper\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"--package\",\n \"mcp-scraper@latest\",\n \"mcp-scraper\"\n ],\n \"env\": {\n \"MCP_SCRAPER_API_KEY\": \"${env:MCP_SCRAPER_API_KEY}\"\n }\n }\n }\n}",
105
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
106
+ "rollback": "Remove mcp-scraper from the Windsurf MCP configuration, then restart Windsurf."
107
+ },
108
+ {
109
+ "id": "cline",
110
+ "label": "Cline",
111
+ "supportedTopologies": [
112
+ "local_stdio"
113
+ ],
114
+ "mcpConfigMode": "json",
115
+ "workspaceRead": true,
116
+ "workspaceWrite": true,
117
+ "restartRequired": true,
118
+ "exactConfig": "{\n \"mcpServers\": {\n \"mcp-scraper\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"--package\",\n \"mcp-scraper@latest\",\n \"mcp-scraper\"\n ],\n \"env\": {\n \"MCP_SCRAPER_API_KEY\": \"${env:MCP_SCRAPER_API_KEY}\"\n }\n }\n }\n}",
119
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
120
+ "rollback": "Remove mcp-scraper from Cline MCP Servers, then restart the extension host."
121
+ },
122
+ {
123
+ "id": "user-action-only",
124
+ "label": "User-action-only MCP host",
125
+ "supportedTopologies": [
126
+ "hosted_remote"
127
+ ],
128
+ "mcpConfigMode": "handoff_only",
129
+ "workspaceRead": false,
130
+ "workspaceWrite": false,
131
+ "restartRequired": false,
132
+ "exactConfig": "{\n \"mcpServers\": {\n \"mcp-scraper\": {\n \"url\": \"https://mcpscraper.dev/mcp\"\n }\n }\n}",
133
+ "continuation": "Call analytics_setup_site with { \"startUrl\": \"<site URL>\", \"goal\": \"Install X-Ray and tell me what drives customers\" }; on every later call, reuse the returned setupId and revision.",
134
+ "rollback": "Disconnect MCP Scraper from the host. Pixel removal remains an owner-controlled site action."
135
+ }
136
+ ],
137
+ "tagBootstrap": {
138
+ "requirement": "one_global_pixel_once",
139
+ "ongoingConfiguration": "xray_runtime_manifest",
140
+ "sourceAccessRequiredAfterInstall": false,
141
+ "supportedInsertionPaths": [
142
+ "manual",
143
+ "tag_manager",
144
+ "cms_plugin",
145
+ "coding_host"
146
+ ]
147
+ },
148
+ "workflow": [
149
+ "Resolve Thorbit X-Ray entitlement and the target site without consuming MCP Scraper Credits.",
150
+ "Inspect the whole approved public site; enumerate distinct renderers, routes, and Pixel coverage.",
151
+ "Infer the business model and customer outcome, then propose one privacy-safe measurement plan.",
152
+ "If the Pixel is absent, return the canonical one-time tag and exact uncovered surfaces; do not claim ongoing control there.",
153
+ "Publish an approved measurement revision as a digest-bound runtime manifest; source or repository access is not required.",
154
+ "Verify route coverage, consent, PageViews, manifest convergence, bounded rule matches, and persisted definition/version evidence.",
155
+ "Require a separate exact-revision approval before any canary or real-visitor experiment activation.",
156
+ "Return first customer-journey answers when sufficient, or exact evidence-readiness thresholds when not.",
157
+ "On “improve”, propose one highest-value uncovered outcome, require approval when needed, and reverify."
158
+ ],
159
+ "safetyRules": [
160
+ "Never invent or hand-author tracking code; use the canonical product-authored Pixel snippet returned by analytics_setup_site.",
161
+ "Never ask for or print API keys, OAuth tokens, signed URLs, cookies, or other credentials.",
162
+ "Never call ad platforms directly or silently activate events, definitions, funnels, or delivery destinations.",
163
+ "Never treat a CTA click as a customer, sale, or revenue event without verified outcome evidence.",
164
+ "Never claim full-domain installation while an in-scope route or renderer is missing, excluded without approval, or unverifiable.",
165
+ "Never treat event-name presence as verification; require persisted definition ID and version evidence."
166
+ ],
167
+ "terminalStates": [
168
+ "complete",
169
+ "tag_required",
170
+ "input_required",
171
+ "approval_required",
172
+ "runtime_convergence_required",
173
+ "outcome_connection_required",
174
+ "not_ready",
175
+ "error"
176
+ ],
177
+ "protocolDigest": "sha256:8f2f59ecfa074c1b9a1aba042c43b1de7cd18ebb2354e1911ad8c8e4a936ea3e"
178
+ }
@@ -0,0 +1,194 @@
1
+ # Install Thorbit X-Ray
2
+
3
+ Protocol version: 2.0.0
4
+ Protocol digest: sha256:8f2f59ecfa074c1b9a1aba042c43b1de7cd18ebb2354e1911ad8c8e4a936ea3e
5
+
6
+ Say **“Install X-Ray”** or **“Install X-Ray on this site and tell me what drives customers.”**
7
+
8
+ Install one Pixel globally once. X-Ray then inventories the approved public site, proposes one measurement plan, publishes digest-bound runtime configuration without GitHub, verifies live convergence, and returns customer-journey answers or exact evidence-readiness thresholds.
9
+
10
+ ## Exact continuation
11
+
12
+ > Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
13
+
14
+ ## Connection topologies
15
+
16
+ - **Local stdio:** The client starts MCP Scraper locally. After the one-time Pixel insertion, X-Ray setup publishes only owner-confirmed runtime configuration. Set MCP_SCRAPER_API_KEY in the local environment or client secret field. Never paste it into chat or commit it.
17
+ - **Hosted remote:** The hosted MCP inspects approved public pages and publishes owner-confirmed X-Ray runtime configuration. It cannot read or write a caller-local path. Use the MCP OAuth/connection flow. Never put a credential in a URL, prompt, or config shown in chat.
18
+
19
+ ## Host recipes
20
+
21
+ ### Codex (`codex`)
22
+
23
+ - Topology: local_stdio, hosted_remote
24
+ - Workspace read/write: yes/yes
25
+ - Restart required: yes
26
+
27
+ ```text
28
+ [mcp_servers.mcp-scraper]
29
+ command = "npx"
30
+ args = ["-y", "--package", "mcp-scraper@latest", "mcp-scraper"]
31
+ env_vars = ["MCP_SCRAPER_API_KEY"]
32
+ ```
33
+
34
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
35
+
36
+ Rollback: Remove the mcp_servers.mcp-scraper table, then restart Codex. Pixel removal is a separate owner-controlled site action.
37
+
38
+ ### Claude Code (`claude-code`)
39
+
40
+ - Topology: local_stdio, hosted_remote
41
+ - Workspace read/write: yes/yes
42
+ - Restart required: yes
43
+
44
+ ```text
45
+ claude mcp add mcp-scraper --scope user --env MCP_SCRAPER_API_KEY="$MCP_SCRAPER_API_KEY" -- npx -y --package mcp-scraper@latest mcp-scraper
46
+ ```
47
+
48
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
49
+
50
+ Rollback: Run: claude mcp remove mcp-scraper -s user. Pixel removal is a separate owner-controlled site action.
51
+
52
+ ### Claude Desktop (`claude-desktop`)
53
+
54
+ - Topology: local_stdio
55
+ - Workspace read/write: no/no
56
+ - Restart required: yes
57
+
58
+ ```text
59
+ Install https://mcpscraper.dev/downloads/mcp-scraper.mcpb and enter the API key only in Claude Desktop's protected configuration field.
60
+ ```
61
+
62
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
63
+
64
+ Rollback: Remove the MCP Scraper extension in Claude Desktop. Pixel removal is a separate owner-controlled site action.
65
+
66
+ ### Cursor (`cursor`)
67
+
68
+ - Topology: local_stdio, hosted_remote
69
+ - Workspace read/write: yes/yes
70
+ - Restart required: yes
71
+
72
+ ```text
73
+ {
74
+ "mcpServers": {
75
+ "mcp-scraper": {
76
+ "command": "npx",
77
+ "args": [
78
+ "-y",
79
+ "--package",
80
+ "mcp-scraper@latest",
81
+ "mcp-scraper"
82
+ ],
83
+ "env": {
84
+ "MCP_SCRAPER_API_KEY": "${env:MCP_SCRAPER_API_KEY}"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
92
+
93
+ Rollback: Remove mcp-scraper from .cursor/mcp.json (or the user MCP settings), then restart Cursor.
94
+
95
+ ### Windsurf (`windsurf`)
96
+
97
+ - Topology: local_stdio
98
+ - Workspace read/write: yes/yes
99
+ - Restart required: yes
100
+
101
+ ```text
102
+ {
103
+ "mcpServers": {
104
+ "mcp-scraper": {
105
+ "command": "npx",
106
+ "args": [
107
+ "-y",
108
+ "--package",
109
+ "mcp-scraper@latest",
110
+ "mcp-scraper"
111
+ ],
112
+ "env": {
113
+ "MCP_SCRAPER_API_KEY": "${env:MCP_SCRAPER_API_KEY}"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
121
+
122
+ Rollback: Remove mcp-scraper from the Windsurf MCP configuration, then restart Windsurf.
123
+
124
+ ### Cline (`cline`)
125
+
126
+ - Topology: local_stdio
127
+ - Workspace read/write: yes/yes
128
+ - Restart required: yes
129
+
130
+ ```text
131
+ {
132
+ "mcpServers": {
133
+ "mcp-scraper": {
134
+ "command": "npx",
135
+ "args": [
136
+ "-y",
137
+ "--package",
138
+ "mcp-scraper@latest",
139
+ "mcp-scraper"
140
+ ],
141
+ "env": {
142
+ "MCP_SCRAPER_API_KEY": "${env:MCP_SCRAPER_API_KEY}"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
150
+
151
+ Rollback: Remove mcp-scraper from Cline MCP Servers, then restart the extension host.
152
+
153
+ ### User-action-only MCP host (`user-action-only`)
154
+
155
+ - Topology: hosted_remote
156
+ - Workspace read/write: no/no
157
+ - Restart required: no
158
+
159
+ ```text
160
+ {
161
+ "mcpServers": {
162
+ "mcp-scraper": {
163
+ "url": "https://mcpscraper.dev/mcp"
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ Continuation: Call analytics_setup_site with { "startUrl": "<site URL>", "goal": "Install X-Ray and tell me what drives customers" }; on every later call, reuse the returned setupId and revision.
170
+
171
+ Rollback: Disconnect MCP Scraper from the host. Pixel removal remains an owner-controlled site action.
172
+
173
+ ## What X-Ray does
174
+
175
+ 1. Resolve Thorbit X-Ray entitlement and the target site without consuming MCP Scraper Credits.
176
+ 1. Inspect the whole approved public site; enumerate distinct renderers, routes, and Pixel coverage.
177
+ 1. Infer the business model and customer outcome, then propose one privacy-safe measurement plan.
178
+ 1. If the Pixel is absent, return the canonical one-time tag and exact uncovered surfaces; do not claim ongoing control there.
179
+ 1. Publish an approved measurement revision as a digest-bound runtime manifest; source or repository access is not required.
180
+ 1. Verify route coverage, consent, PageViews, manifest convergence, bounded rule matches, and persisted definition/version evidence.
181
+ 1. Require a separate exact-revision approval before any canary or real-visitor experiment activation.
182
+ 1. Return first customer-journey answers when sufficient, or exact evidence-readiness thresholds when not.
183
+ 1. On “improve”, propose one highest-value uncovered outcome, require approval when needed, and reverify.
184
+
185
+ ## Safety contract
186
+
187
+ - Never invent or hand-author tracking code; use the canonical product-authored Pixel snippet returned by analytics_setup_site.
188
+ - Never ask for or print API keys, OAuth tokens, signed URLs, cookies, or other credentials.
189
+ - Never call ad platforms directly or silently activate events, definitions, funnels, or delivery destinations.
190
+ - Never treat a CTA click as a customer, sale, or revenue event without verified outcome evidence.
191
+ - Never claim full-domain installation while an in-scope route or renderer is missing, excluded without approval, or unverifiable.
192
+ - Never treat event-name presence as verification; require persisted definition ID and version evidence.
193
+
194
+ Machine-readable contract: https://mcpscraper.dev/.well-known/xray-install.json