How to run an SEO audit with Claude Code, and check the fixes worked
Connect Claude Code to an SEO audit tool in one command, run the audit, fix what matters, and re-audit to prove it. Includes the prompts, what the AI gets wrong, and how to check it.
On this page
Claude Code can read your code and edit it. It cannot see how search engines see your site. An SEO audit tool connected over MCP fills that gap: the tool crawls the live site, Claude reads the findings and fixes the code, and you audit again to confirm. This guide shows the whole loop, including the part most write-ups skip, which is checking the result.
- 1AuditThe tool crawls the live site and scores it.
- 2FixClaude changes the code, one cause at a time.
- 3DeployYou review the diff and ship it.
- 4Audit againCompare the two runs and check new issues.
What you need before you start
- Claude Code installed, in the project folder for your site.
- An Auditmatic account. The free audit works without one, but the agent connection needs an account to sign in with.
- A site that is live on the internet. The crawler reads the public site, so a local server on your laptop cannot be audited.
1. Connect the tool
One command adds Auditmatic as an MCP server:
claude mcp add --transport http auditmatic https://auditmatic.app/mcp
Then run /mcp inside Claude Code and sign in when asked. Full setup, including other agents, is in the MCP docs, and the agent feature page lists what the agent can do beyond audits.
2. Ask for the audit
Audit example.com. Start a site audit, wait for it to finish, then read the audit report. List only the errors and warnings, grouped by cause, with the affected pages. Do not change any code yet.
Asking for the report, not just the issue list, matters. A crawl produces raw issues; the report groups them, adds page speed and homepage checks, and gives the score you see on the site. We learned this the hard way. Our own agent once read the raw list and said the site was nearly clean while the report showed five errors. The report is the source of truth, so Auditmatic has a dedicated get_audit_report tool for it.
3. Fix in batches, by cause
Most findings share a root cause: one template, one missing header, one setting. Two real examples are a page with no outgoing links and a description that is too long. Ask Claude to fix one cause at a time and explain the change:
Fix the missing security headers. Show me the diff and explain what each header does before you apply it.
Read the diff. Claude is good at finding the right file and bad at knowing your intent, so tell it which pages must stay out of search results or which links must not change.
4. Deploy, then audit again
A fix in the code is not a fix in production until it is live. After deploying, ask Claude to run the audit again and compare:
Run the audit again and compare it with the last one. Which issues are gone, which remain, and did any new ones appear?
New issues after a fix are common: a change that removes one problem can create another. The second audit is how you catch them.
5. Check the claims that matter
An AI can summarise wrongly, so verify anything important yourself. A header or redirect takes ten seconds to confirm:
curl -sI https://example.com | grep -i -E "strict-transport|x-content-type"
What the agent gets wrong
Plan for these, because they are the usual failures rather than rare ones:
- It reads the wrong output. The raw issue list and the report are different. Always name the report in your prompt.
- It overfixes. Not every notice needs action. Tell it to stop after the errors and warnings.
- It does not know your intent. A thank-you page with no links is fine; a model may add links to it anyway.
- It trusts its own edit. It will say a fix worked before the change is live. Only the second audit settles it.
Prompts worth reusing
Once the loop works, a few prompts cover most of the work. Save them in a file in your project so every audit starts the same way.
- Prioritise: “From this report, list the errors first, then warnings that affect more than five pages. Ignore notices.”
- Explain before acting: “For the top three findings, say which file you would change and why, but do not edit anything yet.”
- Verify: “After my deploy, audit again and give me a table of findings fixed, findings remaining and findings that are new.”
Make it a routine
A one-off audit finds today's problems. A monthly one catches the next regression. Put the three prompts above in a note, run the loop after each significant deploy, and keep the two latest reports so you can see whether the score moves. If a score drops after a release, the diff between the two audits tells you what changed.
Costs and limits
Audits use credits and crawl time, so start with a page limit such as 50 and raise it once the first run looks right. See pricing for what each plan includes. The agent itself runs on your own Claude Code usage, which is separate from Auditmatic.
Using another agent
The same server works with any client that supports MCP, and the steps above are the same: connect, ask for the report, fix by cause, audit again. Only the connection differs, and we have separate guides for Codex and Cursor. The run SEO from your AI assistant strategy covers the wider workflow, and the fix-an-audit strategy covers this loop as a routine. If you want your pages to be quoted by AI assistants too, read how to get cited by ChatGPT.
Frequently asked questions
Can Claude Code run an SEO audit by itself?
Not without a tool. It can read your code but cannot crawl your live site, so it needs an audit tool connected over MCP to see what search engines see.
Is it safe to let an agent change my site?
Treat it like any contributor: review the diff before it is applied, and never let it deploy without you. The tool only reads your site and reports; the changes happen in your own code.
How do I know the fixes worked?
Audit again after deploying and compare the two runs. Then spot-check the important changes with a command such as curl.
Does this replace an SEO consultant?
It replaces the repetitive part: finding and fixing technical issues. Choosing what to rank for and what to write still needs a person.
What if a fix breaks something?
Commit each fix on its own, so you can undo one cause without losing the others. That is another reason to fix one cause at a time and to read the diff before you accept it: a small, labelled change is easy to revert.
New to audits? Read the SEO audit checklist first, or try a free audit below without connecting anything.