Guide

Automate AIScanner with the MCP server

Running the scan → fix → verify loop by hand is fine for one site. But if you manage a dozen — or you'd rather have an AI assistant handle readiness the same way it handles the rest of your workflow — AIScanner can hand the whole loop to an agent. It ships an optional MCP server that exposes its core actions as tools an AI agent can call directly.

MCP (the Model Context Protocol) is a standard way for AI agents to call external tools. AIScanner's server turns "scan, fix, verify" from clicks in the dashboard into functions your agent can invoke.

What the agent can do

The server exposes four tools, mirroring exactly what you'd do in the dashboard:

Because these are the same operations the plugin performs internally, an agent driving them gets identical, non-destructive results — nothing about the loop changes just because a machine is calling it.

It's off by default, and gated by a token

The MCP server does nothing until you turn it on, and it will not answer a single request without a bearer token that you generate. This is deliberate: an endpoint that can change your site's settings should never be open by default.

  1. Go to AIScanner → Settings, tick Enable the MCP server, and click Save Changes.
  2. Copy the bearer token shown. It is stored hashed and cannot be displayed again — regenerate it if you lose it.
  3. Register it with your agent.

Registering with a Claude-based agent looks like this:

# Register AIScanner with your agent
$ claude mcp add --transport http aiscanner \
    https://your-site.com/wp-json/aiscaner/mcp \
    --header "Authorization: Bearer <token>"

 connected · tools: scan  fix  verify  revert

From here you can simply ask the agent to "scan the site, fix the two highest-value failing checks, and verify" — and it will call the tools in sequence, exactly as you would.

The security model

An endpoint that can modify settings deserves a careful security design, and AIScanner treats the token accordingly:

Lost or leaked the token? Regenerate it from AIScanner → Settings. The old value stops working immediately, since only its hash was ever stored.

When automation earns its keep

Manual scanning is perfect for a single site you touch often. The MCP server pays off when readiness needs to be continuous or hands-off — a portfolio of client sites, a scheduled check an agent runs after each deploy, or simply folding "is my site still agent-readable?" into an assistant you already talk to every day.

The safety guarantees don't change either way. Every fix an agent applies is still settings-only and still reversible, so handing over the keys never means handing over the ability to break your theme or rewrite your content.

← All posts Read the MCP docs →