=== WordPresto Connector ===
Contributors: wordpresto
Tags: mcp, content, rest-api, automation, gutenberg
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

Connects this site to the WordPresto content platform over MCP — capability discovery plus read/create/update of block-native content.

== Description ==

WordPresto Connector links your WordPress site to the [WordPresto](https://wordpresto.com/wordpress) content platform using **MCP** (Model Context Protocol). It is built on the official `wordpress/mcp-adapter` package and the in-core **Abilities API** (WordPress 6.9+), so protocol, transport, and authentication converge with WordPress core rather than homegrown plumbing.

The plugin exposes one MCP server at `/wp-json/wordpresto/v1/mcp` over the HTTP transport, using standard WordPress REST authentication (an **Application Password**). The transport requires an account with `edit_posts`, and every ability enforces its own finer capability check on top — the connector never grants access beyond what the authenticated WordPress user already has.

= What it exposes =

* **Capability manifest** — reports WordPress/connector versions, whether writes are enabled, active integrations, and the REST-exposed post types with the authenticated user's real per-type capabilities.
* **List content** — paginated listing of a post type (search, status filter, `modified_after` cutoff for incremental sync).
* **Get content** — one post by ID with the raw stored `post_content`, so Gutenberg block markup round-trips losslessly.
* **Create content** — create a post/page as a WordPresto-managed document; defaults to draft, and `publish` is honored only with the real publish capability.
* **Update content** — update the same post in place (title/content/slug/excerpt/status; only provided fields change).
* **Yoast SEO meta** *(only when Yoast SEO is active)* — read and update the SEO title, meta description, and focus keyphrase.
* **ACF fields** *(only when Advanced Custom Fields is active)* — list field groups, read field definitions, and read/update field values.

Integration abilities register **only when their plugin is active**, so the tool list never advertises a tool that would fail on this site.

= Write kill-switch =

Site owners can disable all connector writes without deactivating the plugin, either with a constant or a filter:

`define( 'WORDPRESTO_CONNECTOR_DISABLE_WRITES', true );`

`add_filter( 'wordpresto_connector_writes_enabled', '__return_false' );`

Writes stay capability-gated per user either way; this is the site-wide off button, and the capability manifest reports `writes_enabled` honestly.

= Privacy =

This plugin adds an authenticated MCP endpoint to your site's REST API. It does not phone home, run background tasks, or collect visitor data on its own. All requests are initiated by an authenticated client (such as WordPresto) using an Application Password you issue and can revoke at any time.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/wordpresto-connector`, or install the plugin through the WordPress Plugins screen directly. Release builds ship the required dependencies in `vendor/` prebuilt.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Create an **Application Password** for the WordPress account you want WordPresto to act as (Users → Profile → Application Passwords).
4. Connect that account in WordPresto; it will reach the MCP server at `/wp-json/wordpresto/v1/mcp`.

== Frequently Asked Questions ==

= What are the requirements? =

WordPress 6.9 or newer (for the in-core Abilities API) and PHP 7.4 or newer. Backwards compatibility with older WordPress versions is not a goal.

= Does the connector let a client do more than the connected user can? =

No. The MCP transport requires `edit_posts`, and every ability re-checks the specific capability it needs (for example, publishing requires the real publish capability). The connector honors WordPress capabilities and adds nothing on top.

= How do I turn off writing? =

Define `WORDPRESTO_CONNECTOR_DISABLE_WRITES` as `true`, or add the `wordpresto_connector_writes_enabled` filter returning `false`. Reads continue to work; the capability manifest reports writes as disabled.

= Does this collect any visitor data? =

No. The plugin only responds to authenticated MCP requests. It does not track visitors, log analytics, or make outbound calls on its own.

== Changelog ==

= 0.3.0 =
* Added the ACF content-workflow ability subset (list field groups, read field definitions, read/update values).

= 0.2.0 =
* Added Yoast SEO meta read/update abilities.

= 0.1.0 =
* Initial release: MCP server with capability manifest and block-native content read/create/update abilities.
