How to Build an Agentic SEO Pipeline with Claude Code and MCP

Wayne Ergle
Wayne ErgleMarch 27, 2026
How to Build an Agentic SEO Pipeline with Claude Code and MCP

An agentic SEO pipeline uses Claude Code as the orchestrator, MCP servers as the data layer, and Airtable as the storage backend. Instead of switching between keyword tools, spreadsheets, and AI chat windows, a single system runs the full research loop — from brand analysis through SERP deep dives — in one session. This post walks through the 13-step architecture behind SearchScope, part of the broader agentic SEO approach we’ve been building at StackEngine.

Why MCP Changes the Architecture

TL;DR: MCP lets Claude Code call external APIs as native tools, which means your AI agent can read, write, and act on live data without custom middleware.

Model Context Protocol (MCP) turns external services into tool calls that Claude Code can invoke directly. DataForSEO becomes a keyword research tool. Airtable becomes a database. No API wrappers. No intermediate scripts. Claude Code reads the MCP tool definitions, understands what each one does, and calls them as part of its reasoning loop.

This matters because the bottleneck in traditional SEO research isn’t the data — it’s the assembly. You pull keywords from one tool, check SERPs in another, paste results into a spreadsheet, then manually cross-reference. An MCP-based pipeline collapses that into a single orchestrated flow where Claude Code decides what to query, interprets the results, and writes structured records directly to Airtable.

The practical difference: what used to take an afternoon of tab-switching now runs in one Claude Code session. And because the agent handles the data plumbing, you spend your time on decisions — which keywords matter, which clusters to pursue, where the gaps are.

The 13-Step Pipeline

TL;DR: The pipeline moves through four phases — setup, broad research, clustering, and deep dives — each building on the data from the previous phase.

Here’s the full sequence:

  1. Verify MCP servers — Confirm DataForSEO and Airtable MCP connections are live. If either is down, the pipeline stops early instead of failing mid-run.
  2. Run brand profile — Analyze the target website, extract core topics, and determine the brand’s current positioning. This grounds every keyword decision in what the brand actually does.
  3. Expand topics into keywords — Use DataForSEO to generate keyword ideas, suggestions, and related terms for each core topic.
  4. Write keywords to Airtable — Store raw keyword data with search volume, difficulty, and intent classification. Claude Code creates the Airtable table schema through MCP if it doesn’t exist yet.
  5. Landscape analysis — Pull SERP data for priority keywords. Identify who ranks, what content types dominate, and where the gaps are.
  6. AI platform assessments — Query ChatGPT, Perplexity, Claude, and Gemini with the same prompts to see which brands and pages they cite. This is AI platform visibility tracking applied at the keyword level.
  7. Cluster results — Group keywords into semantic clusters based on SERP overlap, topic similarity, and intent alignment.
  8. Score and categorize — Rank clusters by opportunity: search volume, difficulty, AI citation gaps, and alignment with the brand’s existing content.
  9. Write results to Airtable — Store clusters with scores, categories, and priority rankings.
  10. Deep dive: full SERP analysis — For priority clusters, pull full SERP results with featured snippets, People Also Ask, and site links.
  11. Deep dive: AI platform analysis — Detailed AI visibility checks for priority terms — who gets cited, in what context, and how often.
  12. Deep dive: Google AI Mode check — Test whether Google’s AI overview triggers for priority keywords, and what content it pulls from.
  13. Write updated cluster records — Push deep dive data back to Airtable, enriching the cluster records with SERP and AI citation details.

Steps 1–4 are setup and broad collection. Steps 5–9 are analysis and organization. Steps 10–13 are targeted deep dives on the clusters that matter most.

How Claude Code Orchestrates the Flow

TL;DR: Claude Code acts as the decision layer — it doesn’t just execute steps sequentially, it reads intermediate results and adjusts what happens next.

The key architectural insight: Claude Code isn’t running a fixed script. It’s making judgment calls at each step based on what the data shows.

After step 3, if DataForSEO returns 2,000 keyword ideas, Claude Code doesn’t blindly process all of them. It filters by relevance, deduplicates, and selects the set worth writing to Airtable. After step 5, if the landscape analysis shows a keyword cluster is dominated by massive authority sites with no realistic entry point, Claude Code deprioritizes it.

Sub-agents handle parallelizable work. When running AI platform assessments in step 6, separate sub-agents can query each platform simultaneously instead of sequentially. This is where the architecture went through three iterations — early versions hit context window limits trying to hold all the data in a single agent’s memory. The solution: specialized sub-agents that handle discrete tasks and write results to Airtable, keeping the orchestrator’s context lean.

The pattern looks like this:

Orchestrator (Claude Code)
├── Brand Analyzer        → reads website, writes brand profile
├── Keyword Expander      → calls DataForSEO, writes to Airtable
├── SERP Analyzer         → pulls rankings, identifies gaps
├── AI Visibility Checker → queries 4 AI platforms in parallel
├── Cluster Engine        → groups and scores keywords
└── Deep Dive Agents      → detailed analysis on priority clusters

Each sub-agent gets a focused task, a clear input, and writes its output to Airtable. The orchestrator reads those results and decides what runs next.

What Three Architecture Versions Taught Us

TL;DR: Context windows are the hard constraint. The system works when you treat Airtable as shared memory and keep each agent’s scope narrow.

Version 1 tried to run everything in a single Claude Code session. It worked for small keyword sets. At scale, the context window filled up with raw API responses, and the agent lost track of earlier analysis.

Version 2 introduced sub-agents but kept intermediate results in memory. Better, but still fragile — if one sub-agent returned unexpectedly large results, it could crowd out the orchestrator’s reasoning space.

Version 3 — the current architecture — treats Airtable as the system’s shared memory. Each agent writes its results to Airtable immediately. The orchestrator reads summaries, not raw data. This mirrors how traditional keyword research breaks down at scale — the difference is that the agentic version solves the assembly problem instead of just generating more data.

The takeaway for anyone building similar systems: design for the context window from day one. If an agent needs to hold more than a few hundred rows of data to make a decision, restructure so it doesn’t.

Getting Started

TL;DR: You need Claude Code, two MCP servers, and an Airtable base. The pipeline creates its own schema.

The prerequisites are straightforward:

  • Claude Code — the orchestrator
  • DataForSEO MCP server — provides keyword data, SERP results, and AI platform queries
  • Airtable MCP server — provides structured data storage with API access
  • An Airtable base — the pipeline creates tables and fields through MCP, so you start with an empty base

You don’t need to predefine the Airtable schema. Claude Code creates the tables it needs — keywords, clusters, SERP data, AI citations — through the Airtable MCP. This is one of the things that surprised us: the agent can design its own data model based on what it’s collecting. You review and adjust, but the initial schema is functional out of the box.

The pipeline fits within the broader agentic SEO framework where AI agents handle research, monitoring, and analysis — and you handle the decisions about what to pursue. The hidden gem keywords that emerge from steps 7–8 are often the most valuable output: clusters with real search volume that competitors haven’t targeted because they require cross-referencing data that manual processes can’t assemble efficiently.

Start with a single topic area. Run the pipeline end to end. Review what it finds. Then expand.

Wayne Ergle

Written by Wayne Ergle