mcp-scraper 0.2.7 → 0.2.9
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.
- package/README.md +44 -5
- package/dist/bin/api-server.cjs +2417 -648
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +3 -3
- package/dist/bin/browser-agent-stdio-server.cjs +1 -1
- package/dist/bin/browser-agent-stdio-server.cjs.map +1 -1
- package/dist/bin/browser-agent-stdio-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +1276 -0
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -0
- package/dist/bin/mcp-scraper-cli.d.cts +1 -0
- package/dist/bin/mcp-scraper-cli.d.ts +1 -0
- package/dist/bin/mcp-scraper-cli.js +476 -0
- package/dist/bin/mcp-scraper-cli.js.map +1 -0
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs +69 -14
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.js +3 -3
- package/dist/bin/mcp-scraper-install.cjs +5 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +5 -1
- package/dist/bin/mcp-scraper-install.js.map +1 -1
- package/dist/bin/mcp-stdio-server.cjs +69 -14
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/bin/paa-harvest.cjs +42 -6
- package/dist/bin/paa-harvest.cjs.map +1 -1
- package/dist/bin/paa-harvest.js +1 -1
- package/dist/{chunk-3TF6UT2P.js → chunk-5E6KJC26.js} +2 -2
- package/dist/{chunk-D4CJBZBY.js → chunk-7GCCOT3M.js} +372 -1
- package/dist/chunk-7GCCOT3M.js.map +1 -0
- package/dist/chunk-BJDCPCIE.js +7 -0
- package/dist/chunk-BJDCPCIE.js.map +1 -0
- package/dist/{chunk-MY3S7EX7.js → chunk-CQTAKXBN.js} +43 -7
- package/dist/chunk-CQTAKXBN.js.map +1 -0
- package/dist/chunk-L6IS63WS.js +869 -0
- package/dist/chunk-L6IS63WS.js.map +1 -0
- package/dist/{chunk-IQOCZGJJ.js → chunk-ROS67BNV.js} +5 -5
- package/dist/{chunk-7SI6XIR3.js → chunk-XAY5U67D.js} +70 -15
- package/dist/chunk-XAY5U67D.js.map +1 -0
- package/dist/{db-YWCNHBLH.js → db-BVHYI57K.js} +38 -2
- package/dist/index.cjs +42 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{server-RIKRBDOI.js → server-BKJ7LULQ.js} +818 -394
- package/dist/server-BKJ7LULQ.js.map +1 -0
- package/dist/{worker-NAKGTIF5.js → worker-TDJQ6TH3.js} +8 -8
- package/docs/mcp-tool-quality-spec.md +3 -1
- package/docs/specs/agent-ready-seo-packet-spec.md +237 -0
- package/docs/specs/cli-agent-wiring-spec.md +203 -0
- package/docs/specs/deferred-work-spec.md +12 -0
- package/docs/specs/local-competitive-audit-spec.md +312 -0
- package/docs/specs/scheduled-workflows-api-spec.md +304 -0
- package/docs/specs/seo-cli-growth-roadmap-spec.md +179 -0
- package/docs/specs/seo-workflow-runner-and-reports-spec.md +241 -0
- package/package.json +3 -2
- package/dist/chunk-7SI6XIR3.js.map +0 -1
- package/dist/chunk-D4CJBZBY.js.map +0 -1
- package/dist/chunk-IZE5UW7Y.js +0 -7
- package/dist/chunk-IZE5UW7Y.js.map +0 -1
- package/dist/chunk-MY3S7EX7.js.map +0 -1
- package/dist/server-RIKRBDOI.js.map +0 -1
- /package/dist/{chunk-3TF6UT2P.js.map → chunk-5E6KJC26.js.map} +0 -0
- /package/dist/{chunk-IQOCZGJJ.js.map → chunk-ROS67BNV.js.map} +0 -0
- /package/dist/{db-YWCNHBLH.js.map → db-BVHYI57K.js.map} +0 -0
- /package/dist/{worker-NAKGTIF5.js.map → worker-TDJQ6TH3.js.map} +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# SEO CLI Growth Roadmap — Product + Implementation Spec
|
|
2
|
+
|
|
3
|
+
This spec packages the planned MCP Scraper growth work into buildable slices. The product goal is to make MCP Scraper the command-line and MCP data layer for AI SEO work: run live web intelligence workflows, save evidence-rich reports, and hand clean artifacts to AI agents.
|
|
4
|
+
|
|
5
|
+
## Product thesis
|
|
6
|
+
|
|
7
|
+
AI SEO users do not only need scraped data. They need repeatable evidence workflows that answer:
|
|
8
|
+
|
|
9
|
+
- Which sources and competitors are visible in AI/Search surfaces?
|
|
10
|
+
- What do Maps competitors look like across a market?
|
|
11
|
+
- What do reviews say customers care about?
|
|
12
|
+
- What should an AI agent do next with the evidence?
|
|
13
|
+
- Can the workflow run again on a schedule?
|
|
14
|
+
|
|
15
|
+
The CLI should therefore feel like a workflow machine, not a loose collection of endpoints.
|
|
16
|
+
|
|
17
|
+
## Spec set
|
|
18
|
+
|
|
19
|
+
| Spec | Purpose | Recommended priority |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `cli-agent-wiring-spec.md` | Make MCP Scraper easy to install into Codex, Claude, and other AI-agent hosts. | P0 |
|
|
22
|
+
| `seo-workflow-runner-and-reports-spec.md` | Add a human CLI workflow runner plus local HTML/CSV/JSON/Markdown report artifacts. | P0 |
|
|
23
|
+
| `agent-ready-seo-packet-spec.md` | Produce a folder that an AI agent can use directly: brief, evidence, sources, tasks, report. | P1 |
|
|
24
|
+
| `local-competitive-audit-spec.md` | Turn directory + Maps + review/profile hydration into a market audit workflow. | P1 |
|
|
25
|
+
| `scheduled-workflows-api-spec.md` | Add hosted recurring workflow schedules, webhooks, run history, and API surfaces. | P2 |
|
|
26
|
+
|
|
27
|
+
## Current tool surface to reuse
|
|
28
|
+
|
|
29
|
+
Already shipped:
|
|
30
|
+
|
|
31
|
+
- `maps_search` — multi-business Maps result search, up to 50 results.
|
|
32
|
+
- `maps_place_intel` — profile-level Maps details, review count, category, review histogram, review topics, attributes, optional review cards.
|
|
33
|
+
- `directory_workflow` — Census/city selection + city-by-city Maps searches + CSV output.
|
|
34
|
+
- `rank_tracker_blueprint` — local planning tool for database schema, cron, metrics, and implementation prompts.
|
|
35
|
+
- `search_serp` / `harvest_paa` — SERP, PAA, AI Overview, forums, videos, and source evidence.
|
|
36
|
+
- `mcp-scraper-install` — human terminal installer card.
|
|
37
|
+
- `mcp-scraper-combined` — combined MCP stdio server for web intelligence + browser tools.
|
|
38
|
+
|
|
39
|
+
Important distinction: `rank_tracker_blueprint` is not a live tracker runner. It should be referenced by scheduled workflow specs, not replaced.
|
|
40
|
+
|
|
41
|
+
## New CLI command family
|
|
42
|
+
|
|
43
|
+
Keep existing stdio server binaries protocol-safe. Add a new human-facing CLI binary:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"bin": {
|
|
48
|
+
"mcp-scraper-cli": "dist/bin/mcp-scraper-cli.js"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Rationale: `mcp-scraper` is already the stdio MCP server. It must stay silent except for JSON-RPC. The human CLI can print progress bars, report paths, cards, and diagnostics.
|
|
54
|
+
|
|
55
|
+
Primary commands:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
mcp-scraper-cli doctor
|
|
59
|
+
mcp-scraper-cli agent install codex
|
|
60
|
+
mcp-scraper-cli agent install claude
|
|
61
|
+
mcp-scraper-cli agent prompt agent-packet
|
|
62
|
+
mcp-scraper-cli workflow list
|
|
63
|
+
mcp-scraper-cli workflow run agent-packet --keyword "roof repair Denver" --domain example.com
|
|
64
|
+
mcp-scraper-cli workflow run local-competitive-audit --query roofers --state TN --min-pop 100000 --per-city 20
|
|
65
|
+
mcp-scraper-cli report open last
|
|
66
|
+
mcp-scraper-cli schedule create local-competitive-audit --weekly --webhook https://example.com/hook
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The existing `mcp-scraper-install` stays as the branded terminal card and can point users at `mcp-scraper-cli`.
|
|
70
|
+
|
|
71
|
+
## Workflow catalog
|
|
72
|
+
|
|
73
|
+
P0/P1 workflows:
|
|
74
|
+
|
|
75
|
+
| Workflow | What it answers | Primary outputs |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `agent-packet` | What evidence and tasks should an AI agent use for this SEO problem? | agent folder, HTML report |
|
|
78
|
+
| `local-competitive-audit` | Who ranks in local markets, how strong are they, and what do customers say? | report, CSVs, review insights |
|
|
79
|
+
| `directory` | Which businesses are ranking across selected city markets? | CSV, market report |
|
|
80
|
+
| `serp-brief` | What should a page cover based on live SERP/PAA/AI evidence? | writer brief, evidence report |
|
|
81
|
+
| `answer-gap` | Which cited/ranking sources answer the query better than the target page? | gap report, task list |
|
|
82
|
+
| `ai-citations` | Is the brand/domain cited in AI Overview/search evidence? | citation table, trends when scheduled |
|
|
83
|
+
|
|
84
|
+
P2/P3 workflows:
|
|
85
|
+
|
|
86
|
+
| Workflow | What it answers |
|
|
87
|
+
|---|---|
|
|
88
|
+
| `maps-rank-monitor` | How does a target GBP move across markets and keywords? |
|
|
89
|
+
| `content-decay` | Which pages are stale compared with current live SERP/PAA evidence? |
|
|
90
|
+
| `forum-demand` | What objections, use cases, and language are showing up in forums? |
|
|
91
|
+
| `entity-audit` | Is brand/entity consistency strong across public search surfaces? |
|
|
92
|
+
|
|
93
|
+
## Shared artifact contract
|
|
94
|
+
|
|
95
|
+
Every workflow writes a run folder:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
~/Downloads/mcp-scraper/workflows/<workflow>/<timestamp>-<slug>/
|
|
99
|
+
manifest.json
|
|
100
|
+
report.html
|
|
101
|
+
summary.md
|
|
102
|
+
evidence.json
|
|
103
|
+
sources.csv
|
|
104
|
+
tasks.md
|
|
105
|
+
logs/attempts.jsonl
|
|
106
|
+
exports/*.csv
|
|
107
|
+
screenshots/* # optional
|
|
108
|
+
replays/* # optional
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`manifest.json` is the stable contract:
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
interface WorkflowManifest {
|
|
115
|
+
workflow: string
|
|
116
|
+
runId: string
|
|
117
|
+
startedAt: string
|
|
118
|
+
completedAt: string | null
|
|
119
|
+
status: 'running' | 'succeeded' | 'partial' | 'failed'
|
|
120
|
+
input: Record<string, unknown>
|
|
121
|
+
artifacts: Array<{
|
|
122
|
+
kind: 'html_report' | 'markdown' | 'json' | 'csv' | 'log' | 'screenshot' | 'replay'
|
|
123
|
+
label: string
|
|
124
|
+
path: string
|
|
125
|
+
rows?: number
|
|
126
|
+
}>
|
|
127
|
+
counts: Record<string, number>
|
|
128
|
+
warnings: string[]
|
|
129
|
+
costs?: { estimatedMc: number; actualMc?: number }
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Implementation phases
|
|
134
|
+
|
|
135
|
+
### Phase 1 — Human CLI shell + agent wiring
|
|
136
|
+
|
|
137
|
+
- Add `bin/mcp-scraper-cli.ts`.
|
|
138
|
+
- Implement `doctor`, `agent install`, `agent prompt`, and `workflow list`.
|
|
139
|
+
- No new paid workflow execution yet.
|
|
140
|
+
- Tests: CLI argument parsing, generated config snapshots, installer card references.
|
|
141
|
+
|
|
142
|
+
### Phase 2 — Workflow runner + report artifact system
|
|
143
|
+
|
|
144
|
+
- Add local workflow registry and artifact writer.
|
|
145
|
+
- Implement `report open last`.
|
|
146
|
+
- Implement `directory` as first wrapped workflow around existing `directory_workflow`.
|
|
147
|
+
- Tests: run folder creation, manifest shape, report renderer.
|
|
148
|
+
|
|
149
|
+
### Phase 3 — Agent-ready SEO packet
|
|
150
|
+
|
|
151
|
+
- Implement `agent-packet` workflow.
|
|
152
|
+
- Use `search_serp`, `harvest_paa`, optional `extract_url`, and report writer.
|
|
153
|
+
- Tests: fixture evidence to deterministic packet artifacts.
|
|
154
|
+
|
|
155
|
+
### Phase 4 — Local competitive audit
|
|
156
|
+
|
|
157
|
+
- Implement `local-competitive-audit`.
|
|
158
|
+
- Add `review_count` to directory CSV base export.
|
|
159
|
+
- Hydrate top-N competitors per city using `maps_place_intel`.
|
|
160
|
+
- Generate review/category/market-strength report.
|
|
161
|
+
|
|
162
|
+
### Phase 5 — Hosted schedules/API
|
|
163
|
+
|
|
164
|
+
- Add workflow run and schedule database tables.
|
|
165
|
+
- Add API routes for schedule CRUD, manual run, run status, report download.
|
|
166
|
+
- Add webhook callbacks.
|
|
167
|
+
- Keep scheduled workflows separate from `rank_tracker_blueprint`; the blueprint can generate schema/plans for custom rank trackers.
|
|
168
|
+
|
|
169
|
+
## Tool-description impact
|
|
170
|
+
|
|
171
|
+
When each workflow ships, update:
|
|
172
|
+
|
|
173
|
+
- `README.md` install and tool sections.
|
|
174
|
+
- `public/skills/mcp-scraper/skill.md`.
|
|
175
|
+
- MCP tool descriptions in `src/mcp/paa-mcp-server.ts` if a workflow becomes a real MCP tool.
|
|
176
|
+
- `mcp-scraper-install` newest-feature line.
|
|
177
|
+
|
|
178
|
+
Avoid naming underlying browser/proxy vendors in outward-facing CLI text, tool descriptions, and error messages.
|
|
179
|
+
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# SEO Workflow Runner + Local Reports — Implementation Spec
|
|
2
|
+
|
|
3
|
+
This spec introduces a human CLI workflow runner and a shared artifact/report system. It wraps existing MCP Scraper capabilities into named SEO workflows with predictable local outputs.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- Run high-value SEO workflows from the CLI.
|
|
8
|
+
- Save useful local artifacts every time.
|
|
9
|
+
- Provide local HTML reports that are easy to inspect or share.
|
|
10
|
+
- Keep workflow logic reusable by hosted API schedules later.
|
|
11
|
+
- Avoid duplicating tool logic already implemented in MCP/API handlers.
|
|
12
|
+
|
|
13
|
+
## Command surface
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
mcp-scraper-cli workflow list
|
|
17
|
+
mcp-scraper-cli workflow describe local-competitive-audit
|
|
18
|
+
mcp-scraper-cli workflow run directory --query roofers --state TN --min-pop 100000 --per-city 20
|
|
19
|
+
mcp-scraper-cli workflow run agent-packet --keyword "roof repair Denver" --domain example.com
|
|
20
|
+
mcp-scraper-cli report open last
|
|
21
|
+
mcp-scraper-cli report path last
|
|
22
|
+
mcp-scraper-cli report list
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Global flags:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
--output-dir <path>
|
|
29
|
+
--format html,json,md,csv
|
|
30
|
+
--json
|
|
31
|
+
--no-open
|
|
32
|
+
--api-url <url>
|
|
33
|
+
--api-key <key>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Workflow registry
|
|
37
|
+
|
|
38
|
+
New module:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
src/workflows/
|
|
42
|
+
registry.ts
|
|
43
|
+
types.ts
|
|
44
|
+
artifact-writer.ts
|
|
45
|
+
report-renderer.ts
|
|
46
|
+
workflows/
|
|
47
|
+
directory.ts
|
|
48
|
+
agent-packet.ts
|
|
49
|
+
local-competitive-audit.ts
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Types:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
export interface WorkflowDefinition<TInput, TResult> {
|
|
56
|
+
id: string
|
|
57
|
+
title: string
|
|
58
|
+
description: string
|
|
59
|
+
inputSchema: z.ZodType<TInput>
|
|
60
|
+
estimate(input: TInput): Promise<WorkflowEstimate>
|
|
61
|
+
run(input: TInput, ctx: WorkflowRunContext): Promise<TResult>
|
|
62
|
+
render(result: TResult, ctx: WorkflowRunContext): Promise<WorkflowArtifacts>
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface WorkflowRunContext {
|
|
66
|
+
runId: string
|
|
67
|
+
startedAt: string
|
|
68
|
+
outputDir: string
|
|
69
|
+
apiKey?: string
|
|
70
|
+
apiUrl: string
|
|
71
|
+
logger: WorkflowLogger
|
|
72
|
+
artifacts: ArtifactWriter
|
|
73
|
+
signal?: AbortSignal
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The registry is local code, not model-driven. Agents can discover workflows through `workflow list`, and MCP tools can later expose the same registry through structured content.
|
|
78
|
+
|
|
79
|
+
## Artifact contract
|
|
80
|
+
|
|
81
|
+
Each run creates:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
~/Downloads/mcp-scraper/workflows/<workflow>/<timestamp>-<slug>/
|
|
85
|
+
manifest.json
|
|
86
|
+
report.html
|
|
87
|
+
summary.md
|
|
88
|
+
evidence.json
|
|
89
|
+
tasks.md
|
|
90
|
+
exports/*.csv
|
|
91
|
+
logs/attempts.jsonl
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`manifest.json`:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
interface WorkflowManifest {
|
|
98
|
+
workflow: string
|
|
99
|
+
title: string
|
|
100
|
+
runId: string
|
|
101
|
+
status: 'running' | 'succeeded' | 'partial' | 'failed'
|
|
102
|
+
startedAt: string
|
|
103
|
+
completedAt: string | null
|
|
104
|
+
input: Record<string, unknown>
|
|
105
|
+
artifacts: Array<{
|
|
106
|
+
kind: 'html_report' | 'markdown' | 'json' | 'csv' | 'log'
|
|
107
|
+
label: string
|
|
108
|
+
path: string
|
|
109
|
+
bytes?: number
|
|
110
|
+
rows?: number
|
|
111
|
+
}>
|
|
112
|
+
warnings: string[]
|
|
113
|
+
errors: string[]
|
|
114
|
+
counts: Record<string, number>
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## HTML report renderer
|
|
119
|
+
|
|
120
|
+
No frontend framework required for the first version. Generate standalone HTML with embedded CSS and static tables.
|
|
121
|
+
|
|
122
|
+
Report sections:
|
|
123
|
+
|
|
124
|
+
1. Header: workflow, input, run status, date, artifact links.
|
|
125
|
+
2. Executive summary.
|
|
126
|
+
3. Evidence tables.
|
|
127
|
+
4. Competitors/sources table when available.
|
|
128
|
+
5. Findings.
|
|
129
|
+
6. Recommended actions.
|
|
130
|
+
7. Diagnostics: attempts, partial failures, location confidence, warnings.
|
|
131
|
+
|
|
132
|
+
Files:
|
|
133
|
+
|
|
134
|
+
- `src/workflows/report-renderer.ts`
|
|
135
|
+
- `src/workflows/report-template.ts`
|
|
136
|
+
- `tests/unit/workflow-report-renderer.test.ts`
|
|
137
|
+
|
|
138
|
+
## Local report index
|
|
139
|
+
|
|
140
|
+
Maintain:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
~/Downloads/mcp-scraper/workflows/index.json
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Shape:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
interface WorkflowRunIndex {
|
|
150
|
+
runs: Array<{
|
|
151
|
+
workflow: string
|
|
152
|
+
runId: string
|
|
153
|
+
status: string
|
|
154
|
+
startedAt: string
|
|
155
|
+
reportPath: string | null
|
|
156
|
+
manifestPath: string
|
|
157
|
+
summary: string
|
|
158
|
+
}>
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Commands:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
mcp-scraper-cli report list
|
|
166
|
+
mcp-scraper-cli report open last
|
|
167
|
+
mcp-scraper-cli report open <runId>
|
|
168
|
+
mcp-scraper-cli report path <runId>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Opening behavior:
|
|
172
|
+
|
|
173
|
+
- macOS: `open <reportPath>`.
|
|
174
|
+
- Other platforms: print path.
|
|
175
|
+
- `--json`: return machine-readable path only.
|
|
176
|
+
|
|
177
|
+
## Initial workflows
|
|
178
|
+
|
|
179
|
+
### `directory`
|
|
180
|
+
|
|
181
|
+
Wrapper around existing `directory_workflow`.
|
|
182
|
+
|
|
183
|
+
Input:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
--query roofers
|
|
187
|
+
--state TN
|
|
188
|
+
--min-pop 100000
|
|
189
|
+
--per-city 20
|
|
190
|
+
--concurrency 5
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Output:
|
|
194
|
+
|
|
195
|
+
- Existing directory CSV.
|
|
196
|
+
- HTML summary of markets, city status, result counts, top businesses.
|
|
197
|
+
- `evidence.json` preserving structured `directory_workflow` response.
|
|
198
|
+
|
|
199
|
+
### `agent-packet`
|
|
200
|
+
|
|
201
|
+
Specified in `agent-ready-seo-packet-spec.md`.
|
|
202
|
+
|
|
203
|
+
### `local-competitive-audit`
|
|
204
|
+
|
|
205
|
+
Specified in `local-competitive-audit-spec.md`.
|
|
206
|
+
|
|
207
|
+
## Hosted versus local execution
|
|
208
|
+
|
|
209
|
+
First implementation should call hosted API endpoints when available:
|
|
210
|
+
|
|
211
|
+
- `/directory/run`
|
|
212
|
+
- `/maps/search`
|
|
213
|
+
- `/maps/place-intel`
|
|
214
|
+
- `/serp/...` and `/harvest/...` where already available.
|
|
215
|
+
|
|
216
|
+
Local-only helpers are acceptable for report assembly and artifact writing.
|
|
217
|
+
|
|
218
|
+
Do not directly duplicate extraction code in the CLI.
|
|
219
|
+
|
|
220
|
+
## Error and partial-result behavior
|
|
221
|
+
|
|
222
|
+
Workflow runs should prefer `partial` over `failed` when useful artifacts exist.
|
|
223
|
+
|
|
224
|
+
Examples:
|
|
225
|
+
|
|
226
|
+
- 8 of 10 cities succeed: status `partial`, report includes failed city diagnostics.
|
|
227
|
+
- PAA fails but SERP succeeds: `agent-packet` still writes SERP evidence and missing PAA warning.
|
|
228
|
+
- Review hydration fails for some competitors: audit keeps directory result and marks review fields unavailable.
|
|
229
|
+
|
|
230
|
+
## Tests
|
|
231
|
+
|
|
232
|
+
- `workflow list` contains `directory`, `agent-packet`, `local-competitive-audit`.
|
|
233
|
+
- `directory` workflow with mocked API writes manifest, report, evidence JSON, CSV link.
|
|
234
|
+
- Report renderer escapes HTML.
|
|
235
|
+
- `report open last --json` returns the expected path without launching.
|
|
236
|
+
- Partial runs preserve artifacts and warnings.
|
|
237
|
+
|
|
238
|
+
## MCP description impact
|
|
239
|
+
|
|
240
|
+
When the CLI workflows are stable, expose `workflow_recipe` or `workflow_plan` as a local planning MCP tool only if needed. Do not add a paid MCP workflow runner until the local CLI and hosted API schedule surfaces settle.
|
|
241
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-scraper",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "MCP server for MCP Scraper web intelligence tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"mcp-scraper": "dist/bin/mcp-stdio-server.js",
|
|
20
20
|
"browser-agent": "dist/bin/browser-agent-stdio-server.js",
|
|
21
21
|
"mcp-scraper-combined": "dist/bin/mcp-scraper-combined-stdio-server.js",
|
|
22
|
-
"mcp-scraper-install": "dist/bin/mcp-scraper-install.js"
|
|
22
|
+
"mcp-scraper-install": "dist/bin/mcp-scraper-install.js",
|
|
23
|
+
"mcp-scraper-cli": "dist/bin/mcp-scraper-cli.js"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
25
26
|
"dist",
|