=== Yaeris MCP Connector ===
Contributors: rickcys
Tags: mcp, ai, seo, elementor, rankmath
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your WordPress site to the Yaeris MCP platform so AI tools like Claude can read and update your content, SEO metadata, and Elementor pages.

== Description ==

The Yaeris MCP Connector plugin bridges your WordPress site with the [Yaeris MCP platform](https://mcp.yaeris.com) — a Model Context Protocol (MCP) server that lets AI assistants like Claude interact directly with your digital marketing tools.

**What this plugin does:**

Once installed, it exposes secure REST API endpoints that Yaeris MCP tools use to read and update your site data. Authentication uses WordPress Application Passwords — no separate account or API key needed.

**Three modules in one plugin:**

= Module 1 — WordPress Core =
Always active. Adds a status endpoint so MCP tools can verify the plugin is installed and check which modules are loaded.

= Module 2 — SEO Connector =
Activates automatically when RankMath or Yoast SEO is detected. Exposes SEO meta fields (focus keyword, SEO title, meta description, canonical URL) via the REST API. Includes a bulk endpoint for reading SEO data across multiple posts in a single call — much faster than one request per post.

Supported SEO plugins:
* RankMath SEO
* Yoast SEO

= Module 3 — Elementor Connector =
Activates automatically when Elementor is detected. Exposes Elementor page content via clean REST endpoints — no need to deal with raw Elementor JSON. MCP tools can:

* List all Elementor-built pages on your site
* Read all text content extracted from Elementor widgets
* Create new pages with basic heading and content sections
* Update the text of specific widgets without touching your design
* Publish, draft, or unpublish any page
* Read page-level Elementor settings

**Requirements:**

* A [Yaeris MCP](https://mcp.yaeris.com) account
* Your WordPress site connected to Yaeris MCP via Application Password (set up inside the Yaeris dashboard)
* For SEO tools: RankMath or Yoast SEO installed
* For Elementor tools: Elementor (free or Pro) installed

== Installation ==

1. Download the plugin zip from [mcp.yaeris.com](https://mcp.yaeris.com) or the WordPress plugin directory.
2. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**.
3. Upload the zip and click **Install Now**, then **Activate**.
4. No settings page needed — the plugin works automatically once your site is connected to Yaeris MCP.

**To connect your site to Yaeris MCP:**

1. Log in to your Yaeris MCP account at [mcp.yaeris.com](https://mcp.yaeris.com).
2. Go to **Tools → WordPress** and click **Add Site**.
3. Enter your site URL and create a WordPress Application Password (WordPress Admin → Users → Your Profile → Application Passwords).
4. Paste the Application Password into Yaeris and save.
5. Done — your WordPress, SEO, and Elementor tools will activate automatically.

== Frequently Asked Questions ==

= Do I need a separate account for Elementor or RankMath? =

No. The plugin uses your existing WordPress Application Password for all three modules. No extra logins or API keys are needed.

= Is my data sent to Yaeris servers? =

No. The plugin adds REST API endpoints to your own WordPress site. When an MCP tool runs, the Yaeris platform makes a direct request to your site using your Application Password. Your content never passes through Yaeris servers.

= Does this work with Elementor Pro? =

Yes, for reading. The plugin can read content from most Elementor Pro widgets. Writing (updating text) is supported for standard free widgets (Heading, Text Editor, Button, Icon Box, Image Box). Pro-only widgets like Loop Builder and ACF fields are read-only in v1.0.

= Does it work with Yoast SEO Premium? =

Yes. The SEO module detects the standard Yoast SEO plugin — both free and Premium versions are supported.

= Will this slow down my site? =

No. The plugin only registers REST API endpoints. No code runs on normal page loads — it is completely passive until an MCP tool makes a request.

= Is the plugin safe / does it add security risk? =

All endpoints require a valid WordPress Application Password. Only users with `edit_posts` capability can access them — the same permission level as editors and admins. Standard WordPress authentication protects all data.

== External Services ==

This plugin is a connector for the Yaeris MCP platform (https://mcp.yaeris.com). To use this plugin, you need a Yaeris MCP account.

**What data is transmitted:**

This plugin does NOT send any of your site content, posts, or pages to Yaeris servers. It works the other way around: the plugin registers secure REST API endpoints on your own WordPress site. When you connect your site inside the Yaeris dashboard, the Yaeris platform makes authenticated HTTP requests directly to your site using a WordPress Application Password that you create and control.

No post content, SEO data, or Elementor page content ever passes through or is stored on Yaeris infrastructure. All data stays on your WordPress server and travels directly between your site and the AI tools you are using.

The only information stored on the Yaeris platform is your WordPress site URL and the Application Password you enter in the Yaeris dashboard — this is required so the platform knows how to reach your site.

**External service details:**

* Service name: Yaeris MCP Platform
* Service URL: https://mcp.yaeris.com
* Yaeris website: https://yaeris.com/mcp-server
* Terms of Service: https://yaeris.com/terms-of-use/
* Privacy Policy: https://yaeris.com/privacy-policy/

== Changelog ==

= 1.0.2 =
* Fixed PHP syntax in class-ymc-seo.php to ensure clean file integrity in ZIP submission.
* Strengthened permission check on POST /elementor/pages (create page) — now verifies publish_pages or publish_posts capability depending on post_type, instead of the broader edit_posts check.
* Added new check_auth_publish permission callback for POST /elementor/page/{id}/status — now verifies publish_pages or publish_posts capability when setting status to publish or private, preventing contributors from publishing content via the API.

= 1.0.1 =
* Added unique plugin prefix (yaermcc_) to all functions, constants, and classes to prevent naming collisions.
* Strengthened REST API permission checks — all endpoints that access a specific post ID now verify per-object edit capability using current_user_can( 'edit_post', $id ).
* Clarified External Services section in readme.

= 1.0.0 =
* Initial release.
* Module 1: WordPress core status endpoint.
* Module 2: SEO connector for RankMath and Yoast SEO.
* Module 3: Elementor connector — list, read, create, update, publish pages.

== Upgrade Notice ==

= 1.0.2 =
Permission check fix for Elementor create endpoint. Recommended for all users.

= 1.0.1 =
Security and compliance update. Recommended for all users.

= 1.0.0 =
Initial release.
