Build an MCP-powered SEO agent in Claude Code
A reusable Claude Code project that runs end-to-end SEO ops via the CitationBench MCP server — tell Claude what you want, it composes tools, persists results, and pauses for approval.
A reusable Claude Code project that runs end-to-end SEO ops via the CitationBench MCP server. Tell Claude what you want; it composes tools, persists results in your workspace, and pauses for approval where it matters.
| Outcome | A .claude/ setup that gives Claude Code a sharp SEO agent persona scoped to your workspace |
| Time | ~15 min setup |
| Cost | Varies by what you ask the agent to do; demo mode is free |
| Prereqs | Claude Code, CitationBench API key, a workspace |
What it does
You ask Claude in plain language:
"Bootstrap acme.com and queue 10 blog posts for the top problem-solution keywords."
Claude:
agent.invoke(skill: bootstrap_brand)
↓ waits, narrates progress
research.keyword.search (intent: PROBLEM_SOLUTION, missingFromContent, maxKd: 35, limit: 10)
↓
produce.blog_post.bulk
↓
reports back with credit usage and links to draftsStep 1 — Connect the MCP server
claude mcp add citationbench https://mcp.citationbench.com/mcp \
--header "Authorization: Bearer $CITATIONBENCH_API_KEY" \
--header "X-Workspace-Id: $WORKSPACE_ID"Verify with claude mcp list. (Or, to start without an account, omit the headers for demo mode.)
Step 2 — Drop in a CLAUDE.md
Create CLAUDE.md in your project root. This is the agent persona.
# SEO ops agent for Acme
You're our SEO and GEO ops agent. You have CitationBench MCP tools.
## Workspace
- Brand: Acme PM (project management for engineering teams)
- Workspace ID: ws_acme
- Primary content URL: https://acme.com/blog/engineering-team-capacity-tracking
## Defaults
- Always check workspace context (research.keyword.search filters) before producing content
- Prefer `with-research` mode for blog posts
- Always apply rfn_brand-voice + rfn_seo-cleanup refiners
- Pause for approval on: publish, outreach send
## Cadence
- Mondays: weekly rank check, surface drops of 5+ positions
- Daily: AI citation snapshot across our top 20 prompts
- Continuous: respond to inbound link-building requests via the inbound queueThe MCP tools light up. Claude reads CLAUDE.md to set its working context.
Step 3 — Build skills (reusable Claude Code commands)
Drop these in .claude/skills/ as separate markdown files.
.claude/skills/bootstrap.md
# Bootstrap a new client
When asked to bootstrap a brand:
1. Call agent.invoke(skill: bootstrap_brand, input: { domain: <user-provided>, depth: "thorough" })
2. Stream events until SUCCEEDED
3. Surface the result.workspaceId, the keyword count by intent, the top 3 competitors
4. Ask: should I queue landing pages from the 6 briefs?.claude/skills/weekly-ops.md
# Weekly ops run
Every Monday:
1. workspaces.bulk_action with action=agent.invoke, skill=rank_monitor, alertOn={drop:5}
2. For each drop:
- Fetch the keyword + content
- Call produce.evaluate
- If score < 70: spawn refresh_stale at WAITING_APPROVAL
3. Summarize: total checks, drops, queued refreshes.claude/skills/inbound-triage.md
# Triage inbound link requests
Each morning:
1. link_building.inbound.pending — get the queue
2. For each message, render: from, subject, classification, escalation reason, draft preview
3. Ask: approve / approve-with-edits / reject / mark spam — one at a timeStep 4 — Try it
claude> Run the weekly-ops skillClaude reads .claude/skills/weekly-ops.md, runs it. You'll see each tool call inline.
> Bootstrap newclient.com — depth thoroughClaude runs the bootstrap skill. After ~20 minutes you have a fully populated workspace.
> Triage today's inboundYou walk through the queue interactively.
Step 5 — Share with the team
Commit CLAUDE.md + .claude/skills/ to your repo. Every team member who runs Claude Code in this repo gets the same SEO agent persona + skills.
Cross-workspace patterns
For agencies, the same setup pattern works — but Claude calls workspaces.bulk_action and references workspaces by tag:
# in CLAUDE.md
- Agency: yes
- Workspaces tagged "tier:premium" should be auto-refreshed on rank drops
- Workspaces tagged "tier:standard" should only alert, not auto-refreshClaude reads the tags and behaves differently per client.
Gotchas
- Always include workspace context in CLAUDE.md. Without it, Claude doesn't know which workspace to act on and either asks every time or guesses.
- Skills are markdown, not code. They're free-form instructions; Claude follows them flexibly. Don't over-engineer.
- Demo mode is great for development. Build your skills and CLAUDE.md against demo mode first; swap in the live key when ready.
- Approval gates still apply server-side. Even if your skill says "publish," the workspace's approval policy can hold the invocation at
WAITING_APPROVAL.
Related
- API: Agent · invoke
- API: Inventory
- MCP: Catalog
- MCP: Setup — Claude Code
- Concept: Agent
- Playbook: Keyword research for a brand in 20 minutes
Auto-respond to link requests
Set up an agent that ingests inbound link emails, classifies them, drafts replies, sends safe cases autonomously, and escalates only payment requests and high-value partners.
Refresh stale content
When a high-value page drops in rank, the agent audits it against the current SERP, regenerates weak sections, and queues an approval-gated refresh — same loop for AI citation drops.