mcp-server-competitor-content
You can use this MCP server to analyze competitor content by scraping pages and running keyword, gap, heading, readability, quality, SERP, and clustering analyses.
Scrape pages to get clean body text, headings, meta, links, and JSON-LD schema signals, with optional headless fallback for thin SPAs.
Extract ranked TF-IDF keywords and bigrams from a URL or raw text.
Compare your URL/raw text against up to 10 competitor URLs to find missing keywords, heading gaps, and similarity scores.
Diff H1–H6 outlines across multiple competitor URLs.
Score readability with Flesch-Kincaid, SMOG, and Coleman-Liau metrics.
Score content quality by word count, links, media, schema, meta, and headings (summary only).
Detect SERP features like featured snippets, PAA, related searches, and organic results via SerpApi.
Cluster competitor pages by TF-IDF cosine similarity, with optional embeddings via config.
Run it locally over stdio with security controls such as SSRF/DNS-rebinding protection, robots.txt handling, rate limits, and capped responses.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-competitor-content Analyze content gaps between our page and top 3 competitors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-competitor-content
MCP server for competitor content analysis: scrape, keywords, content gaps, heading diffs, readability, quality scores, SERP features, and clustering.
stdio only — run on your own machine. Do not expose as a remote HTTP MCP endpoint.
Install
Requires Node.js 22 or newer.
cd mcp-server-competitor-content
npm install
npm run buildFor headless SPA fallback:
npx playwright install chromiumBuild before pointing any client at
dist/index.js. Env vars come from the client MCP config (there is no dotenv loader)..env.exampleis a reference only.
Related MCP server: SEO MCP Server
Cursor
{
"mcpServers": {
"competitor-content": {
"command": "node",
"args": ["D:/MCP/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": "${env:SERP_API_KEY}"
}
}
}
}Claude Desktop
Add to claude_desktop_config.json (absolute path required):
{
"mcpServers": {
"competitor-content": {
"command": "node",
"args": ["/absolute/path/mcp-server-competitor-content/dist/index.js"],
"env": {
"SERP_PROVIDER": "serpapi",
"SERP_API_KEY": "your-key"
}
}
}
}Claude Code
claude mcp add competitor-content -- node /absolute/path/mcp-server-competitor-content/dist/index.jsNote: Claude Code caps MCP responses (~25k tokens). scrape_page returns at most maxChars characters of body text (default 20,000, max 100,000) and sets truncated: true when it cuts.
Tools
Tool | Description |
| Clean body (capped by |
| Ranked keywords/bigrams from URL or text |
| Your |
| H1–H6 outlines per URL, side by side |
| Flesch-Kincaid, SMOG, Coleman-Liau |
| Word count, links, media, schema, meta (summary only, no body text) |
| SerpApi only ( |
| Corpus TF-IDF cosine clustering |
Multi-URL tools fetch up to 3 pages at a time; requests to the same host are still spaced by RATE_LIMIT_DELAY_MS. content_gap_analysis, compare_headings, and cluster_competitors send notifications/progress (one per fetched page) when the client supplies a progressToken.
Pages are decoded using the BOM, then the Content-Type charset, then a <meta charset> / http-equiv tag in the first 2 KB, then UTF-8 (unknown labels fall back to UTF-8). Headless renders wait for domcontentloaded, then up to 3 s for network idle within HEADLESS_TIMEOUT_MS.
Security
Every hostname is resolved and all A/AAAA records must be public (private, loopback, CGNAT, link-local, documentation, benchmark, 6to4 relay
192.88.99.0/24, and NAT64/6to4/IPv4-mapped forms of those are blocked). IPv6 is an allow-list: only global unicast2000::/3passes, minus2001::/23(incl. Teredo),2001:db8::/32and3fff::/20. The HTTP client connects only to the addresses it validated, so DNS rebinding cannot swap in a private IP between check and connect.Redirects use
redirect: "manual"and are re-validated per hop.Headless (Playwright) renders are pinned too: Chromium is launched with its own DNS disabled, every request is intercepted and fetched by the same pinned client (redirects followed and re-checked in Node, max 150 requests per render; images, media and fonts skipped), then handed back to the browser. Service workers and WebSockets are blocked and your configured
USER_AGENTis used.robots.txt patterns are matched without regular expressions (linear time), and patterns are capped at 512 characters, so a hostile robots.txt cannot stall the server.
API keys are stripped from error messages and stderr logs (query strings redacted).
Response bodies are capped (
MAX_BODY_BYTES, default 2MB); text capped (MAX_TEXT_CHARS).scrape_pagenever returns raw HTML;bodyTextis wrapped as untrusted content.robots.txt (RFC 9309): product-token matching, merged groups, case-sensitive
*/$patterns, 4xx → allow, 5xx → deny, unreachable → deny for 60 s, files over 512 KiB truncated and parsed. Redirects to another host are checked against that host's robots.txt.
Configuration
Set env vars in your MCP client config; see .env.example for all of them. NODE_ENV defaults to production, which hides unexpected internal error messages from clients; set NODE_ENV=development locally to see them.
SERP
Only SerpApi is supported. DataForSEO and Google CSE stubs were removed (broken / discontinued).
Scripts
npm test
npm run test:coverage # enforces 80% statements/branches/functions/lines over src/
npm run typecheck # includes tests
npm run build
npm run lintLogs → stderr JSON. stdout reserved for MCP stdio.
License
MIT
Available Tools
8 toolscluster_competitorsCluster competitorsB
Group competitor pages by TF-IDF cosine similarity (embeddings optional via config).
Inputs: urls (required), k.
compare_headingsCompare headingsC
Diff H1–H6 outlines across multiple competitor URLs.
Inputs: urls (required).
content_gap_analysisContent gap analysisA
Compare your content (URL or raw_text) against competitor URLs to find missing keywords, heading gaps, and similarity scores.
Inputs: yourContent (required), competitorUrls (required).
content_quality_scoreContent quality scoreB
Score content quality: word count, links, media, schema, meta, headings.
Inputs: url (required).
extract_keywordsExtract keywordsB
Extract TF-IDF keywords and bigrams from a URL or raw text.
Inputs: url, text, topK.
readability_scoreReadability scoreC
Flesch-Kincaid, SMOG, and Coleman-Liau readability metrics for a URL or raw text.
Inputs: url, text.
scrape_pageScrape pageA
Fetch and extract clean article body, headings, meta, links, and schema signals from a URL (headless fallback for thin SPA HTML).
Inputs: url (required), forceHeadless.
serp_featuresSERP featuresA
Detect featured snippets, PAA, related searches, and organic results via configured SERP API (never scrapes Google directly).
Inputs: query (required), region.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
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.
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.
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.
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
Related MCP Connectors
Competitor backlink gaps, page-by-page link plans, publisher matches and link monitoring.
SEO competitor intelligence for AI agents: content gaps, backlink opportunities, AI-citation topics.
Competitor and SEO analysis in one report.
SEO, competitor and AI-search data, plus blog management — draft, schedule and publish posts.
Related MCP Servers
- AlicenseBqualityCmaintenanceAdvanced content gap analysis using Query Decomposition and Keyword Fan-Out (Google's patented methodology). Tells you exactly what user queries your content covers - and what it misses. Built on academic research because I needed to understand how AI search engines actually evaluate content.1141 npm15Apache 2.0
- AlicenseAqualityDmaintenanceEnables SEO page generation with competitor research and Schema.org structured data. Provides tools to search competitors for a keyword and generate high-quality SEO content with FAQPage schema.28 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables competitive analysis by validating companies, identifying sectors and top competitors, and generating comparative reports with actionable insights.-
- FlicenseAqualityCmaintenanceEnables fetching, crawling, and analyzing web pages with 29 tools for SEO audits, content extraction, and more.29-