# FXT & AI

With FXT 1.10.0 you can manage your broker reviews from an AI chat. Ask Claude or
ChatGPT something like "which published brokers have no description?" or "add
these pros and cons to *broker name*", and it does the work on your website for
you.

This page explains how to set that up. If you are a developer using a coding
tool such as Claude Code, skip to
[Coding agents and developer tools](https://docs.affkraft.com/fxt/ai#coding-agents-and-developer-tools).

***

## Manage your website from a chat with an AI agent

### How it works

An AI assistant doesn't log in to your dashboard and click around like you do.
Instead, your website gives it a list of specific tasks it is allowed to do,
such as "list brokers", "update a broker" or "set broker ratings". WordPress
calls these tasks **abilities**.

To make this work you need three things:

1. **FXT** provides the abilities for your brokers, broker categories and tags,
   FXT blocks, theme options, theme strings and license status. You choose which
   ones to offer on the **FXT Options → AI & Abilities** page.
2. **"[MCP Adapter](https://wordpress.org/plugins/mcp-adapter/)"**, a free
   plugin, lets AI apps connect to your website and use those abilities.
3. **"[Enable Abilities for MCP](https://wordpress.org/plugins/enable-abilities-for-mcp/)"**,
   a free plugin, adds the sign-in. When you connect a chat app, you log in to
   your WordPress website and approve the connection, much like "Sign in with
   Google" on other websites.

The assistant then works as the WordPress user you signed in with. If that user
isn't allowed to do something, the assistant can't do it either.

> **Warning**
>
> AI abilities need WordPress 6.9 or newer. On older versions the
> **AI & Abilities** page shows a notice; update WordPress to use them. The rest
> of FXT works on WordPress 6.0 and newer.
>
> Your website must also be online and use HTTPS, because the chat app connects
> to it over the internet. A local website, or a staging website behind a
> password, won't work.

### Set it up

1. **Install the plugins.** Go to **FXT Options → AI & Abilities**. The
   **Status** box at the top has buttons to install and activate both plugins.
2. **Choose what the assistant can do.** On the same page, tick **Enable
   abilities**, then tick the groups you want and click **Save Changes**. The
   default groups let the assistant read and edit brokers, manage broker
   categories and tags, and work with FXT blocks, while moving brokers to the
   trash, changing FXT options, editing theme strings and checking license
   status are off by default.
3. **Turn on sign-in.** Go to **Settings → WP Abilities**, open the
   **Connection** tab and turn on the OAuth connector.
4. **Connect your chat app.** In your chat app, add a *custom connector* and
   paste your website address. You'll be sent to your WordPress login page:
   sign in and approve.
5. **Try it.** Start a new chat, make sure the connector is switched on for it,
   and ask "list my five most recent brokers".

Where to add a custom connector depends on the app. Menu names change often, so
treat these as a guide:

| App | Where |
| --- | --- |
| Claude | **Settings → Connectors → Add custom connector** |
| ChatGPT | Turn on Developer Mode in **Settings → Apps & Connectors → Advanced settings**, then create a connector with your website address and OAuth sign-in. Paid plans only, at the time of writing. |
| Gemini | **Settings → Connected Apps → Add a custom app**. Available to personal accounts in the US only, at the time of writing. |

> **Tip**
>
> "Enable Abilities for MCP" also comes with its own abilities for posts, pages,
> media and more. FXT doesn't need them, so turn on only the ones you want on its
> **Abilities** tab.

### The AI & Abilities page

**Status** tells you whether everything is ready. A green tick means that part
is fine; a warning icon tells you what's missing, usually with a button to fix
it.

* **MCP Adapter** and **Chat app sign-in (OAuth)** show whether the two plugins
  are active. When MCP Adapter is active, its endpoint address is shown too.
* **FXT abilities** shows how many tasks the assistant can currently use, and
  from how many groups.
* **Hidden elsewhere** only appears if "Enable Abilities for MCP" has switched
  off some of FXT's abilities on its own screen. Turn them back on there if you
  want to use them.

**Ability Groups** starts with the main switch, **Enable abilities**. It is off
by default, and while it's off, assistants can't do anything with your FXT data.
Below it, related tasks are grouped together, for example everything needed to
create and update brokers.

**Individual abilities (advanced)** lets you switch off a single task inside a
group you turned on. For example, you can let the assistant update brokers but
turn off `fxt/create-broker` or `fxt/delete-term`. Note that `fxt/update-broker`
can change any broker field, so turn it off too if you only want the narrower
tools.

### Ability groups

"Who can use it" means which WordPress users the assistant can sign in as to
use that group.

| Group | What it can do | Abilities | Who can use it | Default |
| --- | --- | --- | --- | --- |
| Brokers: read | List, inspect and audit brokers, list valid field choices and check country support | `fxt/list-brokers`, `fxt/get-broker`, `fxt/audit-brokers`, `fxt/list-field-choices`, `fxt/check-geo-support` | Users who can edit pages (Editor and up) | On |
| Brokers: edit | Create draft brokers and update broker fields, ratings, pros & cons, regulations, restricted countries, categories and tags | `fxt/create-broker`, `fxt/update-broker`, `fxt/set-broker-ratings`, `fxt/set-broker-pros-cons`, `fxt/set-broker-geo` | Users who can edit pages, and only on brokers they may edit. Publishing needs publish rights | On |
| Brokers: trash | Move brokers to the trash and restore them | `fxt/trash-broker`, `fxt/restore-broker` | Users who can delete that specific broker | Off |
| Broker categories & tags | List, create, rename and delete broker categories and tags | `fxt/list-terms`, `fxt/create-term`, `fxt/update-term`, `fxt/delete-term` | Users who can manage categories (Editor and up) | On |
| FXT blocks | List FXT block types, find FXT blocks across brokers, pages and posts, and update or insert FXT blocks | `fxt/list-element-types`, `fxt/find-elements`, `fxt/get-elements`, `fxt/update-block`, `fxt/insert-block` | Users who can edit pages and the specific post, page or broker | On |
| FXT options | Read and update allowlisted FXT theme options and change the broker URL slug | `fxt/get-settings`, `fxt/update-settings`, `fxt/set-broker-slug` | Administrators (manage_options) | Off |
| Theme strings | List and customize FXT frontend UI strings | `fxt/list-strings`, `fxt/set-strings` | Administrators (manage_options) | Off |
| License status | Check whether an FXT license key is saved and whether it is expired | `fxt/get-license-status` | Administrators (manage_options) | Off |

### The 27 abilities

| Ability | What it does |
| --- | --- |
| `fxt/list-brokers` | Lists brokers with pagination, search, status, category, tag, regulation and restricted-country filters, and sorting by title, date, modified date, rating or menu order. Each item includes quick data-completeness flags and whether the broker is synced from tablrr. |
| `fxt/get-broker` | Returns the full record for one broker, including all broker fields, ratings, pros and cons, categories, tags, tablrr management details and data-completeness issues. |
| `fxt/audit-brokers` | Scans up to 500 brokers for missing or out-of-range fields and returns only the brokers with issues, along with a summary count for each issue code. |
| `fxt/list-field-choices` | Lists valid codes and labels for broker choice fields (`type`, `pair_types`, `regulations`, `countries`, `languages`, `platforms`, `payment_methods`, `rating_keys`, `affiliate_link_slots`), with optional search filtering. |
| `fxt/check-geo-support` | Checks whether a broker supports visitors from a given ISO-2 country code based on its restricted-countries list. |
| `fxt/create-broker` | Creates a new broker review in `draft` status with optional broker fields, categories and tags, and reports any required fields still needed before publishing. Refuses duplicate titles unless `allow_duplicate` is set. |
| `fxt/update-broker` | Updates a broker's title, slug, status, featured image, categories, tags and broker fields. Refuses fields managed by tablrr on synced brokers and enforces required fields before publishing. |
| `fxt/set-broker-ratings` | Updates a broker's overall rating and category ratings (`rating_1` to `rating_6`) on the 0 to 5 scale; only passed ratings change. Refuses changes on brokers synced from tablrr. |
| `fxt/set-broker-pros-cons` | Replaces a broker's pros list, cons list or both (up to 15 items per list). Refuses changes on brokers synced from tablrr. |
| `fxt/set-broker-geo` | Replaces a broker's regulations list or replaces, adds to or removes from its restricted-countries list. Refuses changes on brokers synced from tablrr. |
| `fxt/trash-broker` | Moves a broker to the WordPress Trash (requires trash to be enabled on the site; refuses if EMPTY_TRASH_DAYS is 0). |
| `fxt/restore-broker` | Restores a trashed broker back to `draft` status. |
| `fxt/list-terms` | Lists terms in `broker_category` or `broker_tag` with ID, name, slug, description, parent and broker count. |
| `fxt/create-term` | Creates a new term in `broker_category` or `broker_tag`. |
| `fxt/update-term` | Renames a broker category or tag, or updates its slug, description or parent category. |
| `fxt/delete-term` | Permanently deletes a broker category or tag. Brokers themselves are kept and only detached from the deleted term. |
| `fxt/list-element-types` | Lists all 11 FXT block types (`fxt/*`) with their titles and ACF settings schemas. |
| `fxt/find-elements` | Finds brokers, pages and posts you can edit that contain FXT blocks (scans up to 500 posts, truncated indicates if more exist), optionally filtered by post type and block name. |
| `fxt/get-elements` | Returns every FXT block in a broker, page or post with its 0-based index, block name and current settings. |
| `fxt/update-block` | Updates specific settings on one FXT block in a broker, page or post by its index and block name, leaving the rest of the post untouched. |
| `fxt/insert-block` | Inserts a new FXT block into a broker, page or post at the start, end or after an existing FXT block without changing post status. |
| `fxt/get-settings` | Returns the 33 allowlisted FXT theme options across the `broker`, `page`, `post`, `links`, `layout`, `social` and `affiliate_links` sections with their current value and default. |
| `fxt/update-settings` | Updates one or more allowlisted FXT theme options after validating the entire request. |
| `fxt/set-broker-slug` | Changes the URL slug prefix for all broker review pages and schedules a rewrite-rule refresh for the next page load. |
| `fxt/list-strings` | Lists all FXT frontend theme strings with their key, title, description, default text, custom override, effective value and placeholders. |
| `fxt/set-strings` | Sets or clears custom plain-text overrides for one or more FXT theme strings and warns if any expected placeholder token is omitted. |
| `fxt/get-license-status` | Reports whether an FXT license key is saved on the site, the installed FXT version and the cached expiration status, without ever exposing the license key. |

### Keeping it safe

* **Use a separate WordPress user** for the assistant, with the Editor role,
  instead of your own Administrator account.
* **Start with the default groups** and turn on more only when you need them.
* **Nothing goes live by accident.** New brokers are always saved as drafts. A
  broker can only be published once it has all required fields: logo, name,
  website, main feature, founded, headquarters, real account link, ratings
  (`overall_rating` and `rating_1` to `rating_6`), trading platforms, deposit
  methods and withdrawal methods.
* **Moving to trash needs WordPress trash to be enabled.** If `EMPTY_TRASH_DAYS`
  is 0 on the site, moving to trash would delete the broker permanently, so the
  ability refuses with an error instead. WordPress empties the trash after 30
  days by default. Deleting a broker category or tag, however, cannot be undone
  (the brokers themselves are kept).
* **Your license key stays private.** The assistant can never read or change
  your FXT license key, only check whether one is saved.
* **Brokers synced from tablrr stay protected.** When a broker is synced from
  tablrr and operator sync is active, the fields that tablrr manages cannot be
  changed from the chat; the assistant explains that those fields are managed in
  the tablrr dashboard. It can still edit the broker's logo, extra affiliate
  links (`affiliate_link_1` to `affiliate_link_10`), title, slug, status,
  categories, tags and content blocks.
* **Options are an allowlist.** Only the 33 safe theme options are exposed.
  No ability can inject scripts or custom code, or read your license key.
* **Changing the broker URL slug affects every broker URL.** Old links stop
  working unless you add redirects, and rewrite rules refresh on the next page
  load.
* **Ratings use a 0 to 5 scale.** Any rating write outside 0 to 5 is rejected,
  and existing out-of-range ratings are flagged by the audit.
* **Ask to see changes first**, especially for bulk edits: "show me the changes
  before saving".

### Things you can ask

* "Which published brokers have no description or no regulations?"
* "Set the overall rating of *broker* to 4.5."
* "Add these pros and cons to *broker*: ..."
* "Is *broker* available to visitors from Germany?"
* "Which brokers are regulated by the FCA?"
* "Add a FAQ block with these questions to *broker*."
* "Change the text of the Open Account button to *Start Trading*."
* "Turn off the table of contents on all pages."

The broker audit checks each broker for 12 issues: missing logo, missing broker
name, missing official website, missing real account link, missing overall
rating, missing category ratings (`rating_1` to `rating_6`), ratings outside the
0 to 5 range, missing regulations, missing pros or cons, missing short
description, missing trading platforms, and missing deposit or withdrawal
methods.

***

## Coding agents and developer tools

Tools such as Claude Code, Codex or Cursor don't need the chat-app sign-in, so
"Enable Abilities for MCP" isn't required. You still turn on the abilities in
**FXT Options → AI & Abilities**.

### MCP over HTTP

Needs the "MCP Adapter" plugin and a WordPress
[Application Password](https://wordpress.org/documentation/article/application-passwords/)
(**Users → Profile**). The `@automattic/mcp-wordpress-remote` proxy connects
to the endpoint. For Claude Code:

```bash
claude mcp add wordpress \
  --env WP_API_URL=https://example.com/wp-json/mcp/mcp-adapter-default-server \
  --env WP_API_USERNAME=your-user \
  --env WP_API_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
  -- npx -y @automattic/mcp-wordpress-remote@latest
```

### MCP over WP-CLI

On a local site, or over SSH, you can skip HTTP and run the MCP server through
WP-CLI (STDIO):

```bash
wp mcp-adapter list
wp mcp-adapter serve --server=mcp-adapter-default-server --user=admin
```

### WordPress REST API

Abilities with REST enabled are also listed by WordPress itself at
`/wp-json/wp-abilities/v1/abilities`. FXT's abilities are in the `fxt`
category.

***

## AI writing helpers in the editor

The official WordPress AI plugin adds writing helpers inside the Block Editor,
such as titles, excerpts and alt text. It works alongside FXT and is a
different thing from managing your website from a chat assistant.
