Two MCP Workflows To Speed up Onpage SEO

6 min read • 1,363 words

Onpage SEO involves constantly switching between different tools to perform specific tasks. This manual workflow got me thinking: a significant portion of these tasks could be safely automated by combining AI with SEO tool APIs.

After testing several approaches, I came up with a solution that consistently produces good results: pre-defined workflows following highly specific prompts.

I’ll walk you through two workflows I’ve been using over the past few months. The first automates keyword research based on an article title and predefined content structure. The second helps optimize underperforming content.

At the end, I’ll show you how to clone my GitHub repo and set up these workflows yourself.

What you’ll need:

  • Claude Desktop
  • MCP
  • KeywordsEverywhere API key
  • SERP API key

Let’s get started.

TL;DR

I demonstrate two customized MCP workflows that significantly speed up on-page SEO by automating repetitive tasks using AI and SEO tool APIs. The first workflow automates keyword research based on article structure, while the second optimizes underperforming content.

By following the provided steps, you’ll learn how to set up these workflows using Claude Desktop, MCP, KeywordsEverywhere API, and SERP API. These workflows not only save time but also provide actionable recommendations for optimizing article structure, content, and technical aspects.

With these workflows, you’ll be able to create well-optimized content more efficiently, ultimately improving your SEO results. The best part is that you can customize these workflows to fit your specific needs and use other SEO APIs if preferred.

Workflow 1: Onpage keyword research

Purpose: Structure-based keyword research and SERP optimization for new content creation.

Best for: Blog posts, content marketing, planning new articles

How does the workflow work

Step 1: Article Structure Analysis

Takes your article idea (title, heading structure, content outline) and extracts:

  • Core topic identification and main theme
  • Content intent analysis (educational, commercial, informational)
  • Target audience level assessment
  • Content type classification (how-to, listicle, comparison, guide)

Step 2: Semantic Topic Discovery & Keyword Research

Uses Keywords Everywhere API to:

  • Extract 3-5 seed keywords from your topic analysis
  • Run related_keywords_discovery for semantic keyword expansion
  • Execute keyword_research_analysis for volume/competition data
  • Apply keyword_opportunity_scorer to prioritize targets
  • Map semantic relationships between topic clusters

Step 3: SERP Analysis & Intent Classification

Uses SerpAPI to:

  • Run classify_search_intent_data to understand what Google expects
  • Execute serp_data_collector for the current SERP landscape analysis
  • Analyze SERP features (featured snippets, PAA, related searches)
  • Map content format preferences from top results

Step 4: Content Structure Optimization

Generates specific recommendations:

  • Optimized article structure with strategic heading placement
  • Keyword integration strategy across H1-H6 hierarchy
  • Content sections to add based on competitor gap analysis
  • SERP feature targeting (FAQ sections for PAA opportunities)

Step 5: Implementation Checklist

Provides an actionable roadmap:

  • Title optimization with primary keyword placement
  • Heading restructure based on SERP insights
  • Content length targets vs competitors
  • Internal linking strategy
  • Schema markup recommendations

Example: “How to Start a Home Garden” Article

Input Structure:

H1: "How to Start a Home Garden"
H2: "Choosing Your Garden Location"  
H2: "Essential Gardening Tools"
H2: "Best Plants for Beginners"
H2: "Watering and Care Tips"

Workflow Output:

SEMANTIC ANALYSIS RESULTS:
Core Topic Clusters Identified:
- Garden planning and setup (primary)
- Plant selection and tool requirements (supporting)  
- Maintenance routines and care (supporting)
- Seasonal timing and space planning (missing)

KEYWORD RESEARCH FINDINGS:
Primary: "how to start a garden" (12,100 volume, medium competition)
Semantic Variations: "beginner garden setup" (890 volume), "garden planning guide" (720 volume)
Opportunity Keywords: "container gardening for beginners" (1,200 volume, low competition)
Long-tail Targets: "when to start a vegetable garden" (480 volume, very low competition)

SERP ANALYSIS INSIGHTS:
- 70% of top results include seasonal timing sections (missing from current structure)
- Budget considerations appear in 60% of top content (gap opportunity)
- Garden types (container, raised bed, in-ground) covered by all top 5 results
- FAQ sections present in 80% of ranking content

OPTIMIZED STRUCTURE RECOMMENDATIONS:
H1: How to Start a Garden: Complete Beginner's Guide
H2: Planning Your Garden Layout and Location
H2: Garden Types: Container vs Raised Bed vs In-Ground
H2: When to Start Your Garden (Seasonal Timing Guide)
H2: Essential Gardening Tools for Beginners
H2: Best Plants for New Gardeners
H2: Budget-Friendly Garden Setup Tips
H2: Watering, Care, and Maintenance Schedule
H2: Common Beginner Mistakes to Avoid (FAQ)

IMPLEMENTATION CHECKLIST:
□ Add seasonal timing section (competitor gap)
□ Include garden types comparison (SERP requirement)
□ Create FAQ section targeting PAA questions
□ Integrate "container gardening" keyword cluster
□ Add budget considerations throughout
□ Target 2,500-3,000 words (competitor average: 2,800)

Workflow 2: Existing Content Optimization

Purpose: Improves underperforming content into top-ranking pages through comprehensive analysis.

Best for: Optimizing existing blog posts, landing pages, product pages that aren’t ranking

How does the workflow work

Phase 1: Deep Current State Analysis

  • scrape_seo_data → Extract all content and technical elements
  • page_speed_metrics (desktop + mobile) → Performance baseline
  • validate_structured_data → Schema analysis and rich results eligibility
  • collect_server_headers → Technical infrastructure audit
  • detect_javascript_rendering → Crawlability assessment

Phase 2: Competitive Landscape & Intent Analysis

  • classify_search_intent_data → Intent classification for primary keyword
  • serp_data_collector → Current SERP landscape mapping
  • analyze_serp_content_alignment → Content gap analysis vs top 10 results
  • analyze_serp_feature_opportunities → SERP feature targeting strategy

Phase 3: Semantic & Keyword Universe Expansion

  • related_keywords_discovery → Semantic keyword expansion
  • keyword_research_analysis → Volume/competition data for expanded list
  • keyword_opportunity_scorer → Strategic prioritization
  • Multiple rounds of semantic mapping for related entities and concepts

Phase 4: Advanced Content Gap Analysis

  • scrape_seo_data on top 3-5 competitors
  • page_speed_metrics for performance benchmarking
  • Content depth assessment and topic coverage analysis
  • Authority signal identification and competitive advantage mapping

Phase 5: NLP & Content Quality Analysis

  • Semantic analysis (entity coverage, topic modeling, keyword density)
  • Readability assessment (Flesch scores, sentence structure, paragraph length)
  • Authority signals audit (expertise, citations, freshness indicators)
  • Conversion optimization analysis (user intent alignment, CTA placement)

Phase 6: Comprehensive Optimization Strategy

  • Technical enhancement recommendations (Core Web Vitals, schema, mobile)
  • Content transformation strategy (semantic enrichment, structure optimization)
  • Authority building plan (expert sources, original research, social proof)
  • Conversion optimization (intent alignment, user experience improvements)

Example: Underperforming “Email Marketing Automation” Page

Current State Analysis:

COMPETITIVE ANALYSIS:
Top 10 Competitor Patterns:
- 90% include automation workflow examples (missing from our content
- 80% have tool comparison sections (we have brief mentions only)
- 70% include ROI/metrics sections (completely missing)
- 60% have video content embedded (we have none)
- Average content depth: 3,800 words with 15+ subsections

Keyword Universe Expansion:

SEMANTIC KEYWORD ANALYSIS:
Primary Cluster: "email marketing automation" (8,100 volume)
Supporting Keywords Discovered:
- "marketing automation workflows" (1,200 volume, medium comp)
- "email sequence automation" (890 volume, low comp)  
- "automated email campaigns" (2,400 volume, high comp)
- "drip campaign automation" (720 volume, medium comp)

Gap Analysis vs Current Content:
Missing 23 related keywords that competitors rank for:
- "email automation tools comparison" (650 volume)
- "automated email marketing ROI" (380 volume)
- "email workflow templates" (540 volume)

Comprehensive Optimization Strategy:

CRITICAL PRIORITY FIXES (Week 1-2):
□ Add FAQ schema targeting 8 PAA questions
□ Implement lazy loading for 1.5s LCP improvement
□ Restructure H2/H3 hierarchy with semantic keywords
□ Add internal links to 5 related automation articles

HIGH PRIORITY CONTENT (Week 3-6):
□ Add 1,200-word "Automation Workflow Design" section
□ Create tool comparison table (HubSpot vs Mailchimp vs ActiveCampaign)
□ Include ROI calculator and metrics tracking section
□ Add 8 workflow template examples with screenshots

STRATEGIC DIFFERENTIATION (Week 7-12):
□ Embed video walkthrough of automation setup
□ Add interactive workflow builder tool
□ Include original survey data on automation ROI
□ Create downloadable workflow template library

KEYWORD INTEGRATION PLAN:
- "marketing automation workflows" → New H2 section
- "email sequence automation" → Dedicated subsection  
- "automated email campaigns" → Case study examples
- "drip campaign automation" → FAQ section targeting

Both workflows connect to SEO APIs for data collection, then Claude applies optimization logic following the workflow specified in the prompts to generate recommendations.

How to set it up

Step 1: Clone the Repository

git clone https://github.com/dexter480/mcp-seo-workflows
cd seo-workflows-claude
pip install -r requirements.txt

Step 2: Get Free API Keys

Step 3: Configure Environment Variables

cp .env.example .env

Edit the .env file with your API keys:

KEYWORDS_EVERYWHERE_API_KEY=your_key_here
SERPAPI_KEY=your_key_here
GOOGLE_PAGESPEED_KEY=your_key_here

Step 4: Connect to Claude Desktop

Find your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "seo-analyzer": {
      "command": "python",
      "args": ["/full/path/to/your/seo_scraper_mcp.py"]
    }
  }
}

Important: Replace /full/path/to/your/ with the actual absolute path to where you cloned the repository.

Step 5: Test the Setup

  1. Restart Claude Desktop
  2. Try this test prompt:
Use the scrape_seo_data tool to analyze https://google.com

If you get SEO data back, you’re ready to use the workflows!

Flexibility

The best part of these workflows is the flexibility. Once you understand how it works, you’ll realize that you can automate a ton of on-page tasks, some more reliably than others.

You also don’t have to use the APIs I used here. You can use DataForSEO or Ahrefs API, there are no rules.

Leave a comment

Your email address will not be published. Required fields are marked *