feat: content quality / readability checker (MCP tool) - #168
Open
oscaroyomba wants to merge 1 commit into
Open
oscaroyomba wants to merge 1 commit into
oscaroyomba wants to merge 1 commit into
Conversation
Adds check_content_quality, a free MCP tool that fetches a live page and analyzes on-page content quality: - word count, sentence count, Flesch reading-ease score + label - heading structure (H1/H2/H3 counts, H1 text) - image alt-text coverage - internal vs external link counts (by host) - optional target-keyword placement (title/H1/first paragraph) and density No new DB tables, no paid API usage (cheerio-based HTML parsing over a direct fetch, matching the free-tier approach used in the brand-monitoring feature). Basic SSRF guards on the fetch (blocks localhost/private IPs, non-http(s) schemes, non-HTML content-types, 2MB response cap). Wired into src/server/mcp/server.ts alongside the other registered tools. Verified: tsc --noEmit clean, full suite passing (6 new unit tests for the analyzer), same pre-existing knip/vite.config.ts environment issue noted in PR every-app#167 applies here too (unrelated to this change).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
check_content_quality, a free MCP tool for on-page content quality analysis \u2014 part of closing the content-marketing-toolkit gap identified against Semrush's feature set.What it checks, given a URL and optional target keyword:
Why MCP-only, no UI route: mirrors the project's agent-first positioning \u2014 same reasoning as PR #167. Free (no DataForSEO credits), so no billing-context wiring needed either.
Safety: basic SSRF guards on the fetch \u2014 blocks localhost/private IP ranges and non-http(s) schemes, requires an HTML content-type, caps response size at 2MB.
Verified locally:
tsc --noEmitclean (exit 0), full suite passing including 6 new unit tests for the analyzer. Same pre-existingknip/vite.config.tsenvironment issue as PR #167 applies here too, unrelated to this change.