=== Site2App MCP Gateway ===
Contributors: chatbotro
Tags: chatgpt, mcp, ai, gateway, openai
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WordPress site to the Site2App MCP gateway for ChatGPT apps, demo tools, and widgets.

== Description ==

Site2App provides a stable MCP URL for ChatGPT and other AI clients, plus gateway-hosted demo tools and ChatGPT widgets.

This plugin is a **standalone WordPress client** for the Site2App gateway. It stores credentials in `wp_options` only and does not modify your WordPress database schema.

**What happens automatically:** On activation, one HTTPS request registers your site URL with site2app.live and stores a per-install secret locally. Provisioning, status refresh, the external console link, and billing each require an explicit click in wp-admin.

== Installation ==

1. Upload the `site2app-mcp-gateway` folder to `/wp-content/plugins/` or install the zip from WordPress.org when published.
2. Activate the plugin (one install handshake runs automatically).
3. Open **Site2App** in wp-admin, enter a business category slug (e.g. `ecommerce`), and click **Provision MCP gateway**.
4. View your MCP URL and tool summary in the native status panel. Click **Open full console** to manage advanced settings on site2app.live in a new browser tab.

== Frequently Asked Questions ==

= Does this plugin write to the gateway database directly? =

No. All gateway data changes go through HTTPS API calls to site2app.live.

= What happens on activation? =

Only a single `POST /api/wp/install` request registers your public site URL and stores a per-install secret in `wp_options`. No tools are provisioned and no billing occurs until you click further actions in wp-admin.

= Is a paid plan required? =

No. Demo provisioning is free. Paid Stripe plans are optional and only start when you click **Activate plan** in wp-admin.

== External Services ==

This plugin connects to third-party services. By installing and activating this plugin, you authorize these connections when the described actions occur.

=== site2app.live (Site2App gateway) ===

**Purpose:** Registers your WordPress install, provisions MCP gateway sites and demo tool packs, loads site status and tool lists via API, mints console sessions, and opens the external Site2App console in a new browser tab when you click **Open full console**.

**Data sent:**

* **On activation:** your public site URL (`siteUrl`).
* **On provision (admin click):** install ID, install secret, site URL, business category slug, and site name.
* **On status refresh (admin page load after provision):** install ID and install secret (HMAC-signed handshake), then Bearer session token for `GET /api/sites/{id}` and `/tools`.
* **On console open (admin click):** install ID and install secret (HMAC-signed handshake); session token passed to site2app.live in a new tab URL.
* **On Go Live checkout (admin click):** gateway site ID and selected package name.

**When sent:** Activation runs once automatically. Provision, status, console handshake, and checkout run only after an administrator clicks the corresponding button or loads the provisioned admin page in wp-admin.

**Service provider:** [site2app.live](https://site2app.live)

[Terms of Service](https://site2app.live/terms) | [Privacy Policy](https://site2app.live/privacy)

=== Stripe (payment processing via Site2App gateway) ===

**Purpose:** Optional paid plans (“Go Live”) when you choose to upgrade. The plugin requests a checkout URL from the Site2App gateway; payment is completed on Stripe’s site.

**Data sent:** Gateway site ID, package tier, and billing cycle are sent to site2app.live, which creates a Stripe Checkout session. Stripe receives payment details directly from you on their hosted checkout page.

**When sent:** Only when an administrator clicks **Activate plan** in wp-admin.

**Service provider:** [Stripe](https://stripe.com)

[Terms of Service](https://stripe.com/legal) | [Privacy Policy](https://stripe.com/privacy)

=== site2app.live demo assets (optional) ===

**Purpose:** The included sample REST route (`/wp-json/site2app/v1/demo-carousel`) may return a placeholder image URL hosted on site2app.live for demo ChatGPT widgets.

**Data sent:** None from WordPress unless an AI client or browser loads that image URL.

**When sent:** Only when something requests the demo carousel endpoint or the placeholder image URL.

**Service provider:** [site2app.live](https://site2app.live)

[Terms of Service](https://site2app.live/terms) | [Privacy Policy](https://site2app.live/privacy)

== Privacy ==

See the **External Services** section above. Site2App’s privacy policy: https://site2app.live/privacy

== Screenshots ==

1. MCP LIVE — your website tools surfaced in ChatGPT via the Site2App gateway.
2. Site2App console — copy, test, and manage your public MCP gateway URL.
3. Interactive ChatGPT widget calling your gateway tools (practice quiz example).

== Changelog ==

= 1.0.7 =
* Rename console link to Configure MCP Tools; console session opens site tool editor.
* Fix Playground re-activation (gateway install secret reclaim).
* Fix category list collapse and status panel loading UX.

= 1.0.6 =
* Fix demo category search returning Unauthorized: bundled catalog fallback when gateway is unreachable or still gated.

= 1.0.5 =
* Searchable demo category picker (same catalog as Wix app) for provisioning.
* Test MCP URL button with console-style readiness checks and ChatGPT setup guidance when green.
* Go Live section links to console instead of in-plugin Stripe checkout.

= 1.0.4 =
* Replace admin console iframe with native API-driven status panel (MCP URL, plan, tool list).
* Open full console on site2app.live in a new browser tab on explicit click (no embedded iframe).
* Add contributor chatbotro.

= 1.0.3 =
* Remove duplicate Plugin URI header (Author URI only per WordPress.org directory rules).

= 1.0.2 =
* Plugin Check: align text domain with slug, Tested up to 7.0, remove load_plugin_textdomain.

= 1.0.1 =
* WordPress.org submission: slug-aligned zip layout, External Services readme, activation error notice, i18n bootstrap.

= 1.0.0 =
* Initial release: install handshake, explicit provision, console iframe, Stripe Go Live hook.
