Skip to content

Use XFtoWP with AI tools

On WordPress 6.9 and later, XFtoWP adds abilities to the WordPress Abilities API. An AI tool connected to your WordPress site can then answer questions about your forum, the posts connected to its threads, and the people linked to forum accounts. For example: “Summarize the forum discussion on my latest post”, “Which articles get the most forum replies?” or “Why isn’t XFtoWP syncing?”

Every ability only reads. None of them change anything on WordPress or the forum, and none contact the forum. Answers come from data XFtoWP already saved.

Before you start

  • WordPress 6.9 or later. On older versions XFtoWP works as before and adds no abilities.
  • XFtoWP 1.7.2 or later, connected to your forum.
  • A way for the AI tool to reach WordPress: the MCP Adapter plugin, or the REST API with an application password (see below).

Forum stats, forums and threads are as of the last refresh. Last sync on XenForo → Settings shows when that was. Click Refresh data for newer data, or change how often it refreshes with Refresh time under Comments.

Refresh data and the Last sync time on XenForo → Settings

What each ability can see

AI tools act as a WordPress user, so they get that user’s permissions. A user who can’t edit a post won’t see it through any ability.

AbilityAnswersWho can use it
xftowp/get-forum-statsThread, message and member totals, newest member, who’s onlineUsers who can write posts
xftowp/list-forumsThe forums chosen in settings, with message counts and their latest threadUsers who can write posts
xftowp/list-latest-threadsThe newest threads with reply and view countsUsers who can write posts
xftowp/list-featured-threadsThe threads featured in Forum widgetsUsers who can write posts
xftowp/get-post-threadA post’s thread, its reply count, any thread error, and the replies shown on the post as plain textUsers who can edit that post
xftowp/find-post-for-threadThe post a thread is connected to, from a thread ID or URLUsers who can write posts
xftowp/list-connected-postsPosts with threads, newest first or by most repliesUsers who can write posts
xftowp/list-unconnected-postsPublished posts that have no thread yetUsers who can write posts
xftowp/list-thread-problemsPosts whose thread failed, or that visitors can no longer readUsers who can write posts
xftowp/get-user-forum-accountA user’s linked forum accounts, groups and the account their threads post asAny logged-in user for their own accounts; admins for anyone
xftowp/find-user-by-forum-accountThe WordPress user linked to a forum user ID or usernameUsers who can list users
xftowp/list-post-as-accountsAuthors and the forum account their threads post asUsers who can list users
xftowp/get-member-overviewOne person for support: accounts, purchase groups, posts with threads, emailAdministrators
xftowp/list-unlinked-membersCustomers whose purchases give forum groups but who have no forum account, with emailsAdministrators
xftowp/audit-user-groupsLinked users whose purchase groups don’t match what they’ve paid forAdministrators
xftowp/get-connection-statusHow XFtoWP is connected: missing API permissions, features, integrations, last refreshAdministrators
xftowp/list-recent-logsThe newest thread connections, user connections or webhooks receivedAdministrators

“Users who can write posts” means contributors and above. “Users who can list users” means administrators by default.

The API key and webhook secrets are never included in any answer.

Things to know about the answers

  • Replies: xftowp/get-post-thread returns the replies shown on the post, which is the first page of the thread, not the whole thread.
  • Most replies: xftowp/list-connected-posts ranks the newest 1,000 connected posts when ordering by replies, and says so in its answer.
  • Purchases: the three purchase abilities read purchases from WooCommerce, MemberPress, SureCart and DigiMember. They need forum groups set for purchases. If a store can’t be checked, that person shows as *unavailable* instead of being reported as no longer paying.
  • Recorded groups: the group audit compares purchases with the groups XFtoWP recorded on each member’s main forum account. Groups given on the forum directly aren’t part of the comparison.
  • Long lists: abilities that look through users or posts check 500 per call. When there’s more, the answer includes next_offset. Pass it as offset to continue.

Connect an AI tool with the MCP Adapter

The MCP Adapter plugin, made by the WordPress team, makes WordPress abilities available to AI tools that support MCP (Model Context Protocol). XFtoWP’s abilities are marked public, so the adapter offers them alongside the abilities of WordPress and your other plugins.

WordPress doesn’t include the MCP Adapter yet, so for now install it as a plugin. It’s expected to become part of WordPress in a future version.

Install the MCP Adapter on your WordPress site and connect your AI app by following the adapter’s own instructions. Setup differs between AI apps, so the adapter’s documentation is the place to follow. Once it’s connected, XFtoWP’s abilities are listed next to the abilities of WordPress and your other plugins. Nothing needs to be turned on in XFtoWP.

Connect it as a WordPress user with only the permissions you want the AI tool to have. An editor account is enough for the forum and post abilities. Only use an administrator account if you want the tool to see members’ emails and purchase groups.

Call an ability over the REST API

Abilities can also be called directly, for scripts or tools without MCP. Authenticate as a WordPress user with an application password (Users → Profile → Application Passwords).

List XFtoWP’s abilities:

GET /wp-json/wp-abilities/v1/abilities?category=xftowp

Run one. Read-only abilities use GET, with input as query parameters:

GET /wp-json/wp-abilities/v1/abilities/xftowp/get-post-thread/run?input[post_id]=123

A successful call returns JSON. Errors use the usual status codes:

  • 400: invalid input.
  • 401: not logged in.
  • 403: the user doesn’t have permission.
  • 404: nothing found.

Before you connect an AI tool

  • Customer data leaves your site. The administrator abilities return names and email addresses. Whatever an AI tool reads is sent to that tool’s provider. Use a non-admin account if that isn’t acceptable for your members.
  • Forum replies are written by your members. When an AI tool reads replies with xftowp/get-post-thread, treat that text as untrusted, especially if the same tool can also make changes on your site through other plugins.
  • These abilities can’t change anything. To change accounts or threads in bulk, use Bulk actions or the WP-CLI commands.

Alex Mangini

Hi, I’m Alex! I started writing about web design and blogging at 13 years old, which turned into client work, which led to building my own software. 15 years later I’m still at it, and XFtoWP is the plugin I always wanted to connect my two favorite software together.

Get sneak peaks, release note, success stories, and other interesting WordPress and XenForo content sent to your inbox.

Unsubscribe anytime.