Documentation / Abilities API and MCP
Abilities API and MCP
Overview
WordPress’s Abilities API lets a plugin publish structured, permission-checked operations that other software can discover and call. Teydea Login Security publishes its password policies through this API, under the “Password Policy” category, so an AI assistant connected through the Model Context Protocol (MCP) — or any other Abilities API consumer — can list, inspect, and manage policies the same way an administrator would from the settings page.
This requires WordPress 6.9 or later, which introduced the Abilities API. Reaching the abilities from an AI assistant also requires the mcp-adapter plugin, which bridges registered abilities to MCP; without it the abilities are registered but nothing exposes them over the protocol.
What an Assistant Can Do
- List every password policy and its configuration.
- Look up a single policy.
- Create a new policy. The free plugin allows only one policy. (PRO) PRO allows any number.
- Update an existing policy’s settings.
- Delete a policy.
- List the recent changes to the plugin settings: who made each one, whether it came from the settings page, the REST API or an ability such as an assistant’s, when, and which policies and settings it added, removed or changed. The list names what changed and never shows setting values, apart from the names of the policies.
- Restore the settings as they were at one of those changes, for example to bring back a policy that was deleted by mistake, with its rules and its role and user targeting.
(PRO) For example, an administrator on a site with mcp-adapter installed can ask a connected assistant to “create a policy for WooCommerce customers with a 12-character minimum and password reuse prevention,” and the assistant carries out the whole request through these abilities.
The abilities can enable or disable reuse prevention for a policy, but they cannot change how many recent passwords are stored. Set that plugin-wide limit separately on the Checks tab, under Password reuse → Recent passwords kept per person; the default is 24 passwords per user.
Every setting an ability can read or write — including PRO-only rules like breach screening and reuse prevention, and PRO’s per-role and per-user targeting — is published with a title and a description, so an assistant can present or reason about each one without a person explaining it first.
Settings History
The plugin keeps the last few saved versions of its settings, and every save adds one, whether an administrator made it on the settings page or an assistant made it through an ability. Restoring an earlier version is itself a save: it is checked like any other change, and the version it replaces stays in the history, so a restore can be undone by restoring again. When someone else saves the settings while a restore is in progress, the restore is refused instead of overwriting that save, and it can be tried again. An administrator can see the same history, and restore any version in it, with the History button on the settings page.
Permissions
An assistant can only use these abilities as the WordPress user it is authenticated as, and that user needs the same permissions as accessing the plugin’s own settings page. A user who cannot open Settings → Login Security cannot list, read, or change policies, or list or restore the settings history, through the Abilities API either.