=== Ziflite MCP for WordPress ===
Contributors: ziflite
Tags: mcp, ai, claude, wordpress, automation
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.6.1
License: GPLv2 or later

Turns WordPress into a controlled MCP administration server for Claude and other MCP-compatible clients, with dedicated WordPress/Fluent tools plus a permission-aware Admin Bridge.

== Description ==

Ziflite MCP exposes a WordPress REST endpoint that speaks the Model Context Protocol (MCP). OAuth-capable clients can connect to the endpoint, sign in through WordPress, and operate with the permissions of the authorized WordPress user.

Ziflite includes dedicated tools for WordPress content, media, taxonomies, comments, users, plugins, themes, FluentCRM, Fluent Forms, site settings, diagnostics, and release-readiness checks. Its opt-in WordPress Admin Bridge can also discover and call registered WordPress/plugin REST APIs when no dedicated wrapper exists.

High-impact operations use preview + explicit confirmation. Arbitrary filesystem editing and arbitrary SQL execution are intentionally not exposed through the normal toolset.

The site owner controls capability groups from **Settings → Ziflite MCP** and can review connected OAuth clients there.

== Installation ==

1. Upload the plugin ZIP through Plugins → Add New → Upload Plugin, or place the plugin folder in `/wp-content/plugins/`.
2. Activate Ziflite MCP.
3. Open Settings → Ziflite MCP and copy the MCP endpoint URL.
4. Add that endpoint to Claude or another OAuth-capable MCP client. Ziflite will redirect you to WordPress to sign in and approve access; there is no API key to copy.
5. After connecting, run `zwm_release_readiness_check` and `zwm_site_capability_report` before normal administration.
6. After any upgrade that adds tools, reconnect/refresh the MCP client so it reloads the current `tools/list` manifest.

Clients that only support static authentication can use a WordPress Application Password with HTTP Basic authentication.

== Security notes ==

* OAuth access is bound to the WordPress user who approved the connection.
* WordPress/plugin capability checks remain authoritative for every operation.
* Capability groups can be enabled or disabled independently from Settings → Ziflite MCP.
* The WordPress Admin Bridge is opt-in and requires `manage_options`.
* High-impact mutations use preview + explicit confirmation before execution.
* Ziflite OAuth/token-management routes and sensitive secret/authentication options are blocked from the generic Admin Bridge.
* Arbitrary filesystem editing and arbitrary SQL execution are intentionally not exposed through the normal MCP toolset.
* See `SECURITY.md`, `FIRST-5-MINUTES.md`, and `UPGRADE.md` in the plugin package for operational guidance.

== Changelog ==

= 2.6.1 =
* Added a dedicated Upgrade to Pro experience across the Free plugin UI.
* Added sales-page CTAs, Free vs Pro comparison, Pro integration states, and a Plugins-screen upgrade link.


= 2.3.1 =
* Documentation/release-candidate polish release; no administration capabilities removed or broadened.
* Rewrote installation/security guidance for the current OAuth-based connection flow.
* Added FIRST-5-MINUTES.md, SECURITY.md, UPGRADE.md, and RELEASE-NOTES-2.3.md.
* Clarified reconnect/refresh requirements after tool-adding upgrades.

= 2.3.0 =
* Release-readiness hardening release.
* Added zwm_release_readiness_check, a read-only onboarding/health check covering administrator permissions, HTTPS, capability groups, REST coverage, OAuth connection state, WordPress file-mod restrictions, cron configuration, tool-manifest revision, and major integration detection.
* Added an in-dashboard upgrade notice reminding site owners to reconnect/refresh MCP clients after releases that add tools.
* Added a Release Readiness section to Settings → Ziflite MCP with the recommended onboarding sequence.
* No existing tool capabilities removed.

= 2.2.1 =
* Clarified server-defined vs client-cached MCP tool manifests in the Site Capability Report.
* Added a tool-manifest revision fingerprint and reconnect guidance after upgrades that add tools.
* No capability removals; the seven v2.2.0 media/taxonomy/theme tools remain registered server-side.

= 2.2.0 =
* Added dedicated media metadata edit and trash/permanent-delete tools.
* Added generic taxonomy term create/update/delete tools with native taxonomy capability checks.
* Added dedicated theme update and inactive-theme delete tools using WordPress core APIs.
* Added confirmation gates for media deletion, taxonomy deletion, theme updates, and theme deletion.
* Arbitrary filesystem editing and SQL execution remain intentionally restricted.


= 2.1.0 =
* Added zwm_site_capability_report, a comprehensive read-only site capability/onboarding report.
* Reports dedicated Ziflite tool coverage, enabled/disabled capability groups, confirmation-gated tools, connected-user permissions, active plugin inventory, REST namespace read/write coverage, post types, taxonomies, known integrations, warnings, recommendations, and genuine capability gaps.
* Optional representative REST route samples make unfamiliar plugin APIs easier for the AI to understand without dumping the full route table.
* The report performs no writes and requires the explicitly enabled WordPress Admin Bridge.


= 2.0.1 =
* Added opt-in WordPress Admin Bridge with generic authenticated REST route discovery/request execution.
* Added safe WordPress option read/update tools with secret/auth protections.
* Added administrator snapshot, cron inspection/execution, and role/capability discovery.
* Generic mutations require explicit preview/confirmation; Ziflite OAuth/auth routes are blocked.


= 1.4.0 =
* Added `zwm_crm_compatibility_check`, a read-only FluentCRM readiness/self-test for newly connected sites.
* Reports FluentCRM/Pro versions, WordPress/PHP versions, current-user FluentCRM capabilities, registered REST routes, core read probes, automation/sequence availability, mail-stack diagnostics, and module-level readiness.
* Distinguishes required core checks from optional/Pro checks, returning `ready`, `degraded`, or `not_ready` instead of failing a site for unavailable optional features.
* Includes explicit compatibility notes for REST/native fallbacks discovered during real-world testing.

= 1.3.4 =
* Add mail delivery diagnostics and a confirmed wp_mail probe to distinguish FluentCRM request success from transport/inbox delivery.
* Enrich campaign test-send results with before/after mail diagnostics and explicit non-delivery semantics.
* Fix zwm_crm_get_contact numeric-ID lookups with a native Subscriber-model fallback.

= 1.3.3 =
* Fixed v1.3.2 native audience over-counting caused by using `method_exists()` on FluentCRM dynamic ORM scopes.
* Campaign preflight now calls the documented Subscriber model `filterByLists()` / `filterByTags()` scopes directly.
* List and tag selectors are queried independently then unioned, matching campaign audience semantics instead of accidentally requiring both.
* Every candidate contact is independently verified against its actual FluentCRM list/tag relationships before it can be counted.
* Exclusion lists/tags are also relationship-verified before removal.
* A contact that is not actually attached to the requested list/tag can no longer leak into the effective campaign audience.

= 1.3.2 =
* Fixed campaign-audience verification when FluentCRM REST filtering incorrectly reports zero contacts for populated lists.
* Audience preflight now uses FluentCRM's native Contacts API (`filterByLists` / `filterByTags`) and returns matching contact IDs.
* Added conversion from the public REST audience shape to FluentCRM's internal Campaign-model segment shape (`[{list:id}]` / `[{tag:id}]`).
* Campaign audience assignment automatically falls back to FluentCRM's native Campaign model when `/draft-recipients` fails or reports zero despite a positive native preflight.
* Native fallback verifies the audience with `getSubscriberIdsCountBySegmentSettings()` and persists campaign settings/recipient count through the Campaign model only; no direct DB writes.
* Audience estimates now report both REST and native counts and flag mismatches instead of treating two incorrect zeroes as success.
* Keeps the v1.3.0 test-send/send/status tools and all v1.2.2 contact/list/tag fixes unchanged.

= 1.2.2 =
* Fixed dedicated FluentCRM contact create/update failures by adding a supported native Contacts API fallback.
* Contact upserts are now independently re-fetched and verified before reporting success.
* Improved error diagnostics when both REST and native FluentCRM upsert paths fail.
* Fixed FluentCRM contact list/tag assignment. Update calls now use the documented subscriber.attach_tags, subscriber.detach_tags, subscriber.attach_lists, and subscriber.detach_lists payload.
* Human-readable list/tag names and slugs are resolved to FluentCRM numeric IDs automatically.
* Added zwm_crm_update_contact_segments and expanded zwm_crm_tag_contact to support lists.
* Contact upsert now uses __force_update=yes and resolves segment IDs before sending.
* CRM mutations re-read the saved contact so clients can verify lists/tags actually persisted.
* FluentCRM REST failures now return route, HTTP status, method, and underlying error data for easier diagnosis.

= 1.2.0 =
* Added: expanded FluentCRM tools for tags, lists, automations/funnels, Pro sequences, and one-off email through the site mail/SMTP stack.
* Added: version-aware FluentCRM REST route discovery and an advanced scoped API bridge under /fluent-crm/v2.
* Added: Fluent Forms capability group with live REST route discovery, scoped /fluentform/v1 API bridge, and programmatic form submission.
* Added: preview/confirmation gates for high-impact generic CRM requests, email sending, and destructive Fluent Forms requests.
* Architecture: preserves the existing plugin slug, settings and OAuth/MCP endpoint so this package installs as an update over v1.1.0.

= 1.1.0 =
* Added: full plugin management (install, activate, deactivate, update, delete).
* Added: full theme management (install, activate).
* Added: site settings tool (title, tagline, timezone, date/time format, search-engine visibility).
* Added: user role updates and user deletion; user creation and role changes can now optionally reach Administrator via a new, off-by-default "Allow assigning Administrator role" setting.
* Plugins and Themes are new capability groups, off by default, clearly marked as high-risk in Settings → Ziflite MCP since installing one runs new code on the site.

= 1.0.0 =
* Initial release.


== ZifChat Pro first-party integration ==

Ziflite MCP Pro 2.4 adds a first-party ZifChat integration for sites running both Ziflite and ZifChat. It uses the WordPress Abilities API locally where available instead of making unnecessary HTTP loopback calls, reducing tool discovery overhead and improving reliability.

The ZifChat Pro capability group is disabled until the site owner enables it. ZifChat remains the source of truth for agents, knowledge, analytics, diagnostics and AI settings. Ziflite does not duplicate that data.

After updating to a build that adds ZifChat tools, reconnect or refresh the MCP client so it reloads the server tool manifest.


== Free vs Pro ==
Free is fully usable and contains no premium implementation code. Ziflite MCP Pro is a separate paid add-on distributed outside WordPress.org.
