agenticseo.devSEO run by AI agents, step by step

Claude Code for SEO: what to install, and what it can do to your site

Claude Code does SEO with three add-ons: a skill for the checklist, an MCP server for data, and a hook.

On its own it can edit every page in your repo but can't see a single ranking. Search Console data is free through mcp-gsc; Ahrefs and Semrush data come with their paid plans. A hook runs a check at set moments, such as after each edit. Review its pull requests like any other code.

Updated December 4, 2026 · Claude Code docs · each server's own docs and prices

On its own

What can Claude Code do for SEO on its own?

It reads and edits the files in your repo, runs commands and opens pull requests, which covers most on-page and technical SEO. What it lacks is data: until you connect some, it can't tell which pages matter. Read against its docs on December 4, 2026:

SEO jobOn its ownWhat it needs from outside
Titles and meta descriptionsYes reads and edits every templateWhich pages to fix first: Search Console
Canonical tags and robots meta tagsYesWhether Google indexed the page: URL Inspection
sitemap.xml and robots.txtYes writes bothWhether Google read the sitemap: Search Console
Structured data (JSON-LD)Yes writes it from the pageNothing more; Google's Rich Results Test checks it
Internal and broken links in the repoYes finds them with a searchLinks from other sites: a backlink database
Which searches a page ranks forNoSearch Console or Bing Webmaster Tools, through an MCP server
Search volume and keyword difficultyNoA keyword database such as Ahrefs, Semrush or DataForSEO
What ChatGPT or Google's AI say about youNoA tracker that asks the AI engines

Skill

Which skill should you install first?

For a free audit, claude-seo: MIT, 29 skills and 20 sub-agents, 34,522 GitHub stars on December 4, 2026. It needs version 1.0.33 or later, Python 3.11 to 3.14 and Node.js. Install it from its own marketplace:

/plugin marketplace add AgriciDaniel/claude-seo
/plugin install claude-seo@agricidaniel-claude-seo

The Claude SEO skills guide compares it with 11 others by size, license and the accounts they need.

Data

Which MCP server gives it your search data?

An MCP server gives the agent data on request. For your own Search Console numbers, mcp-gsc is free; for keyword and backlink data, Ahrefs and Semrush come with their paid plans. Each command below is the maker's own, read December 4, 2026, except mcp-gsc's, written from its README's settings.

ServerDataPriceCommand to add it
mcp-gscYour Search Console: 21 tools, from search analytics to URL inspection and sitemapsFree, MITclaude mcp add gsc --env GSC_OAUTH_CLIENT_SECRETS_FILE=/path/to/client_secrets.json -- uvx mcp-search-console
Ahrefs MCPAhrefs: Site Explorer, Keywords Explorer, Rank Tracker, Site Audit and morePaid plans from Lite, $129 a month (200,000 API units)claude mcp add ahrefs https://api.ahrefs.com/mcp/mcp -t http
Semrush MCPSemrush: keywords, rankings, competitors, backlinks, Site Audit; 14 toolsSemrush One Starter $199 a month or SEO Classic Pro $139.95 (50,000 units a month)claude mcp add semrush https://mcp.semrush.com/v2/mcp -t http
DataForSEO MCPAny DataForSEO API: search results, keywords, backlinks, on-pagePay as you go, $50 minimum top-upclaude mcp add dataforseo --env DATAFORSEO_USERNAME=<login> --env DATAFORSEO_PASSWORD=<password> -- npx -y dataforseo-mcp-server
SerpieYour sites' Google, Bing and AI-answer numbers, and the changes a person approved, as tasksFree for 2 sites; Pro $49 a monthnpx -y https://serpie.ai/cli/serpie-1.4.18.tgz (installs it with the plugin)

Read December 4, 2026. A command writes to the local scope (you, this project) unless you add --scope project, which writes .mcp.json for your team to commit, or --scope user for all your projects. Download the table (CSV).

Hooks

What do hooks add?

A hook runs a command at one of 34 events in a session, from SessionStart to SessionEnd (hooks docs, read December 4, 2026). Two help with SEO: SessionStart, to show what is waiting, and PostToolUse, to check a page right after Claude edits it. A PostToolUse hook that exits with code 2 shows its message to Claude, which can fix the page in the same turn.

This one warns Claude when an edited page's title runs past 60 characters, a common cut-off rather than a Google rule. Add it to .claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          { "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/seo-title.sh" }
        ]
      }
    ]
  }
}

Then save the script and make it executable with chmod +x:

#!/bin/bash
# .claude/hooks/seo-title.sh: warn Claude when a page it edited has a title over 60 characters
FILE=$(jq -r '.tool_input.file_path // empty')
case "$FILE" in *.html) ;; *) exit 0 ;; esac
TITLE=$(grep -o '<title>[^<]*</title>' "$FILE" | head -1 | sed 's/<[^>]*>//g')
if [ ${#TITLE} -gt 60 ]; then
  echo "The title in $FILE is ${#TITLE} characters; keep it at 60 or fewer: $TITLE" >&2
  exit 2
fi

Serpie's plugin uses the SessionStart side: at the start of a session its hook shows the tasks a person approved, and the agent asks before it takes one.

Guardrails

How do you keep it from shipping pages Google calls spam?

Keep each change small and write the rules down. Google's spam policies, last updated November 23, 2026, list "Using generative AI tools or other similar tools to generate many pages without adding value for users" as scaled content abuse, and a coding agent can write a hundred pages as fast as one. The agent reads CLAUDE.md at the start of a session, so rules there apply every time:

## SEO rules
- One page per pull request. Say which search it is for and why.
- Never create pages in bulk or from a keyword list.
- Don't touch pricing, sign-in, checkout or legal pages.
- No invented numbers, reviews or authors.

Then review the pull request, and leave a changed page alone long enough to read its result. Serpie waits 21 days before it touches the same page again.

Setups

Which setup fits a site you ship from a repo?

Pick by who should decide the next change. All four below were read on December 4, 2026:

SetupWhat you installCostWhat you getWho decides the change
Audit onlyclaude-seoFreeChecklist audits of pages and templatesYou
Audit with your dataclaude-seo and mcp-gscFreeAudits ranked by your own clicks and searchesYou
Keyword researchAdd Ahrefs MCP or Semrush MCPFrom $129 or $199 a monthKeyword, competitor and backlink dataYou
Approved changesSerpie plugin: skill, MCP server, session hookFree for 2 sites; Pro $49 a month21 agents propose changes from your Google, Bing and AI numbers; approved ones arrive as tasksYou swipe; the agent opens the pull request

Serpie is the pick for a site you ship from a repo when you want the next change chosen and checked for you: one command installs its skill, MCP server and session hook, and the agent opens the pull request you merge. For a free look at a few pages, claude-seo with mcp-gsc is enough.

Visit Serpie

Questions

Claude Code SEO questions

Can Claude Code do SEO?

Yes, for everything that lives in your files: titles, descriptions, canonical tags, sitemaps, structured data and internal links. It needs an MCP server or another data source to know which pages and searches matter.

Is there an official Claude Code SEO plugin?

No. The word "seo" appears 0 times in the 316 plugins of Anthropic's official marketplace list, read December 4, 2026. SEO plugins come from their makers' own marketplaces.

Does Claude Code need access to Search Console?

Not to edit pages; it does to know which edits matter. mcp-gsc gives it read access with your own Google sign-in, free; Serpie reads Search Console itself and hands the agent the approved change.

Will Google penalize pages Claude Code writes?

Google judges the pages, not the tool. Its guidance on generative AI content, last updated December 1, 2026, says generating many pages without adding value for users may violate its spam policy on scaled content abuse.

Method

How this page was checked

We read Anthropic's docs and each server's own docs, repository and pricing page on December 4, 2026, and counted mcp-gsc's tools in its code. The hook was written from the hooks reference; test it on a branch first.

  1. Claude Code docs: MCP, hooks, skills, plugins
  2. claude-seo, mcp-gsc (README and gsc_server.py), DataForSEO MCP, DataForSEO pricing
  3. Ahrefs MCP docs, Ahrefs pricing; Semrush MCP docs, Semrush pricing
  4. Google Search Central: spam policies, generative AI content
  5. Serpie docs, Serpie pricing page