=== Ordomat MCP for Claude Code ===
Contributors: pepinogeorgah
Tags: mcp, claude, connector, ai, content
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WordPress to Claude Code. Read, write and tidy your site from one conversation, with a log of every call.

== Description ==

**Give Claude Code the tools to work on your WordPress site.** Read it, audit it, write and edit its content, straight from Claude Code, without SSH, WP-CLI or a line of code of your own.

Ordomat is the control layer between the two. You create a token on the Connection screen, paste one command into Claude Code, and the assistant works inside the limits you set. Every call goes through the same barriers, and every call is written to a log you can read.

The plugin is an MCP server: it speaks the Model Context Protocol over the WordPress REST API, so it also works with other MCP clients, ChatGPT and Cursor among them.

= Safeguards first =

* **Tokens, never passwords.** Tokens are stored hashed, shown once, revocable, and can expire.
* **Three barriers on every call.** The tool scope, the token profile (read, write, administration) and the permissions of the WordPress account attached to the token. The most restrictive one wins.
* **Dry run before writing.** Every tool that writes accepts `dry_run` and describes what would change without writing anything. Bulk replacement refuses to run without a preview first.
* **A log of every call**, including refusals, with account, address, duration and a summary of the parameters. Secrets are masked. Export to CSV.
* **Emergency stop** that closes the connector and revokes every token at once.
* **Rate limiting**, HTTPS required outside local sites, optional IP allowlist.
* **Every tool can be turned off** individually.

= What the assistant can do =

* **Work with what the site already has:** one call returns the content types, taxonomies, blocks and shortcodes the installed plugins provide, the page builders present, and the colours, fonts and spacing the site is designed with. Claude Code then drives those plugins with the tools it already has, instead of asking you to install another one.
* **Read and diagnose:** site information, content search, installed extensions, Site Health, media inventory, missing excerpts and alt texts, broken links.
* **Write and publish:** create drafts, update content, change status or schedule, upload media, set alt texts, crop and rotate images, manage categories and tags, moderate comments, restore revisions, remove a content or a term.
* **Fix in bulk:** search and replace with a mandatory preview, refused if the content changed in between. An editorial audit reports what is thin, untitled or unillustrated.
* **Custom fields:** read and write the fields of other plugins, an SEO title for instance, without ever writing serialised data.
* **Manage:** create, change and remove accounts, change the site settings (title, permalinks, home page, time zone, reading and comments), compose navigation menus, search the official extension directory.
* **Read the shop:** when WooCommerce runs on the site, list products and orders, read a product with its price and stock, and sum up sales over a period.
* **Maintain:** purge caches (object cache and popular cache plugins), check that a page still answers before and after a change, list what the site has scheduled, send an activity report to the administrators.

= Page builders =

On a page built with Elementor, the visible text does not live in the post content: reading there returns nothing useful, and writing there changes nothing on screen. The plugin recognises Elementor, Bricks, Beaver Builder, Divi and WPBakery, reads the text where it really lives, so link checks and audits tell the truth, and refuses to write what it cannot write safely, naming the builder instead of pretending. Text replacement works inside the Elementor format without touching the layout.

= Ready-made recipes =

The plugin also ships six recipes, exposed as MCP prompts: check the state of the site, audit the editorial content, find and fix broken links, write the missing alt texts, review a draft before publishing, and build a home page. A recipe says in which order to call the tools, when to simulate and when to ask, and it only appears if the token can actually reach every tool it needs.

Four read-only resources give a client the site context in one read: the site profile, the tools this token can call, the safeguards in force, and the recent activity. The last two need an account that administers the site, and every read is recorded.

= Two modes =

One choice on the settings screen sets the ceiling for everything else: **Read only**, or **Edit the site**. You can change it at any time, and each one says plainly what it opens and what it costs.

Read only suits a first try, and suits having the site audited without risk: every tool that writes is out of reach, whatever the token allows. Edit the site is the everyday mode, where Claude Code writes what you would write yourself from the WordPress screens, and nothing further: no code, no access to the whole database, nothing that runs later on its own.

The mode is only ever changed from that screen, by a logged-in administrator. No tool writes the connector's own settings, so a stolen token cannot widen its own reach.

= What it does not do =

The plugin lives inside WordPress. It does not replace SSH access: it does not manage the server's system cron, server configuration, DNS or host-level backups.

It writes no code. It does not edit the files of your theme or of another plugin, does not install anything, does not export your database, and does nothing on a schedule of its own.

It does not include an AI model and does not send your content anywhere by itself. The assistant runs on your computer or in your MCP client and calls your site.

= Going further =

A separate add-on, Ordomat Pro, carries the tools this plugin does not: page builder layouts, block templates, child theme files, writing to a WooCommerce shop, automations, scheduled tasks, plugin installation and updates, exports, and the error log. It is not distributed here. This plugin is complete without it, and never asks you for it.

= Built in, no third party =

No external library, font, script or icon is loaded. The interface is available in English and French.

This plugin is not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC.

== External services ==

The plugin makes no outgoing request on its own. The following requests only happen after an explicit action or setting from the site owner:

* **Link checking** (`links_check`): when "Allow checking links outside this site" is turned on in the settings, the plugin sends HEAD or GET requests to the addresses found in your content, to report broken links. Only the address is requested. Private and reserved network addresses are never requested.
* **Remote media** (`media_upload`): when "Allow fetching media from an address" is turned on, the plugin downloads the file at the address given by the assistant, using the WordPress media functions.
* **Activity report** (`report_send`): sends an email through your site's own mail configuration, only to the site admin address or administrator accounts.
* **Extension directory** (`plugins_search`): when "Allow reaching the WordPress.org directory" is turned on, the plugin queries the official WordPress.org directory, by search terms, to report the matching extensions. It installs nothing.

Requests to your own site (connection test, page checks) never leave your server.

== Installation ==

1. Install and activate the plugin from the Plugins screen.
2. Open **Ordomat > Connection**, turn the connector on, and create a token. Choose its profile. The token acts as your own account, never beyond its permissions.
3. Copy the command shown once, and run it in your terminal to add the site to Claude Code.
4. Click **Test the connection** to check that your host lets the authorization header through.

The **Documentation** screen inside the plugin explains every tool, profile and setting.

== Frequently Asked Questions ==

= Does it work with clients other than Claude Code? =

Yes. The endpoint speaks MCP over HTTP with a bearer token. The Connection screen also shows a `.mcp.json` file for other clients.

= My host removes the Authorization header. =

The connection test detects it. The plugin also accepts the token in an `X-Ordomat-Token` header.

= Can the assistant break my site? =

It can only do what the token profile, the WordPress account and the enabled tools allow. Writing tools can simulate first, file writes are backed up and rolled back automatically if the site returns a server error, and every call is in the log. Keep backups at your host anyway, as for any change to a site.

= Can a token edit my theme files? =

No. This plugin does not read or write plugin and theme files, and it cannot create or run code of its own on your site. Extensions it installs come from the official directory only, through the WordPress installer, exactly as from the Plugins screen.

= What is kept when I delete the plugin? =

Tokens, file backups, scheduled tasks and exports are always deleted. The activity log and settings are deleted too, unless you turned that off in the settings to keep the history.

= Can it create accounts? Does it ever see passwords? =

It can create, change and remove accounts, within the rights of the account the token acts as. No password ever passes through the connector: WordPress generates one and emails the person a link to set their own. The last administrator can never be removed or demoted, and no account can hand out a role with more rights than it holds.

= Which settings can it change? =

Only a fixed list: site title and tagline, permalinks, time zone and formats, home page and posts page, default category and role, comments, registration and search engine visibility. Any other option is refused, never written. A draft page cannot be set as the home page.

= Is there a multisite version? =

The plugin works per site. On multisite, WordPress rules apply: a tool never does more than the account attached to the token is allowed to do.

== Screenshots ==

1. Dashboard: setup progress, calls over fourteen days by outcome, most used tools and recent activity.
2. Connection: guided setup, token revealed once with the ready-to-paste command.
3. Tools: search, filters and a switch for every tool, with its reach, profile and parameters.
4. Activity log: every call, filterable, exportable to CSV.
5. Settings: access, limits, outgoing requests and a danger zone behind confirmations.
6. Documentation: every tool, every profile and every setting, explained inside the plugin.

== Changelog ==

= 1.0.3 =
* Changed: the connection screen now offers one path per client, Claude Code, a single project, Claude Desktop and Cursor, or by hand, each with its own three steps instead of a tab named after a file format.

= 1.0.2 =
* Fixed: comment moderation is paginated and searchable, so hundreds of pending comments no longer take four round trips.
* Added: content_update accepts featured_media, to set a featured image from the library.
* Added: discussion settings are now writable, including the link threshold and the disallowed words that stop spam.
* Added: taxonomy_manage writes term descriptions, which many themes show at the top of a category archive.
* Fixed: page_verify names a redirect loop instead of leaving the site for dead.
* Fixed: a link refused by a remote server is no longer counted as broken.
* Fixed: dry_run is accepted on every tool, including those that change nothing.
* Fixed: the connection test tries both headers and only fails when neither works, validates every tool schema as a client would read it, calls a tool for real, and asks the internet for every folder the plugin writes into.
* Added: an email warns the token's owner the first time it answers from a new address.
* Added: the log filters by kind of action, to find destructive calls among hundreds.
* Added: the dashboard says when the site runs in the widest mode, and names the tools it opens.
* Added: ten example requests inside the documentation screen.

= 1.0.1 =
* Fixed: tools with no parameter sent an empty JSON array instead of an empty object, which made strict MCP clients reject the whole tool list. Every tool was unusable.
* Security: the database export folder is now proven closed before a backup is written. On nginx the guard files are never read, and a full site dump was reachable from the internet.
* Fixed: the token is now read from the raw request headers too, so hosts that strip the Authorization header before PHP no longer need an .htaccess rule.
* Fixed: a replace preview is kept in the database instead of a transient, so a persistent object cache can no longer lose it. Unknown and expired previews now say which they are.
* Fixed: link checking now stops after a time limit and returns what it found, instead of never answering when a remote server goes silent.

= 1.0.0 =
* First release: MCP endpoint, tokens and permission profiles, 46 tools, 6 recipes and 4 resources, content writing and bulk correction, editorial audit, broken link checking, media and alt texts, custom fields, menus, taxonomies, accounts, site settings, WooCommerce read access, page builder text reading, cache purge, dry run before every write, activity log, dashboard, documentation, English and French.

== Upgrade Notice ==

= 1.0.3 =
The connection screen tells each client what to do, in three steps.

= 1.0.2 =
Fixes found by two days of real-world use: pagination, featured images, discussion settings, redirect loops, and a connection test that now tells the truth.

= 1.0.1 =
Fixes a bug that made every tool unusable in strict MCP clients, and closes a folder that could expose a full database backup. Update now.

= 1.0.0 =
First release.
