=== Site Agent MCP ===
Author: Laurent Rochetta
Author URI: https://rochetta.fr/
Tags: mcp, ai, agents, oauth, claude
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.4.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect Claude, ChatGPT, Codex, Gemini CLI and Antigravity to WordPress with OAuth. Agents act with the rights of the user who connects them.

== Description ==

Site Agent MCP turns your site into a remote MCP server. You paste its URL into your AI application, sign in to WordPress and approve the connection. No password or API key to copy.

Agents get the rights of your account, no more:

* Everything in the REST API, for WordPress and every plugin.
* WordPress abilities registered by any plugin.
* Plugin settings through options, and plugin screens through their admin forms.
* Plugin, theme and core management.
* SEO and GEO audits with evidence rather than invented scores, PageSpeed Insights, Chrome UX Report, GTmetrix and IndexNow. Tests send the URL to the service concerned, only when an agent asks.
* Page inspection for cache and styling checks.
* A journal with undo for option and file changes.

Administrators can also grant a connection server-level access on the consent screen: files, SQL, PHP and WP-CLI.

== Requirements ==

* HTTPS.
* Pretty permalinks.
* WordPress at the root of its domain is the simplest setup. In a subdirectory, some clients may not find the OAuth discovery documents.

== Security ==

* OAuth 2.1 with PKCE S256. Tokens are bound to this site's MCP endpoint and stored only as hashes.
* A token authenticates only on the MCP endpoint, nowhere else on the site.
* Every action goes through WordPress capability checks for the connected user.
* DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS are respected.
* Connections are revoked when the user's password changes, and each can be revoked from Tools > Site Agent MCP.
* wp-config.php and .env stay out of reach unless SAMCP_ALLOW_SECRET_FILES is defined.
* Define SAMCP_DISABLE_POWER_TOOLS to turn off server-level tools for the whole site.

An agent with these rights can damage your site. Keep backups and use a staging copy for large changes.

Content read from the site can contain instructions aimed at an AI (prompt injection). Results are marked as untrusted, but this cannot fully prevent an agent from following them. Be careful when connecting an agent to sites with content from untrusted people.

== Credits ==

Created by Laurent Rochetta, AI operations architect, OVEANET.

* Website: https://rochetta.fr/
* LinkedIn: https://www.linkedin.com/in/laurentrochetta/
* GitHub: https://github.com/lrochetta

== Changelog ==

= 0.4.1 =
* Backups work when wp-content lives outside the WordPress folder, as on Cloudron or Bedrock. Its files keep the wp-content/ prefix in the archive and go back to the right folder on restore.
* Restore explains when the WordPress folder is read-only, as on managed platforms, instead of failing.

= 0.4.0 =
* Full backups: every database table and every file, with a manifest of the environment, in short resumable steps that suit shared hosting.
* Backups can be verified, downloaded and deleted in Tools > Site Agent MCP. Agents can create and verify them through backup_create, backup_status and backup_verify.
* Restore on the same site, started only by an administrator, through a one-time restorer that runs without WordPress and deletes itself.

= 0.3.1 =
* Settings: browsers no longer fill the key fields with the WordPress login and password, and those values are refused if they are.
* Security audit: XML-RPC is no longer reported as open when a plugin turns off its password methods.
* Site overview lists only the capabilities the user really has on this site.

= 0.3.0 =
* Google Search Console connection: real clicks, impressions, positions, URL inspection and sitemaps.
* Read-only security audit, with agents steered to it when they connect as an administrator.
* Agents are guided through security, SEO, E-E-A-T and GEO workflows, with rules attached to results.
* Step-by-step setup with links for each service, and a button to test it.

= 0.2.0 =
* SEO, GEO, performance and page styling tools.
* A warning when WordPress removes tags from saved content.

= 0.1.0 =
* First version.
