=== Maya Grafix Blog MCP ===
Requires at least: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later

Adds four focused abilities to the existing WordPress MCP Adapter connection.
Does not install another MCP server, register a post type, or modify site styles.

== Installation ==
1. Keep WordPress MCP Adapter active. WordPress 6.9+ supplies the Abilities API.
2. Ensure the existing custom post type slug is blog.
3. In Plugins > Add New > Upload Plugin, upload maya-grafix-blog-mcp.zip.
4. Activate Maya Grafix Blog MCP.
5. Refresh/reconnect your existing Maya Grafix MCP client if necessary.
6. Discover abilities and look for the four maya-grafix/ abilities below.

No new password, PHP execution permission, REST exposure for the Blog type,
Bricks setting, or hosting configuration is required. This plugin relies on
the existing authenticated MCP Adapter connection. Activation exposes these
four actions to authenticated MCP callers who already have Blog permissions.
Deactivation removes the abilities; saved articles remain untouched.

== Abilities ==
maya-grafix/list-blogs: search and paginate editable drafts/published blogs.
maya-grafix/get-blog: read raw editor HTML, excerpt, SEO and version token.
maya-grafix/create-blog-draft: title, content, slug and request_id required.
maya-grafix/update-blog-draft: post_id and expected_version required.

Use MCP Adapter's discover-abilities, get-ability-info and execute-ability
tools. These abilities may not appear as individual tools on the default
server; dispatch them by their full names instead.

Example discovery: mcp-adapter-discover-abilities {}
Example info: mcp-adapter-get-ability-info
  {"ability_name":"maya-grafix/create-blog-draft"}
Example execution: mcp-adapter-execute-ability
  {"ability_name":"maya-grafix/list-blogs","parameters":{"per_page":5}}

== Content workflow ==
Read a relevant existing blog to match editor formatting, then create an HTML
article or Gutenberg block HTML. Do not put Markdown or publishing notes in
the body. Existing single-blog templates and site CSS supply the visual style.
No new CSS, Bricks content or featured image is created by this plugin.
Article links/tables/code examples can use WordPress-safe editor HTML.
Content and excerpt always pass through wp_kses_post, even for administrators.
Executable scripts/unsafe HTML are removed; readback reports changed fields.

SEO input accepts only title, description and focus_keyword, mapping to
rank_math_title, rank_math_description and rank_math_focus_keyword. Empty
strings clear these values. Omitted fields remain unchanged. The plugin does
not set SEO scores, schemas, robots directives or canonical URLs. Rank Math
must be active to use the saved values on the frontend. No arbitrary post
metadata, taxonomy changes, uploads, publishing or deletion tools are exposed.

== Permissions and reliability ==
Uses the blog post type's registered editing/creation capabilities and
WordPress edit_post checks. No roles or capabilities are granted. Read tools
only expose editable drafts/published posts. Write tools only accept drafts.
Author is the authenticated user; clients cannot choose another author.

Create: use a unique request_id (16-80 letters/digits/underscores/hyphens).
Reuse exactly the same input and key on retries. The stored request journal
returns the existing post instead of creating it again. It returns current
saved content, so review the result. If a write stops before the journal is
complete, it fails closed and requires an administrator to inspect drafts.
Never work around recovery errors by sending a new request_id.

Update: read get-blog immediately beforehand and pass version as
expected_version. Stale versions and another user's editor lock are rejected.
The plugin requests a WordPress revision before updates; revision availability
depends on the existing Blog type/revision settings. SEO metadata is not part
of a normal content revision. These writes are not a multi-field transaction.
Concurrent editing in the same user's browser and third-party save hooks are
not fully serialized by the plugin lock. Avoid editing the same draft in the
browser while an MCP write is in progress. Read back after any interruption.

Request journals are small non-autoloaded WordPress options. Per-write locks
are removed on normal completion. A hard process crash can leave a lock: a
developer should inspect the corresponding post and mg_blog_request_* journal
before manually removing that exact stale mg_blog_*_lock option. There is no
automatic timeout or broad cleanup action that could release a live writer.
Journals are retained when deactivated/uninstalled to preserve retry evidence.

== Troubleshooting ==
If abilities are missing, confirm this plugin and MCP Adapter are active,
WordPress is 6.9+, then rediscover abilities through the existing connection.
If forbidden, the connected WordPress account needs the Blog type's editing
capabilities. This plugin does not alter authentication or grant access.

== Validation ==
PHP syntax checked and isolated behavioral tests run with WordPress API
doubles. Live integration with your WordPress/MCP Adapter versions still needs
verification after installation. No code has been installed on the live site.

== Changelog ==
= 1.0.0 =
Initial release: read Blog content and create/update Blog drafts with scoped
SEO support, permission checks, retry journal and stale-content detection.
