=== MegaMCP Connector ===
Contributors: megamcp
Tags: seo, schema, redirects, indexnow, ai
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lets MegaMCP set SEO titles and descriptions, JSON-LD, redirects, cache purges and the IndexNow key file, with every change approved by a person first.

== Description ==

MegaMCP connects AI assistants (Claude, ChatGPT, Cursor and others) to your marketing accounts. Its WordPress connection uses the core REST API and an application password, which covers posts, pages and media. This plugin adds the few things core doesn't expose:

* **SEO title, meta description, canonical URL, noindex and focus keyword per post or page.** With Yoast SEO or Rank Math active, the values go into that plugin's own fields. Without either, this plugin stores them and prints the tags itself.
* **JSON-LD structured data per post or page**, printed in the page head as `application/ld+json`. Documents are validated (a JSON object or list with `@context` and `@type`, at most 20 KB) and encoded so they can't break out of the script tag.
* **Redirects**: up to 500 exact-path rules (301, 302, 307 or 308) to a path or a full URL, with loop and duplicate checks and a hit count per rule.
* **Cache purge**: clears WP Rocket, W3 Total Cache, LiteSpeed Cache, WP Super Cache, WP Fastest Cache, SiteGround Optimizer and Autoptimize when they're installed, plus the WordPress object cache.
* **IndexNow key file**: serves `https://your-site/<key>.txt` without uploading a file.

In MegaMCP, every one of these changes is a plan with a before-and-after diff that a person approves, and most can be undone.

= Security =

* No external calls, no telemetry, no admin screens and no way to run code, edit theme files or change settings other than its own.
* It adds REST routes under `megamcp/v1`. They use WordPress's own authentication (application passwords) and check capabilities on every request: editing a post's SEO fields or JSON-LD needs permission to edit that post; redirects, cache purges and the IndexNow key need `manage_options` (administrators).
* Input is validated and sanitized; output is escaped.

== Installation ==

1. Download `megamcp-connector.zip` from https://megamcp.com/downloads/megamcp-connector.zip.
2. In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip and click Install Now, then Activate.
3. In MegaMCP, ask your AI for the WordPress site overview: it shows the plugin as active with its version.

Full guide: https://megamcp.com/docs/wordpress-plugin

== Frequently Asked Questions ==

= Do I need Yoast SEO or Rank Math? =

No. With either one active, titles and descriptions are written to its fields. Without one, this plugin prints the title, meta description, canonical and robots tags itself.

= Which user should MegaMCP connect as? =

An Editor can set SEO fields and JSON-LD on posts they can edit. Redirects, cache purges and the IndexNow key need an Administrator.

= What happens when I delete the plugin? =

Deleting it (not just deactivating) removes its redirects, redirect hit counts, the IndexNow key, its own SEO fields and all JSON-LD it stored. Values written into Yoast SEO or Rank Math fields stay, because they belong to those plugins.

== Changelog ==

= 1.0.0 =
* First release: SEO fields, JSON-LD, redirects, cache purge and the IndexNow key file.
