How to use Claude Code for SEO in your codebase

Claude Code is strong at technical SEO because it can read your whole repository, trace a URL to its route and change templates, redirects and robots rules in one session. What it lacks is evidence about what is actually broken. Connected to Brand Armor AI, it reads which pages AI crawlers fail on, what your saved crawler diagnostics flag and which pages Search Console says are slipping, then fixes those first.

  • Sign in with OAuth, API key optional
  • Setup in about 1 minute
  • Setup checked against Anthropic's docs, 29 November 2026

Claude Code marketing workflows, step by step

How to use Claude Code to fix crawl errors on your site

Start from the URLs bots actually requested and failed on, not from a generic audit. Brand Armor AI lists the AI crawler requests that returned errors, and Claude Code maps each URL to the route, redirect or missing page in your code and proposes the fix.

  1. Ask Brand Armor AI for AI crawler requests that returned 4xx or 5xx status codes this month.
  2. Have Claude Code group the failing URLs by cause, such as a removed route, a broken redirect or a server error.
  3. Review the proposed redirects and route fixes as a diff before committing.
  4. After deploying, check the crawler analytics again to confirm the same bots now get a successful response.
Prompt for Claude Code
Use Brand Armor AI to list AI crawler requests that failed this month. For each URL, find the route or redirect in this repo, explain why it fails and propose a fix. Do not commit yet.

Result: A reviewed set of route and redirect fixes for the exact URLs crawlers could not load.

How to use Claude Code to make your site readable for AI crawlers

AI crawlers often fail quietly: a robots rule blocks them, or the main content only appears after JavaScript runs. Claude Code can check robots.txt, middleware and rendering in your code, while Brand Armor AI shows which bots visit, which pages they request and what your saved crawlability diagnostics found.

  1. Pull the crawlability issues from your saved Brand Armor AI crawler diagnostics.
  2. Ask Claude Code to compare your robots.txt and any bot-blocking middleware with the AI crawlers that visit your site.
  3. Have it find pages whose main text is rendered only on the client and suggest server rendering or static output for them.
  4. Use the safe page fetch in Brand Armor AI to confirm the public HTML now contains the content.
Prompt for Claude Code
Read our saved crawler diagnostics and live AI crawler analytics in Brand Armor AI. Check robots.txt and middleware in this repo for rules that block those bots, and list pages whose main content needs JavaScript to appear.

Result: Robots rules and rendering that let the AI crawlers you care about read your key pages.

What Claude Code does on its own, and what it needs Brand Armor AI for

Claude Code on its own

  • Reads an entire repository and traces a URL to the route, template or config that serves it.
  • Edits redirects, robots rules, metadata and rendering logic, then runs your build and tests.
  • Explains each change in a reviewable diff before anything is committed.

With Brand Armor AI connected

  • It cannot see which AI crawlers request your pages or which requests fail; Brand Armor AI provides live AI crawler analytics.
  • It does not know which pages Search Console shows slipping or which prompts mention them; Brand Armor AI attaches that evidence to each opportunity.
  • It cannot check the result after you deploy; Brand Armor AI lets you confirm crawler errors recover and refresh the opportunity.

Every connection starts read-only. Posts are saved as drafts unless you ask to schedule or publish, and you approve actions when you connect. See everything an agent can do in Brand Armor AI.

How to connect Claude Code to Brand Armor AI

You need a Brand Armor AI account with your website and social channels connected. You add Brand Armor AI to Claude Code with one command, claude mcp add --transport http brandarmor https://api.brandarmor.ai/mcp, then sign in with /mcp. Claude Code can then read the evidence behind your SEO and AI visibility gaps, edit the matching pages in your codebase, and schedule an announcement once you ship.

  1. Add the server

    Run this in your terminal. Add --scope user to use it in every project, or --scope project to share it through .mcp.json.

    bash
    claude mcp add --transport http brandarmor https://api.brandarmor.ai/mcp
  2. Sign in

    Start Claude Code and run /mcp, then choose Brand Armor AI to sign in. In a shell you can run claude mcp login brandarmor instead (add --no-browser on a remote machine).

    bash
    claude mcp login brandarmor
  3. Ask

    Ask Claude Code about your growth opportunities or to post an update.

Prefer an API key?

  1. Headless and CI

    Pass a key as a header instead of signing in. Create the key in Brand Armor AI under Settings, AI connections, API keys. Choose "Read and act" only if the agent should create, schedule or publish. Keep it in an environment variable or the agent's secret store, never in a shared file.

    bash
    claude mcp add --transport http brandarmor https://api.brandarmor.ai/mcp \
      --header "Authorization: Bearer $BRANDARMOR_API_KEY"
  2. Or in .mcp.json

    The "type": "http" field is required.

    json
    {
      "mcpServers": {
        "brandarmor": {
          "type": "http",
          "url": "https://api.brandarmor.ai/mcp",
          "headers": { "Authorization": "Bearer ${BRANDARMOR_API_KEY}" }
        }
      }
    }
  • If you set an Authorization header, Claude Code does not fall back to OAuth.
  • Claude Code asks before running any Brand Armor AI tool that changes something.

More things to ask Claude Code

  • “Read our Brand Armor AI growth opportunities, inspect the page for the top one and propose the edit in this repo.”
  • “Which URLs did AI crawlers get errors on this month? Find the routes in this codebase.”
  • “Turn CHANGELOG.md into an X thread and a LinkedIn post and schedule both for tomorrow at 9:00 in Europe/Amsterdam.”
  • “List our connected social channels in Brand Armor AI.”

Claude Code for marketing: questions

Is Claude Code good for SEO?
Yes, for the technical SEO that lives in code, such as routes, redirects, robots rules, metadata and rendering. On its own it works from what is in the repository, so pair it with crawler and Search Console evidence to decide what to fix first.
Can Claude Code see my Google Search Console data?
Not by itself. With Brand Armor AI connected and Search Console linked to your Brand Armor AI account, Claude Code reads growth opportunities that include the Search Console comparison for each referenced page.
Can Claude Code check whether GPTBot or ClaudeBot can crawl my site?
It can read your robots.txt and middleware and spot rules that block them. Brand Armor AI adds what actually happened: which AI crawlers requested which pages and which requests returned errors.
Does Brand Armor AI change my code?
No. Claude Code makes the edits and you review them. Brand Armor AI supplies the evidence beforehand and lets you verify afterward, for example by checking that crawler errors stop.
Can I use it in CI?
Yes. Create a read-only or read-and-act API key, store it as a CI secret and add the server with the Authorization header.
Will it publish without asking?
No. Brand Armor AI saves drafts by default and only schedules or publishes when you ask and confirm.
How is this different from the Claude app connector?
The Claude app connector is for chat. Claude Code works in your terminal and codebase, so it can act on SEO findings by editing your site.

Setup checked against official Anthropic documentation on 29 November 2026:

Claude Code is a trademark of Anthropic. Brand Armor AI is not affiliated with or endorsed by Anthropic.

Give Claude Code the crawl evidence it is missing

Start free, connect your site and Search Console, then add Brand Armor AI to Claude Code with one command. Your first fix list comes from real crawler requests.

Start free