SEO integration
Rank Math AI agent tool reference
WP MCP writes SEO metadata through Rank Math's own fields using one unified field set. An AI agent can rewrite meta titles and descriptions, set focus keywords, fix canonicals, and flip robots flags across the whole site, each write snapshotted before it lands, so a bulk metadata pass that goes wrong on post two hundred is one click from restored.
Rank Math in plain language: Rank Math MCP.
In practice
How Rank Math work goes with an agent.
Rank Math stores each per-post field as rank_math_* post meta, but noindex and nofollow share one array, rank_math_robots, instead of two flags. The focus keyword is a single string that also carries any extra keywords. WP MCP presents the same neutral field set as for other SEO plugins, and for robots it reads the array, changes the flag you asked about, and writes the result back. Each write is a full post snapshot first, so one rollback restores title, description, canonical and robots together.
Set noindex on post 88 but keep whatever nofollow it already has.
Runs update-seo-meta with noindex:true. WP MCP reads rank_math_robots, keeps the current nofollow state, and writes the array back. The post is snapshotted before the write.
Change the Rank Math title and canonical on post 77, nothing else.
Runs update-seo-meta with title and canonical. Only rank_math_title and rank_math_canonical_url are written, and the reply returns every stored field plus an operation_id for rollback-operation.
Which robots flags are on post 77 right now?
Runs get-seo-meta, which turns the stored robots array into noindex and nofollow booleans. It is a read, gated by the same per-post check as every SEO read.
Use media item 301 as the social image on post 77, for both Open Graph and Twitter.
With Pro, runs set-social-image with target both. It writes the image URL and the attachment id companion for each network, snapshotted, so rollback-operation puts the previous images back.
What your AI can do
Real Rank Math operations, every write reversible.
- Read and write Rank Math titles, descriptions, and focus keywords
- Fix canonicals and robots (noindex / nofollow) flags
- Run site-wide bulk metadata edits safely
- Restore a single post or a whole bulk session
Example prompts
Example Rank Math prompts.
Clean up the canonicals on the archive pages.
Rewrite thin meta descriptions across the Knowledge Base.
Roll back the last SEO session, noindex went too wide.
Under the hood
The Rank Math calls, under the hood.
update-seo-meta({ post_id: 77, robots: ["noindex"] }), writes Rank Math fields; snapshotted
rollback-session({ session_id }), one-click undo for the run
Safety and access
What can be undone on Rank Math, and what costs what.
Recoverable on Rank Math
- update-seo-meta snapshots the post and all its Rank Math meta before every write.
- rollback-operation restores one post byte for byte. rollback-session reverses a whole bulk run.
- Term writes (Pro) are snapshotted on the term, and restore the same way.
Rank Math limits and opt-ins
- A robots write replaces the stored robots array with just noindex and nofollow. Other directives kept in that array, such as noarchive, are not carried over. The snapshot restores them if that matters.
- Rank Math's schema builder and redirect manager are not exposed.
- Term fields, social fields and the schema and meta-tag proposals are Pro.
Free or Pro: Post-level title, description, focus keyword, canonical and robots flags are free, along with get-seo-status and rollback. That does not depend on which Rank Math tier you run. Pro adds term SEO (get-term-seo-meta, update-term-seo-meta, which also covers the robots flags on terms), social fields (get-social-meta, set-social-image) and two read-only proposals, generate-schema-markup and generate-meta-tags. update-seo-meta itself has no opt-in filter.
In the free plugin
The Rank Math integration is in the free plugin.
The core Rank Math tools ship in the free, GPL plugin with the full snapshot and undo engine, and no trial clock. Pro adds 133 more tools, including Elementor deep editing, the other page builders, the forms adapter pack and, for some integrations, extra operations. The pricing page lists what each tier includes.
Frequently asked
Rank Math MCP: questions, answered.
Yoast or Rank Math, does WP MCP care which I use?
No. The same tools translate to whichever SEO plugin is active, using its own fields.
With Rank Math, is bulk SEO editing safe?
Every metadata write is snapshotted and session-grouped, so an over-broad change is reversible in one click.
How are multiple focus keywords handled?
The field is read and written as the one string Rank Math stores. Extra keywords live in that same comma-separated value, so send the full string you want kept: a write replaces the whole value rather than appending to it.
In Rank Math, how do I undo one post out of a bulk run?
Every write returns an operation_id. Pass it to rollback-operation to reverse just that post and leave the rest of the run alone. If you grouped the run under one session_id, rollback-session reverses every post in it instead.
What does get-seo-status return on a site without Rank Math?
It still answers, with active:false and empty plugin, name and version. get-seo-meta and update-seo-meta are only offered once a supported SEO plugin is detected, so an agent can check status first.
Does it work with Rank Math's free and Pro tiers alike?
It uses the per-post fields both tiers store, and detection looks only for the Rank Math class. Features that exist only in Rank Math's paid tiers, such as its extra schema types, are not part of this integration.
Is there an AI agent for Rank Math?
Yes, through WP MCP rather than Rank Math itself. An agent you choose, such as Claude or Cursor, can read and write Rank Math titles, descriptions, and focus keywords. WP MCP is a separate plugin, not a built-in AI feature of Rank Math. On the undo side: update-seo-meta snapshots the post and all its Rank Math meta before every write.
Related integrations
More integrations for the same agent.
MCP for Yoast SEO
FreeSEO, 3 tools.
MCP for SEOPress
FreeSEO, 3 tools.
MCP for All in One SEO
FreeSEO, 3 tools.
MCP for Redirection
FreeSEO, 2 tools.
MCP for DataForSEO
ProSEO, 2 tools.
MCP for The SEO Framework
FreeSEO, 3 tools.
Browse the full Integrations hub, or read more on Rank Math MCP, MCP for SEO and the WordPress MCP plugin.