Skip to content

Manage Yoast SEO with AI ​

Use Easy MCP AI to let an AI client read and update Yoast SEO for individual posts, pages, categories, and tags, as well as site-wide title and social settings. This guide explains what the AI can do, how to switch it on, and how to undo a change.

In this article

What you can do with Yoast through Easy MCP AI ​

Easy MCP AI gives your AI client two sets of Yoast tools. Both need the Yoast SEO plugin to be active.

Easy MCP AI's Yoast tools ​

These seven tools come with Easy MCP AI:

  • wp_yoast_get_post_seo: reads a post's or page's Yoast data. It works on every site, including staging sites. The stored_meta result shows what is actually saved, and yoast_head_json shows what search engines receive.
  • wp_yoast_update_post_seo: updates the SEO title, meta description, focus keyphrase, cornerstone setting, Open Graph and X fields, noindex and nofollow, advanced robots, canonical URL, primary term, breadcrumb title, and schema page and article type.
  • wp_yoast_get_term_seo and wp_yoast_update_term_seo: read and update the SEO data of categories, tags, and other terms. Yoast stores this data in its own settings rather than in term meta, so the general term-meta tools cannot see it. If Yoast's sanitiser changes a value you set, the stored_differently result lists those fields.
  • wp_yoast_get_head: returns the rendered head HTML and JSON-LD for a URL. It needs the exact permalink and usually fails on local or staging sites, which have no Yoast URL index.
  • wp_yoast_get_settings: reads site-wide title and social settings, including available content types and network-locked settings.
  • wp_yoast_update_settings: updates site-wide title and social settings.

Site-wide title and social settings ​

The settings tools cover the title separator, SEO title and description templates, social title and description templates for content types, social images for content types, and the default social image.

Both tools require the connected WordPress user to have Yoast's wpseo_manage_options capability, which allows access to site-wide SEO settings. Permission to edit a post alone is not enough. The Yoast tools must also be enabled, and the connection must allow SEO writes as described above.

Read wp_yoast_get_settings first to discover the available content types, supported fields, valid separator keys, and settings locked by the network. Use the returned content types and fields when preparing an update instead of assuming that each content type supports the same settings.

Send only the values you want to change to wp_yoast_update_settings: separator, templates, social_images, or default_social_image_id. Settings you leave out are preserved. An empty template value clears that template, and image ID 0 clears an image. Any other image ID must identify an image in the Media Library. The tool refuses unsupported or network-locked settings instead of changing them.

After an update, check the returned settings to confirm the saved values. Review changed_fields, stored_differently, not_saved, and previews to see which fields changed, whether Yoast saved any values differently, whether any values were not saved, and the resulting previews.

Cached pages can continue to show old titles after the settings are saved. Clear the whole site's page cache with wp_clear_cache using scope: "site"; see Clear Site Caches with AI. Then check a live page with wp_yoast_get_head, using its exact public URL.

Yoast's own abilities ​

Yoast SEO also registers five abilities through the WordPress Abilities API:

  • yoast-seo/get-seo-scores
  • yoast-seo/get-readability-scores
  • yoast-seo/get-inclusive-language-scores
  • yoast-seo/get-post-seo-data
  • yoast-seo/update-post-seo-data

Find these abilities by searching for Yoast in a tool name or description, or by searching for an exact tool name in Easy MCP AI > Tools. Each ability appears as an individual tool in a policy group. Check its enabled state; new-tool policies, deployment settings, and connection permissions can also restrict availability.

Switch on the Yoast tools ​

Two settings must both allow SEO changes before your AI client can write Yoast data.

  1. In WordPress, go to Easy MCP AI > Tools and search for Yoast in a tool name or description, or for an exact tool name.
  2. Find the tools you need in their policy groups, such as Read or Write, and enable each tool individually. If a tool's control is locked, its choice is controlled by a deployment setting.
  3. Click Save changes to apply your choices.
  4. Check the access level of the connection your AI client uses. It must allow SEO writes: choose Full access, or choose Custom and set the SEO category to Write. See Creating and Managing API Tokens for the access presets, or Managing OAuth Access for OAuth connections.

📝 Note: Enable the particular read or write tools you need, and make sure the AI connection allows them. A refused call names the applicable restriction.

Example prompts ​

Try prompts like these in your AI client:

  • "List the published posts that have no meta description, then write one under 155 characters for each."
  • "Rewrite the SEO title of my five most recent posts so each is under 60 characters and includes the focus keyphrase."
  • "Set the canonical URL of this page to https://example.com/pricing/."
  • "Set the page at /thank-you/ to noindex."
  • "Write an SEO title and meta description for the category Recipes."
  • "Show the SEO and readability scores of my latest 20 posts and list the ones that need work."

Permissions ​

Easy MCP AI acts as the WordPress user who owns the connection, so that user needs a role that can edit the post or term. For term SEO, noindex, canonical URL, and breadcrumb title also need Yoast's advanced-settings permission. By default, Editors and Administrators have it.

Undo SEO changes ​

You can restore SEO changes from Change history with the wp_history_apply tool. See Restore AI Changes from Change History for the steps.

Fields that were empty before the AI's first write are skipped during a restore, because a restore never deletes. If a field must go back to empty, clear it in Yoast or ask the AI to clear it.

Troubleshooting ​

A Yoast tool is refused ​

  • The required Yoast tool is disabled. Find it under Easy MCP AI > Tools, enable it individually, and click Save changes. If its control is locked, a deployment setting controls it.
  • The connection's access level doesn't allow SEO writes. Use Full access, or Custom with the SEO category set to Write. The refusal message names the setting to change.

wp_yoast_get_head fails ​

This tool relies on Yoast's URL index, which local and staging sites usually lack. Use wp_yoast_get_post_seo instead: it works on every site. On a live site, pass the exact permalink, including the trailing slash if your site uses one.

Term SEO doesn't change through term meta ​

Yoast keeps category and tag SEO in its own settings, not in term meta. Use wp_yoast_get_term_seo and wp_yoast_update_term_seo instead of the general term-meta tools.

Was this helpful?