=== NB MCP OAuth Bridge ===
Contributors: notrebonnecomm
Tags: mcp, oauth, ai, abilities-api, chatgpt
Requires at least: 6.9
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.4.1
License: GPLv2 or later

OAuth 2.1 security layer for the official WordPress MCP Adapter.

== Description ==

NB MCP OAuth Bridge packages the official WordPress MCP Adapter and exposes its
Abilities API through a reusable OAuth-protected remote MCP endpoint.

Security properties:

* Authorization Code flow with mandatory PKCE S256.
* OAuth Protected Resource Metadata and Authorization Server Metadata.
* Audience/resource-bound opaque access tokens stored only as keyed hashes.
* Short-lived access tokens.
* Rotating refresh tokens with reuse-family revocation.
* Exact redirect URI matching.
* WordPress login, explicit consent, nonces and capability checks.
* Read/write/offline scopes.
* Emergency global token revocation.
* Fail-closed defaults; the remote endpoint is disabled after installation.

== Installation ==

1. Install the release ZIP in Plugins > Add Plugin > Upload Plugin.
2. Activate the plugin.
3. Open Settings > NB MCP OAuth.
4. Configure OAuth and operation access for each WordPress role.
5. Enable remote MCP OAuth.
6. Add the displayed MCP endpoint as a custom remote MCP app in ChatGPT Web.

The role matrix is only a ceiling. It never grants WordPress capabilities, and
every exposed Ability must still pass the connected user's native permission
checks. A dedicated WordPress integration user remains recommended for
administrative plugin operations.

== Frequently Asked Questions ==

= Does this modify WordPress/mcp-adapter? =

No. The official adapter is a Composer dependency. The OAuth transport remains
separate so upstream security and compatibility updates can be adopted cleanly.

= Are raw passwords or OAuth tokens stored in the database? =

No raw access, refresh, or authorization-code values are stored. The database
contains keyed HMAC-SHA-256 hashes. Client IDs are public identifiers.

= Does this make every WordPress operation available? =

No. Only Abilities explicitly marked for public MCP exposure by their owning
plugin are discoverable. Their own WordPress permission callbacks still apply.

== Changelog ==

= 0.4.1 =

* Add a complete bundled French translation for the administration screen, OAuth consent, MCP abilities, and public error messages.
* Load the plugin text domain before registering MCP categories and abilities.

= 0.4.0 =

* Add administrator-managed OAuth and operation access for every registered WordPress role.
* Keep native WordPress user, object, post-type, and source-Ability permissions authoritative.
* Apply role-access changes to existing MCP tokens on their next request.
* Add role-aware access to the optional WordPress AI bridge.
* Preserve the dedicated NB MCP Operator role for isolated integration users.

= 0.3.0 =

* Add article and page list, read, create, update, status, trash, and deletion abilities.
* Add plugin inventory, update, activation, deactivation, WordPress.org installation, and inactive-plugin deletion abilities.
* Add a dedicated NB MCP Operator role with granular permissions configured in the plugin.
* Require the selected MCP permission and native WordPress capabilities for every operation.
* Keep arbitrary plugin package URLs and plugin file editing unavailable.

= 0.2.0 =

* Add an optional allowlisted bridge for WordPress AI plugin abilities.
* Reuse the source ability schemas, execution callbacks and permission checks.
* Enable safe text-generation and analysis abilities by default when the bridge is explicitly enabled.
* Keep paid image generation and Media Library import disabled by default.

= 0.1.1 =

* Fix OAuth consent approval when the web server provides a lowercase request method.
* Reject unsupported authorization endpoint methods with HTTP 405.

= 0.1.0 =

* Initial OAuth 2.1 and remote MCP implementation.
