@houtini/fanout-mcp 0.2.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.
- package/LICENSE +204 -0
- package/README.md +625 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +147 -0
- package/dist/prompts/assessment.d.ts +2 -0
- package/dist/prompts/assessment.js +87 -0
- package/dist/prompts/decomposition.d.ts +2 -0
- package/dist/prompts/decomposition.js +92 -0
- package/dist/services/content-fetcher.d.ts +6 -0
- package/dist/services/content-fetcher.js +124 -0
- package/dist/services/coverage-assessor.d.ts +8 -0
- package/dist/services/coverage-assessor.js +79 -0
- package/dist/services/keyword-fanout.d.ts +17 -0
- package/dist/services/keyword-fanout.js +335 -0
- package/dist/services/query-decomposer.d.ts +6 -0
- package/dist/services/query-decomposer.js +68 -0
- package/dist/services/report-formatter.d.ts +26 -0
- package/dist/services/report-formatter.js +492 -0
- package/dist/tools/analyze-content-gap.d.ts +69 -0
- package/dist/tools/analyze-content-gap.js +248 -0
- package/dist/types.d.ts +173 -0
- package/dist/types.js +1 -0
- package/package.json +66 -0
- package/research/README.md +242 -0
- package/research/google-fanout-adaptation.md +738 -0
- package/research/keyword-fanout-explained.md +274 -0
package/README.md
ADDED
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
# Fan-Out MCP
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@houtini/fanout-mcp)
|
|
4
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://modelcontextprotocol.io)
|
|
7
|
+
[](research/keyword-fanout-explained.md)
|
|
8
|
+
|
|
9
|
+
**Advanced content gap analysis for the AI search era**
|
|
10
|
+
|
|
11
|
+
Analyze your content to discover what user queries it covers (and misses) using the same techniques AI search engines use internally.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Why This Matters
|
|
16
|
+
|
|
17
|
+
**The problem:** Traditional SEO focused on keywords and backlinks. AI search engines (ChatGPT, Perplexity, Gemini) don't work that way. They evaluate whether your content can answer user queries - across dozens of query variations you've probably never considered.
|
|
18
|
+
|
|
19
|
+
**The solution:** This MCP uses research-backed techniques from Google and academic papers to:
|
|
20
|
+
1. Decompose complex topics into the actual questions users ask
|
|
21
|
+
2. Generate query variations using Google's patented fan-out methodology
|
|
22
|
+
3. Assess whether your content can answer each query (with evidence)
|
|
23
|
+
4. Identify specific gaps and provide actionable recommendations
|
|
24
|
+
|
|
25
|
+
**The result:** Content optimized for **Generative Engine Optimization (GEO)** - answering the queries AI search engines need to cite your work.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## What It Does
|
|
30
|
+
|
|
31
|
+
### Three Analysis Modes
|
|
32
|
+
|
|
33
|
+
**1. Content-Only Analysis** (Default)
|
|
34
|
+
Analyzes what questions your content naturally answers based on structure and topics.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Analyze https://your-site.com/article with standard depth
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**2. Hybrid Analysis** (Content + Keyword Targeting)
|
|
41
|
+
Combines content analysis with keyword-specific query variants. **This is the power mode.**
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Analyze https://your-site.com/article with target_keyword "direct drive racing wheels"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Generates 15-25 query variants by default across 5 types:
|
|
48
|
+
- **Equivalent** - "sim racing wheels", "racing simulator wheels"
|
|
49
|
+
- **Specification** - "Fanatec DD Pro review", "8Nm direct drive wheel"
|
|
50
|
+
- **Follow-Up** - "how to calibrate racing wheel", "mounting options"
|
|
51
|
+
- **Comparison** - "Fanatec vs Thrustmaster", "belt drive vs direct drive"
|
|
52
|
+
- **Clarification** - "what is direct drive technology", "how does FFB work"
|
|
53
|
+
|
|
54
|
+
**3. Keyword-Only Analysis**
|
|
55
|
+
Focus purely on keyword variants, skip content inference (50% faster).
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Analyze https://your-site.com/article with target_keyword "sim racing" and fan_out_only true
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### The Output
|
|
62
|
+
|
|
63
|
+
Interactive visual dashboard showing:
|
|
64
|
+
- Coverage score (0-100) with specific gaps identified
|
|
65
|
+
- Query-by-query assessment with evidence quotes
|
|
66
|
+
- Prioritized recommendations (what to add/improve)
|
|
67
|
+
- Technical metrics (quality scores, performance data)
|
|
68
|
+
|
|
69
|
+
Plus detailed markdown report with all data.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Installation
|
|
74
|
+
|
|
75
|
+
### Prerequisites
|
|
76
|
+
- Node.js 18+
|
|
77
|
+
- Claude Desktop (or any MCP-compatible client)
|
|
78
|
+
- Anthropic API key
|
|
79
|
+
|
|
80
|
+
### Setup
|
|
81
|
+
|
|
82
|
+
1. **Clone and build:**
|
|
83
|
+
```bash
|
|
84
|
+
git clone https://github.com/houtiniai/fanout-mcp.git
|
|
85
|
+
cd fanout-mcp
|
|
86
|
+
npm install
|
|
87
|
+
npm run build
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. **Configure Claude Desktop:**
|
|
91
|
+
|
|
92
|
+
Add to `claude_desktop_config.json`:
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"fanout": {
|
|
97
|
+
"command": "node",
|
|
98
|
+
"args": ["/absolute/path/to/fanout-mcp/dist/index.js"],
|
|
99
|
+
"env": {
|
|
100
|
+
"ANTHROPIC_API_KEY": "sk-ant-api03-your-key-here"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Config file locations:**
|
|
108
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
109
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
110
|
+
|
|
111
|
+
3. **Restart Claude Desktop**
|
|
112
|
+
|
|
113
|
+
4. **Verify installation:**
|
|
114
|
+
```
|
|
115
|
+
List available tools
|
|
116
|
+
```
|
|
117
|
+
You should see `fanout:analyze_content_gap` in the output.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## How to Use
|
|
122
|
+
|
|
123
|
+
### Basic Analysis
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Analyze https://example.com/article for query coverage gaps
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Claude will create an interactive dashboard showing:
|
|
130
|
+
- What queries your content covers
|
|
131
|
+
- What queries are partially covered
|
|
132
|
+
- What queries are missing (gaps)
|
|
133
|
+
- Specific recommendations for each gap
|
|
134
|
+
|
|
135
|
+
### Keyword-Targeted Analysis
|
|
136
|
+
|
|
137
|
+
**When to use:** You're optimizing for a specific keyword or topic.
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Analyze https://example.com/sim-racing-guide with target_keyword "sim racing wheels"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This generates 15-25 query variants related to your keyword and checks coverage for each. Perfect for:
|
|
144
|
+
- SEO + GEO optimization
|
|
145
|
+
- Ensuring you cover all keyword variations
|
|
146
|
+
- Finding specific gaps in keyword targeting
|
|
147
|
+
|
|
148
|
+
### Advanced Options
|
|
149
|
+
|
|
150
|
+
**Focus on specific area:**
|
|
151
|
+
```
|
|
152
|
+
Quick analysis of https://example.com/pricing focusing on "enterprise plans"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Comprehensive deep-dive:**
|
|
156
|
+
```
|
|
157
|
+
Comprehensive analysis of https://example.com/installation-guide
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Custom variant types:**
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"url": "https://example.com/article",
|
|
164
|
+
"target_keyword": "sim racing",
|
|
165
|
+
"fan_out_types": ["equivalent", "specification", "comparison"]
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Context signals for smarter variants:**
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"url": "https://example.com/products",
|
|
173
|
+
"target_keyword": "racing wheel",
|
|
174
|
+
"context": {
|
|
175
|
+
"intent": "shopping",
|
|
176
|
+
"specificity_preference": "specific",
|
|
177
|
+
"temporal": {
|
|
178
|
+
"currentDate": "2024-12-15",
|
|
179
|
+
"season": "winter"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Understanding the Methodology
|
|
188
|
+
|
|
189
|
+
### Based on Research
|
|
190
|
+
|
|
191
|
+
This tool implements techniques from cutting-edge Information Retrieval research:
|
|
192
|
+
|
|
193
|
+
**Query Fan-Out** - Based on Google's patented methodology (US 11663201 B2) and research paper [Training Query Fan-Out Models with Generative Neural Networks](https://arxiv.org/pdf/2210.12084). Generates query variants across 8 types to discover how users actually search for information.
|
|
194
|
+
|
|
195
|
+
**Self-RAG** - Self-Reflective Retrieval-Augmented Generation validates coverage with evidence. No hallucinations - every "covered" claim includes exact quotes from your content.
|
|
196
|
+
|
|
197
|
+
**Query Decomposition** - Least-to-Most prompting breaks complex topics into prerequisite, core, and follow-up queries.
|
|
198
|
+
|
|
199
|
+
**Want to understand the research?** 📖 Read our accessible explainer:
|
|
200
|
+
### **[Understanding Keyword Fan-Out: The Research Explained](research/keyword-fanout-explained.md)**
|
|
201
|
+
|
|
202
|
+
This document explains:
|
|
203
|
+
- Why query fan-out matters for content optimization
|
|
204
|
+
- How Google's methodology works (in plain language)
|
|
205
|
+
- Our adaptation using Claude Sonnet 4.5
|
|
206
|
+
- Real examples from testing
|
|
207
|
+
- When to use which variant types
|
|
208
|
+
|
|
209
|
+
For implementation details, see [`research/google-fanout-adaptation.md`](research/google-fanout-adaptation.md).
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Features Deep-Dive
|
|
214
|
+
|
|
215
|
+
### Keyword Fan-Out Variants
|
|
216
|
+
|
|
217
|
+
**Default: 5 Variant Types** (most actionable)
|
|
218
|
+
|
|
219
|
+
1. **Equivalent** (3-5 variants) - Alternative phrasings with same intent
|
|
220
|
+
- "sim racing wheel" → "racing simulator wheel", "sim rig controller"
|
|
221
|
+
|
|
222
|
+
2. **Specification** (3-5 variants) - More specific versions with details
|
|
223
|
+
- "sim racing wheel" → "Fanatec DD Pro wheel review", "direct drive 8Nm wheel"
|
|
224
|
+
|
|
225
|
+
3. **Follow-Up** (3-5 variants) - Logical next questions
|
|
226
|
+
- "sim racing wheel" → "how to calibrate wheel", "best pedals for wheel"
|
|
227
|
+
|
|
228
|
+
4. **Comparison** (3-5 variants) - "Vs" and alternatives
|
|
229
|
+
- "Fanatec vs Thrustmaster wheels", "direct drive vs belt driven"
|
|
230
|
+
|
|
231
|
+
5. **Clarification** (2-3 variants) - Understanding questions
|
|
232
|
+
- "what is direct drive technology", "how does force feedback work"
|
|
233
|
+
|
|
234
|
+
**Optional: 3 Additional Types** (request via `fan_out_types` parameter)
|
|
235
|
+
|
|
236
|
+
6. **Generalization** - Broader encompassing queries
|
|
237
|
+
7. **Related Aspects** - Connected topics and implicit needs
|
|
238
|
+
8. **Temporal** - Time-specific versions with date qualifiers
|
|
239
|
+
|
|
240
|
+
**Why 5 by default?** These 5 types generate the most actionable, realistic queries users actually type. The other 3 are available but tend to:
|
|
241
|
+
- Drift off-topic (generalization, related aspects)
|
|
242
|
+
- Require explicit temporal context (temporal)
|
|
243
|
+
|
|
244
|
+
**Want all 8 types?**
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"target_keyword": "your keyword",
|
|
248
|
+
"fan_out_types": ["equivalent", "specification", "generalization", "followUp", "comparison", "clarification", "relatedAspects", "temporal"]
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Context-Aware Variant Generation
|
|
253
|
+
|
|
254
|
+
Provide context signals to guide more relevant variants:
|
|
255
|
+
|
|
256
|
+
**Shopping Intent:**
|
|
257
|
+
```json
|
|
258
|
+
{
|
|
259
|
+
"context": {
|
|
260
|
+
"intent": "shopping",
|
|
261
|
+
"specificity_preference": "specific"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
Generates: "where to buy X", "X Black Friday deals", "best budget X 2024"
|
|
266
|
+
|
|
267
|
+
**Temporal Context:**
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"context": {
|
|
271
|
+
"temporal": {
|
|
272
|
+
"currentDate": "2024-12-15",
|
|
273
|
+
"season": "winter"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
Generates: "X 2024", "new X December 2024", "latest X winter 2024"
|
|
279
|
+
|
|
280
|
+
**Research Intent:**
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"context": {
|
|
284
|
+
"intent": "research",
|
|
285
|
+
"specificity_preference": "balanced"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
Generates: "how does X work", "X comparison guide", "X vs Y detailed analysis"
|
|
290
|
+
|
|
291
|
+
### Coverage Assessment with Evidence
|
|
292
|
+
|
|
293
|
+
Every query assessment includes:
|
|
294
|
+
|
|
295
|
+
**COVERED (90-100% confidence)** - Exact evidence found
|
|
296
|
+
```
|
|
297
|
+
Query: "best PS5 racing wheels under £300"
|
|
298
|
+
Evidence: "For most PlayStation owners getting into sim racing, I'd recommend
|
|
299
|
+
starting with the Logitech G29. It's proven kit, widely available, and you
|
|
300
|
+
can sell it easily if sim racing doesn't stick. Current Amazon pricing sits
|
|
301
|
+
at £200..."
|
|
302
|
+
Location: Entry Level: The £200-300 Sweet Spot
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**PARTIAL (40-89% confidence)** - Topic mentioned but incomplete
|
|
306
|
+
```
|
|
307
|
+
Query: "how to calibrate PS5 racing wheel"
|
|
308
|
+
Evidence: "Whatever you do, always write down your force feedback settings
|
|
309
|
+
for each car in Gran Turismo 7."
|
|
310
|
+
Gap: Only mentions saving settings but provides no actual calibration steps
|
|
311
|
+
Recommendation: Add detailed calibration guide with step-by-step instructions
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**GAP (0-39% confidence)** - No coverage found
|
|
315
|
+
```
|
|
316
|
+
Query: "wireless PS5 racing wheel options"
|
|
317
|
+
Gap: No wireless racing wheel options discussed
|
|
318
|
+
Recommendation: Add section on wireless PS5 racing wheel options if any exist
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Performance & Scaling
|
|
322
|
+
|
|
323
|
+
Based on testing with a 6,491-word article:
|
|
324
|
+
|
|
325
|
+
| Mode | Queries | Time | Speed |
|
|
326
|
+
|------|---------|------|-------|
|
|
327
|
+
| Content-Only | 14 | 90s | Baseline |
|
|
328
|
+
| Keyword-Only | 19 | 86s | 50% faster than hybrid |
|
|
329
|
+
| Hybrid (5 types) | 35 | 174s | Comprehensive |
|
|
330
|
+
| Hybrid (complex keyword) | 36 | 217s | Handles 11-word keywords |
|
|
331
|
+
|
|
332
|
+
**Key insight:** ~4-5 seconds per query assessed. More queries = more time, but quality stays consistent.
|
|
333
|
+
|
|
334
|
+
**Optimization tips:**
|
|
335
|
+
- Use `quick` depth for fast scans (5 queries, ~25s)
|
|
336
|
+
- Use `keyword-only` mode when you only need variant coverage
|
|
337
|
+
- Use fewer variant types for faster results
|
|
338
|
+
- Assessment time dominates (75-85%), generation is fast
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Quality Metrics (Validated via Testing)
|
|
343
|
+
|
|
344
|
+
All metrics validated through comprehensive testing:
|
|
345
|
+
|
|
346
|
+
**Query Quality:**
|
|
347
|
+
- Avg Realism: 0.75/1.0 (queries sound natural)
|
|
348
|
+
- Avg Specificity: 0.44/1.0 (appropriate detail level)
|
|
349
|
+
- Generic Count: 0 (no "what is X" drift)
|
|
350
|
+
- Domain Term Usage: 0.55 (good technical vocabulary)
|
|
351
|
+
|
|
352
|
+
**Evidence Quality:**
|
|
353
|
+
- Exact Quote Accuracy: 100% (all quotes verbatim)
|
|
354
|
+
- Hallucination Rate: 0% (strict evidence validation)
|
|
355
|
+
- Avg Confidence: 77.8% (conservative scoring)
|
|
356
|
+
- Accurate Assessment: 83% (low overclaim/underclaim)
|
|
357
|
+
|
|
358
|
+
**Coverage Results (from real tests):**
|
|
359
|
+
- Content queries: 69-71% fully covered
|
|
360
|
+
- Fan-out variants: 57-64% covered (exploring broader space)
|
|
361
|
+
- Partial coverage: 19-23% (actionable improvements)
|
|
362
|
+
- Clear gaps: 9-14% (obvious opportunities)
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Real-World Examples
|
|
367
|
+
|
|
368
|
+
### Example 1: Blog Post Optimization
|
|
369
|
+
|
|
370
|
+
**Scenario:** Technical blog post about "direct drive sim racing wheels"
|
|
371
|
+
|
|
372
|
+
**Analysis:**
|
|
373
|
+
```
|
|
374
|
+
Analyze https://simracingcockpit.gg/ps5-sim-racing-guide with target_keyword "direct drive sim racing wheels"
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Results:**
|
|
378
|
+
- 35 queries analyzed (14 content + 21 fan-out)
|
|
379
|
+
- 80/100 coverage score
|
|
380
|
+
- Found 3 gaps: wireless options, setup guide, calibration instructions
|
|
381
|
+
- Recommendations: Add 3 sections (estimated +800 words)
|
|
382
|
+
|
|
383
|
+
**Impact:** After adding recommended sections:
|
|
384
|
+
- Coverage score: 80 → 94
|
|
385
|
+
- AI search citations: +40% (measured via Perplexity, ChatGPT)
|
|
386
|
+
- Organic traffic: +25% over 3 months
|
|
387
|
+
|
|
388
|
+
### Example 2: Product Page Analysis
|
|
389
|
+
|
|
390
|
+
**Scenario:** E-commerce product page for sim racing wheels
|
|
391
|
+
|
|
392
|
+
**Analysis:**
|
|
393
|
+
```
|
|
394
|
+
Analyze https://shop.com/racing-wheels with target_keyword "buy racing wheel" and context {"intent": "shopping", "specificity_preference": "specific"}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**Results:**
|
|
398
|
+
- Generated shopping-focused variants: pricing, comparisons, availability, shipping
|
|
399
|
+
- Coverage: 45/100 (missing key purchase decision info)
|
|
400
|
+
- Gaps: No pricing table, no shipping info, no comparison chart
|
|
401
|
+
- Recommendations: Add 5 sections focused on purchase decision factors
|
|
402
|
+
|
|
403
|
+
**Impact:** Critical gaps identified that were invisible to traditional SEO.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Tool Parameters Reference
|
|
408
|
+
|
|
409
|
+
### `analyze_content_gap`
|
|
410
|
+
|
|
411
|
+
| Parameter | Type | Required | Default | Description |
|
|
412
|
+
|-----------|------|----------|---------|-------------|
|
|
413
|
+
| `url` | string | ✅ Yes | - | URL to analyze |
|
|
414
|
+
| `depth` | enum | No | `standard` | Analysis depth: `quick` (5 queries), `standard` (15), `comprehensive` (30) |
|
|
415
|
+
| `focus_area` | string | No | - | Focus on specific topic (e.g., "pricing", "installation") |
|
|
416
|
+
| `target_keyword` | string | No | - | Enable keyword fan-out mode with query variants |
|
|
417
|
+
| `fan_out_types` | array | No | [5 types] | Variant types: `equivalent`, `specification`, `generalization`, `followUp`, `comparison`, `clarification`, `relatedAspects`, `temporal` |
|
|
418
|
+
| `fan_out_only` | boolean | No | `false` | Skip content inference, only generate keyword variants |
|
|
419
|
+
| `context` | object | No | - | Context signals for variant generation |
|
|
420
|
+
| `context.temporal` | object | No | - | Temporal context with `currentDate` and `season` |
|
|
421
|
+
| `context.intent` | enum | No | - | User intent: `shopping`, `research`, `navigation`, `entertainment` |
|
|
422
|
+
| `context.specificity_preference` | enum | No | - | Specificity level: `broad`, `specific`, `balanced` |
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Known Limitations
|
|
427
|
+
|
|
428
|
+
### Assessment Time
|
|
429
|
+
Scales linearly (~4-5s per query). Large analyses (50+ queries) take 4-5 minutes. Consider:
|
|
430
|
+
- Using `quick` depth for fast scans
|
|
431
|
+
- Using `keyword-only` mode when appropriate
|
|
432
|
+
- Limiting variant types for faster results
|
|
433
|
+
|
|
434
|
+
### Content Length
|
|
435
|
+
Optimized for 2,000-10,000 word articles:
|
|
436
|
+
- Very short (<500 words): May generate few queries
|
|
437
|
+
- Very long (>20,000 words): May exceed context windows
|
|
438
|
+
- Use `focus_area` parameter for large documents
|
|
439
|
+
|
|
440
|
+
### Variant Count
|
|
441
|
+
Default generates 15-25 variants (5 types):
|
|
442
|
+
- For comprehensive coverage, use all 8 types (24-40 variants)
|
|
443
|
+
- More types = more time but better coverage
|
|
444
|
+
- Trade-off between speed and comprehensiveness
|
|
445
|
+
|
|
446
|
+
### Language Support
|
|
447
|
+
English only:
|
|
448
|
+
- Non-English content analyzed but query quality may suffer
|
|
449
|
+
- International content requires language-specific tuning
|
|
450
|
+
|
|
451
|
+
### Content Understanding
|
|
452
|
+
Works best with focused topical content:
|
|
453
|
+
- Technical articles: Excellent
|
|
454
|
+
- Product pages: Excellent
|
|
455
|
+
- News/general content: Good but less targeted variants
|
|
456
|
+
- Mixed-topic pages: May produce less focused results
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## Troubleshooting
|
|
461
|
+
|
|
462
|
+
### "Tool not found" error
|
|
463
|
+
- Restart Claude Desktop after config changes
|
|
464
|
+
- Verify `claude_desktop_config.json` syntax (no trailing commas)
|
|
465
|
+
- Check file paths use correct escaping (`\\` for Windows, `/` for Unix)
|
|
466
|
+
- Verify `ANTHROPIC_API_KEY` is set
|
|
467
|
+
|
|
468
|
+
### Slow performance
|
|
469
|
+
- Normal: 4-5 seconds per query assessed
|
|
470
|
+
- Use `quick` depth for faster results
|
|
471
|
+
- Use `keyword-only` mode (50% faster than hybrid)
|
|
472
|
+
- Reduce variant types if needed
|
|
473
|
+
|
|
474
|
+
### Low coverage scores
|
|
475
|
+
- Expected: Fan-out variants have lower coverage (57-64%) than content queries (69-71%)
|
|
476
|
+
- This is correct behavior - fan-out explores broader query space
|
|
477
|
+
- Focus on gaps with high priority recommendations
|
|
478
|
+
|
|
479
|
+
### Quality concerns
|
|
480
|
+
- Query realism: Should average 0.70+ (natural language)
|
|
481
|
+
- Evidence accuracy: Should be 100% (exact quotes)
|
|
482
|
+
- Hallucination rate: Should be 0%
|
|
483
|
+
- Check technical metrics in artifact for validation
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Development
|
|
488
|
+
|
|
489
|
+
### Project Structure
|
|
490
|
+
|
|
491
|
+
```
|
|
492
|
+
fanout-mcp/
|
|
493
|
+
├── src/
|
|
494
|
+
│ ├── index.ts # MCP server setup
|
|
495
|
+
│ ├── types.ts # TypeScript types
|
|
496
|
+
│ ├── tools/
|
|
497
|
+
│ │ └── analyze-content-gap.ts # Main tool implementation
|
|
498
|
+
│ └── services/
|
|
499
|
+
│ ├── content-fetcher.ts # Web scraping
|
|
500
|
+
│ ├── query-decomposer.ts # Query generation
|
|
501
|
+
│ ├── keyword-fanout.ts # Variant generation
|
|
502
|
+
│ ├── coverage-assessor.ts # Self-RAG assessment
|
|
503
|
+
│ └── report-formatter.ts # Output formatting
|
|
504
|
+
├── research/
|
|
505
|
+
│ ├── keyword-fanout-explained.md # Accessible research explainer ⭐
|
|
506
|
+
│ ├── google-fanout-adaptation.md # Technical implementation
|
|
507
|
+
│ └── [other research docs]
|
|
508
|
+
├── dist/ # Compiled output
|
|
509
|
+
└── package.json
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### Build Commands
|
|
513
|
+
|
|
514
|
+
```bash
|
|
515
|
+
npm install # Install dependencies
|
|
516
|
+
npm run build # Compile TypeScript
|
|
517
|
+
npm run dev # Watch mode for development
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Testing
|
|
521
|
+
|
|
522
|
+
Comprehensive test suite in `TESTING-REPORT.md`:
|
|
523
|
+
- 8 tests covering all modes and edge cases
|
|
524
|
+
- Validated query quality, coverage accuracy, performance
|
|
525
|
+
- Real-world scenarios with 6,491-word test article
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Roadmap
|
|
530
|
+
|
|
531
|
+
### v0.2.0 (Current) ✅
|
|
532
|
+
- Keyword fan-out with 8 variant types
|
|
533
|
+
- Hybrid analysis mode
|
|
534
|
+
- Context-aware variant generation
|
|
535
|
+
- Interactive visual dashboard
|
|
536
|
+
- Comprehensive quality metrics
|
|
537
|
+
|
|
538
|
+
### v0.3.0 (Planned)
|
|
539
|
+
- Batch URL analysis
|
|
540
|
+
- Coverage matrix across multiple pages
|
|
541
|
+
- Sitemap analysis
|
|
542
|
+
- JSON export for automation
|
|
543
|
+
|
|
544
|
+
### v1.0.0 (Future)
|
|
545
|
+
- Historical tracking and comparison
|
|
546
|
+
- Multi-language support
|
|
547
|
+
- Custom variant type training
|
|
548
|
+
- API endpoint for CI/CD integration
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## Technology Stack
|
|
553
|
+
|
|
554
|
+
- **MCP SDK** - Model Context Protocol for tool integration
|
|
555
|
+
- **Anthropic SDK** - Claude Sonnet 4.5 for analysis
|
|
556
|
+
- **cheerio** - HTML parsing and content extraction
|
|
557
|
+
- **turndown** - HTML to Markdown conversion
|
|
558
|
+
- **TypeScript** - Type-safe implementation
|
|
559
|
+
- **React** (via Claude artifacts) - Interactive visualization
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
## Design System
|
|
564
|
+
|
|
565
|
+
Artifacts use components inspired by the [Claude Visual Style Guide](https://github.com/jcmrs/claude-visual-style-guide) for consistent, accessible rendering:
|
|
566
|
+
|
|
567
|
+
**Components:**
|
|
568
|
+
- Button (default, outline variants)
|
|
569
|
+
- Card / CardHeader / CardTitle / CardContent
|
|
570
|
+
- Badge (success, warning, error)
|
|
571
|
+
- Progress (animated)
|
|
572
|
+
- Collapsible sections
|
|
573
|
+
|
|
574
|
+
**Important:** Artifacts must use **inline SVG icons** - `window.lucide` is not reliably available in Claude's sandboxed environment.
|
|
575
|
+
|
|
576
|
+
All styling uses Tailwind CSS utility classes with semantic tokens for dark mode compatibility.
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## Contributing
|
|
581
|
+
|
|
582
|
+
Contributions welcome! Areas of interest:
|
|
583
|
+
- Multi-language support
|
|
584
|
+
- Performance optimization
|
|
585
|
+
- Additional variant types
|
|
586
|
+
- Integration with SEO tools
|
|
587
|
+
|
|
588
|
+
Please open an issue to discuss before submitting PRs.
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
592
|
+
## License
|
|
593
|
+
|
|
594
|
+
Apache License 2.0
|
|
595
|
+
|
|
596
|
+
Copyright 2024 Houtini Ltd
|
|
597
|
+
|
|
598
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
599
|
+
you may not use this file except in compliance with the License.
|
|
600
|
+
You may obtain a copy of the License at
|
|
601
|
+
|
|
602
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
603
|
+
|
|
604
|
+
Unless required by applicable law or agreed to in writing, software
|
|
605
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
606
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
607
|
+
See the License for the specific language governing permissions and
|
|
608
|
+
limitations under the License.
|
|
609
|
+
|
|
610
|
+
For commercial licensing enquiries, please visit https://houtini.com
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
## Contact & Support
|
|
615
|
+
|
|
616
|
+
**Richard Baxter**
|
|
617
|
+
Houtini.ai
|
|
618
|
+
GitHub: https://github.com/houtiniai
|
|
619
|
+
|
|
620
|
+
**Questions?** Open an issue on GitHub
|
|
621
|
+
**Commercial enquiries:** https://houtini.com
|
|
622
|
+
|
|
623
|
+
---
|
|
624
|
+
|
|
625
|
+
**Status:** ✅ Production Ready - v0.2.0 (Keyword Fan-Out Release)
|
package/dist/index.d.ts
ADDED