Skip to main content
Glama
dinesh7wd

mcp-server-competitor-content

by dinesh7wd
README.md
# mcp-server-competitor-content

MCP server for competitor content analysis: scrape, keywords, content gaps, heading diffs, readability, quality scores, SERP features, and clustering.

## Install

```bash
cd mcp-server-competitor-content
npm install
npm run build
```

> Run `npm run build` before pointing Cursor at `dist/index.js`.

## Cursor MCP config

Update the path for your machine:

```json
{
  "mcpServers": {
    "competitor-content": {
      "command": "node",
      "args": ["/path/to/mcp-server-competitor-content/dist/index.js"],
      "env": {
        "LOG_LEVEL": "info",
        "RATE_LIMIT_DELAY_MS": "1000",
        "RESPECT_ROBOTS_TXT": "true",
        "ENABLE_HEADLESS_FALLBACK": "true",
        "SERP_PROVIDER": "serpapi",
        "SERP_API_KEY": "your-key"
      }
    }
  }
}
```

## Tools

| Tool | Description |
|------|-------------|
| `scrape_page` | Extract body, headings, meta, links, schema (Playwright fallback if thin SPA HTML) |
| `extract_keywords` | TF-IDF keywords/bigrams from URL or text |
| `content_gap_analysis` | Your content as `url` **or** `raw_text` vs competitor URLs |
| `compare_headings` | H1–H6 outline comparison |
| `readability_score` | Flesch-Kincaid, SMOG, Coleman-Liau |
| `content_quality_score` | Word count, links, media, schema, meta |
| `serp_features` | Featured snippet, PAA, related searches via SerpApi/DataForSEO/CSE (**not** Google scraping) |
| `cluster_competitors` | TF-IDF cosine clustering (optional embeddings via config) |

## Patched blueprint gaps

1. **SERP** — `serpProvider.ts`; fails with `SERP_PROVIDER_UNCONFIGURED` if unset  
2. **Headless** — Playwright only when static body < `HEADLESS_MIN_CONTENT_CHARS`  
3. **robots.txt** — parsed ruleset cached per domain (`ROBOTS_CACHE_TTL_SECONDS`)  
4. **Embeddings** — optional; default clustering is TF-IDF  
5. **Gap analysis input** — `yourContent: { type: "url"|"raw_text", value }`

## Scripts

```bash
npm test
npm run test:coverage
npm run build
npm run dev
```

Logs → **stderr** JSON. stdout reserved for MCP stdio.

## License

MIT

TDQS

A3.7/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct aspect of competitor content analysis: scraping, keyword extraction, heading comparison, gap analysis, readability, quality scoring, SERP features, and clustering. The boundaries are clear, with content_gap_analysis serving as a higher-level composite rather than overlapping with the lower-level tools.

Naming Consistency4/5

All names use snake_case and are descriptive, but patterns are mixed: some follow verb_noun (scrape_page, extract_keywords, cluster_competitors) while others are noun_noun (content_gap_analysis, readability_score, serp_features). This is still readable and predictable, but not a single consistent verb-first convention.

Tool Count5/5

Eight tools is well-scoped for the server's purpose. Each tool covers a meaningful step in competitor content analysis without unnecessary redundancy or feature bloat.

Completeness5/5

The surface covers the core workflow: fetch competitor content, extract and compare keywords/headings, assess readability and quality, detect SERP features, and cluster competitors. No critical operations are missing for the stated domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues