Yoast MCP — Fix SEO Meta with an AI Agent (Rank Math too)

What is Yoast MCP?

Yoast MCP means tidying your site's SEO metadata by asking an AI assistant, instead of opening every post and scrolling to the Yoast box. Cowboy MCP gives an AI agent 4 SEO tools over the Model Context Protocol that read, write and audit the per-post SEO fields your SEO plugin manages — title, meta description, focus keyword, robots, canonical URL and social overrides — and the same four tools work unchanged with Yoast SEO, Rank Math, All in One SEO and SEOPress.

MCP is the open standard an AI client uses to discover and call those tools, and the same Cowboy MCP plugin that manages your posts, store and plugins detects which SEO plugin is active and speaks its vocabulary. The page is called Yoast MCP because that is what most people search for, but there is nothing Yoast-specific about the setup: the agent asks for "the meta description", and the plugin writes it to whichever field Yoast, Rank Math, AIOSEO or SEOPress stores it in.

What can an AI agent do with Yoast?

An agent can do the repetitive SEO housekeeping that never gets done by hand: find every post with no meta description and write one, shorten titles that run past 60 characters, set a focus keyword where one is missing, mark an old post noindex, fix a canonical URL, or set the Open Graph image a share preview is missing. Each of the 4 tools maps to one real operation, so the assistant fills in the details rather than guessing.

Here are all 4 tools. The names below are the real tool identifiers the agent sees.

Tool What it does
wp_seo_get_provider Detect which SEO plugin is active — Yoast SEO, Rank Math, All in One SEO or SEOPress — its version, and whether several are active at once
wp_seo_get_meta Read a post's SEO meta: title, description, focus keyword, noindex and nofollow, canonical URL, Open Graph and X/Twitter overrides, the cornerstone flag, and the provider's own SEO and readability scores where it keeps them
wp_seo_update_meta Update any of those fields on a post; untouched fields stay as they are, and an empty value clears the per-post override so the plugin's template takes over again
wp_seo_audit Scan posts and pages for SEO issues — missing or badly sized meta descriptions, missing focus keywords, over-length custom titles, noindex on published posts — page by page

Three real prompts, to make it concrete:

How do SEO edits stay safe?

A wrong noindex can drop a page out of Google, so SEO meta deserves the same care as any other write. Cowboy MCP wraps wp_seo_update_meta in the guardrails it applies across the whole site, and the two reads and the audit never change anything.

Every call is also written to the audit log, and your MCP client asks you to approve each tool call, so a human stays in the loop at both layers. The full guardrail model lives on the security page.

What are Yoast MCP's limits?

Cowboy MCP works with the per-post fields your SEO plugin stores, through one vocabulary across the four plugins. That unified layer is also where the limits are. It does not edit plugin-wide settings — site-level title templates, breadcrumbs, sitemaps, redirects or schema configuration stay in the SEO plugin's own screens. Fields differ slightly by provider too: the cornerstone flag exists on Yoast, Rank Math and AIOSEO but not SEOPress, Rank Math accepts several comma-separated focus keywords where the others take one, and SEOPress keeps no SEO or readability score for the agent to read back. When a field is not supported by the active plugin, the tool reports it as unsupported instead of silently dropping it.

The audit is a fixed set of rules, not a crawl or a ranking tool: it checks what is in the database — description present and 50–160 characters, a focus keyword set, custom title at most 60 characters, no noindex on a published post — and it scans one page of posts per call, so a full-site audit is a loop the agent runs rather than a single report. Think of the agent as a fast, careful editor for metadata, not a replacement for your SEO strategy: it will write a hundred descriptions before lunch, but what the page should rank for is still your call.

How do I set it up?

Setup takes about five minutes and needs no code. Install the Cowboy MCP plugin, make sure your SEO plugin is active so the tools can detect it, then connect your AI assistant and start with a read-only request like an audit of your latest posts. The SEO tools light up automatically once an SEO plugin is running — there is nothing extra to switch on.

  1. Install the plugin. In wp-admin, go to Plugins → Add New, search for "Cowboy MCP", and click Install then Activate. It is free on the WordPress.org plugin directory (opens in new tab) and needs WordPress 6.2+ and PHP 8.0+.
  2. Connect your AI. Open Settings → Cowboy MCP and follow the guided setup. See how to connect WordPress to Claude or how to connect WordPress to ChatGPT for the full walkthrough.
  3. Ask for something real. Start read-only — "audit my twenty most recent posts for SEO issues" — then let it act, one post at a time with a dry run on the first.

FAQ

Does this work with Rank Math, All in One SEO or SEOPress, or just Yoast?

All four. Cowboy MCP detects which SEO plugin is active and maps one set of field names — title, description, focus keyword, noindex, nofollow, canonical URL, Open Graph and X/Twitter overrides — onto the fields that plugin stores. The agent uses the same tools and the same words whether you run Yoast SEO, Rank Math, All in One SEO or SEOPress; if a field does not exist on your plugin, the tool reports it as unsupported rather than guessing.

Can an AI agent add meta descriptions to every post that is missing one?

Yes. The audit tool lists posts with no meta description, or one outside the 50–160 character range, a page at a time; the agent then reads each post, writes a description in its voice, and saves it with wp_seo_update_meta. Each write is its own undo-journal entry and can be previewed as a dry run first, so you can approve the first few and let the rest run.

What if the AI sets the wrong noindex or canonical?

Undo it. Every SEO meta write is captured in the undo journal with the previous values, so a mistaken noindex or canonical URL rolls back from the Activity tab or by asking the agent to undo the change. Clearing a field with an empty value restores your SEO plugin's own template, so a post is never left with a blank title or description.

Can it change Yoast's site-wide settings, sitemaps or redirects?

No. The SEO tools work on per-post metadata — the fields in the SEO box under each post or page. Plugin-wide settings such as title templates, breadcrumbs, XML sitemaps, redirects and schema configuration stay in your SEO plugin's own screens. That keeps the agent's reach narrow and every change it makes attached to one post you can review and undo.