On-page SEO often requires constantly switching between different tools to handle 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.
Topics
TL;DR
I automate 70% of on-page SEO tasks by combining AI with SEO tool APIs, creating pre-defined workflows that follow highly specific prompts. In this article, I’ll walk you through two workflows: one for structure-based keyword research and another for optimizing underperforming content.
The first workflow automates keyword research based on an article title and predefined content structure, providing recommendations for optimized article structure, keyword integration strategy, and implementation checklist.
The second workflow optimizes existing content by analyzing the current state, competitive landscape, and intent, expanding the keyword universe, conducting advanced content gap analysis, and generating a comprehensive optimization strategy.
You’ll need Claude Desktop, MCP, KeywordsEverywhere API key, and SERP API key to set up these workflows. Let’s get started!
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 the workflow works
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 elementspage_speed_metrics
(desktop + mobile) → Performance baselinevalidate_structured_data
→ Schema analysis and rich results eligibilitycollect_server_headers
→ Technical infrastructure auditdetect_javascript_rendering
→ Crawlability assessment
Phase 2: Competitive Landscape & Intent Analysis
classify_search_intent_data
→ Intent classification for primary keywordserp_data_collector
→ Current SERP landscape mappinganalyze_serp_content_alignment
→ Content gap analysis vs top 10 resultsanalyze_serp_feature_opportunities
→ SERP feature targeting strategy
Phase 3: Semantic & Keyword Universe Expansion
related_keywords_discovery
→ Semantic keyword expansionkeyword_research_analysis
→ Volume/competition data for expanded listkeyword_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 competitorspage_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
- Keywords Everywhere: keywordseverywhere.com – 100 searches/month free
- SerpAPI: serpapi.com – 100 searches/month free
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
- Restart Claude Desktop
- 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.
Quick FAQ
Do I need to know how to code to use these workflows?
Not at all. These workflows are designed so that you don’t need coding skills. You follow the setup instructions once, and then you can run everything by giving prompts. The scripts and APIs handle the technical work for you.
Can I swap out the tools (APIs) used here?
Yes. I used Keywords Everywhere and SerpAPI in my examples because they’re cheap. But you can use others like Ahrefs, SEMrush, or DataForSEO if you prefer. The structure of the workflow will stay the same.
Why should I automate keyword research and SERP analysis?
Because it saves hours of repetitive work. Instead of jumping between different SEO tools and spreadsheets, the workflow collects the data for you, organizes it, and gives you clear recommendations. This way, you can spend your time making content decisions instead of crunching numbers.
What type of content is Workflow 1 best for?
Workflow 1 is perfect when you’re creating something new, like a blog post, how-to guide, or listicle. It helps you plan the structure, pick the right keywords, and make sure your article matches what Google is rewarding in the search results.
When should I use Workflow 2?
Workflow 2 is designed for content you’ve already published that isn’t performing well. It helps you see why competitors might be outranking you, what’s missing from your content, and how to improve your page to give it a better chance at climbing up the SERPs.
How much does it cost to run?
Both Keywords Everywhere and SerpAPI give you a free tier (100 searches per month). That’s usually enough for testing or smaller projects. If you’re working on lots of content, you may want a paid plan but you can also mix in other free tools.
Do these workflows replace a full SEO strategy?
No, they don’t replace everything. They handle on-page SEO tasks like keyword research, content structure, and SERP optimization. You’ll still need off-page strategies like link building and promotion if you want to rank for competitive terms.
Can I adapt these workflows for my niche?
Yes, that’s the beauty of them. Once you understand the process, you can customize prompts and scoring to fit your industry. Whether you’re in e-commerce, SaaS, travel, or health, the same approach works, you just feed it different inputs.