A minimal WordPress plugin used to exercise the Abilities API and the WordPress MCP adapter. It registers a sample ability (my-plugin/get-site-info) and then calls it from an editor-side script.
- Registers a category
site-information. - Registers an ability
my-plugin/get-site-infowith an empty input schema and a simple object output (name,description,url). Seeplugin.php. - Enqueues
index.jsin the block editor, which:- Lists available abilities via
wp.abilities.getAbilities() - Executes
my-plugin/get-site-infoviawp.abilities.executeAbility()
- Lists available abilities via
- WordPress site.
- The Abilities API plugin installed/activated (and its
wp-abilitiesscript handle registered).- Clone https://github.com/WordPress/abilities-api under
pluginsfolder - Run
composer install - Run
npm installandnpm run build
- Clone https://github.com/WordPress/abilities-api under
- The MCP Adapter plugin installed/activated (exposes abilities as MCP tools).
- Clone https://github.com/WordPress/mcp-adapter under
pluginsfolder - Run
composer install
- Clone https://github.com/WordPress/mcp-adapter under
Cursor MCP client configuration (/Users/juanmanuelgarrido/.cursor/mcp.json):
{
"mcpServers": {
"wordpress": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote"],
"env": {
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
"WP_API_URL": "http://getting-started-block-development.local/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "admin",
"WP_API_PASSWORD": "CXLe 7z03 kgyW CR9D DOhf kvYG",
"LOG_FILE": "/Users/juanmanuelgarrido/Local Sites/getting-started-block-development/app/public/wp-content/mcp-debug.log"
}
},
}
}- Activate this plugin along with Abilities API and MCP Adapter.
- Open the admin; check the browser console. You should see logs from
index.js:- The number of abilities
- Each ability’s name/description
- The output of
my-plugin/get-site-info(site name, description, URL)
plugin.php: registers the category and ability; enqueues script.index.js: logs abilities and executes the sample ability.