With WordPress 7.0, the platform is reaching a decisive milestone: it is now natively compatible with AI agents. Three technical components form this new architecture: the Abilities API, the MCP adapter, and the AI Client SDK.
For developers and agency lead techs, now is the time to explore these tools before they become essential for all client projects.
Here is a complete technical guide, including real PHP code and a tutorial for creating your first WordPress MCP server.
The Abilities API: A Central Registry for All Features
The Abilities API is the technical foundation of this evolution. Introduced experimentally in WordPress 6.9, it is now part of the core in version 7.0. The idea? To create a unified registry where every feature (called an “ability”) is declared in a standardized way.
Each ability includes:
- A unique identifier (namespace/name)
- A readable label and description
- JSON Schemas to validate inputs and outputs
- An execution callback
- A permission callback
The Abilities API transforms WordPress into a composable platform: each feature becomes discoverable, reusable, and secure by default.
No more scattered custom REST endpoints in your plugins. No more fragmented hooks that are hard to maintain. The API centralizes everything and automatically handles data validation and access control.
Register Your First Ability
Here is how to declare an ability to renew a customer subscription:
add_action( 'wp_abilities_api_init', 'register_my_abilities' );
function register_my_abilities(): void {
wp_register_ability(
'my-plugin/renew-subscription',
array(
'label' => __( 'Renew Subscription', 'my-plugin' ),
'description' => __( 'Renews a subscription for a provided customer.', 'my-plugin' ),
'input_schema' => array(
'type' => 'object',
'properties' => array(
'customer_id' => array(
'type' => 'integer',
'description' => 'The customer ID'
),
'plan' => array(
'type' => 'string',
'enum' => array( 'monthly', 'yearly' )
)
),
'required' => array( 'customer_id', 'plan' )
),
'output_schema' => array(
'type' => 'object',
'properties' => array(
'success' => array( 'type' => 'boolean' ),
'subscription_id' => array( 'type' => 'integer' ),
'expires_at' => array( 'type' => 'string', 'format' => 'date-time' )
)
),
'execute_callback' => 'handle_subscription_renewal',
'permission_callback' => 'can_manage_subscriptions'
)
);
}
function handle_subscription_renewal( array $input ): array {
// Business logic here
$subscription = renew_customer_subscription( $input['customer_id'], $input['plan'] );
return array(
'success' => true,
'subscription_id' => $subscription->id,
'expires_at' => $subscription->expires_at
);
}
function can_manage_subscriptions(): bool {
return current_user_can( 'manage_woocommerce' );
}
Once registered, you can retrieve and execute the ability easily:
$ability = wp_get_ability( 'my-plugin/renew-subscription' );
if ( $ability ) {
$result = $ability->execute( array(
'customer_id' => 42,
'plan' => 'yearly'
) );
if ( $result['success'] ) {
// Handle result
}
}
Input validation following the JSON Schema and permission checks are handled automatically. If the schema isn’t respected or the user lacks permission, the execution will fail gracefully.
The MCP Adapter: WordPress Becomes a Server for AI Agents
The Model Context Protocol (MCP), developed by Anthropic and documented on modelcontextprotocol.io, defines an interoperability standard between apps and AI models. The WordPress MCP adapter automatically translates your abilities into MCP “tools.”
In practice, an agent like Claude can:
- Discover all abilities exposed by your WordPress site
- Understand required parameters thanks to JSON Schemas
- Execute actions with appropriate permissions
- Chain several abilities in complex workflows
Key point: With the MCP adapter, your WordPress site can be controlled by external AI agents. A Claude assistant can create posts, manage WooCommerce orders, or change settings—all via standardized and secure calls.
Tutorial: Create Your First WordPress MCP Server
The WordPress/mcp-adapter repo on GitHub has everything you need. Here’s how to install and use it:
Step 1: Install via Composer
composer require wordpress/mcp-adapter
Step 2: Activate the adapter
add_action( 'plugins_loaded', function() {
if ( class_exists( 'WordPressMCPAdapter' ) ) {
$adapter = new WordPressMCPAdapter();
$adapter->init();
}
} );
Step 3: Set up authentication
The adapter uses WordPress Application Passwords to authenticate incoming MCP requests. Create an application password for the AI agent:
// In the WordPress user profile:
// Users > [Your user] > Application Passwords
// Name: "Claude Agent"
// Copy the generated password
// The agent will use these credentials in the Authorization header:
// Authorization: Basic base64(username:application_password)
Step 4: Expose specific abilities
add_filter( 'mcp_exposed_abilities', function( $abilities ) {
// Expose only certain abilities via MCP
return array_filter( $abilities, function( $ability_id ) {
$allowed = array(
'my-plugin/renew-subscription',
'my-plugin/get-customer-info',
'my-plugin/create-support-ticket'
);
return in_array( $ability_id, $allowed, true );
}, ARRAY_FILTER_USE_KEY );
} );
Step 5: Test with an MCP client
Use the provided CLI tool or configure Claude Desktop to connect to your WordPress MCP server. The default endpoint is /wp-json/mcp/v1/.
Practical Use Case: WooCommerce + MCP
The WooCommerce MCP documentation details how to expose e-commerce actions. An AI agent can then:
- Check real-time stock
- Create or update orders
- Handle refunds
- Answer customer questions with access to their account data
For agencies managing WooCommerce stores, this integration opens the door to truly autonomous support chatbots. No need for custom integrations anymore: the agent accesses data via standardized abilities.
AI Client SDK: The Client-Side Bridge
The AI Client SDK completes the architecture by providing a unified interface in both PHP and JavaScript. In WordPress 7.0, the JavaScript package is natively integrated with Gutenberg.
JavaScript Usage in the Editor
import { executeAbility } from '@wordpress/abilities';
async function translateBlockContent( blockId, targetLanguage ) {
const block = wp.data.select( 'core/block-editor' ).getBlock( blockId );
const result = await executeAbility( 'my-plugin/translate-content', {
text: block.attributes.content,
source_language: 'fr',
target_language: targetLanguage
} );
if ( result.success ) {
wp.data.dispatch( 'core/block-editor' ).updateBlockAttributes( blockId, {
content: result.translated_text
} );
}
return result;
}
This code lets you add a “Translate” button to a block’s toolbar. The ability manages connecting to the AI provider (OpenAI, Anthropic, or others) seamlessly.
PHP Usage for Backend Tasks
use WordPressAIClient;
function generate_product_description( int $product_id ): string {
$product = wc_get_product( $product_id );
$client = new Client();
$result = $client->execute_ability( 'core/generate-text', array(
'prompt' => sprintf(
'Génère une description SEO de 150 mots pour : %s',
$product->get_name()
),
'max_tokens' => 200,
'provider' => 'openai' // Configurable in WP options
) );
return $result['text'] ?? '';
}
The benefit? Your code stays provider-agnostic. If your client wants to switch from OpenAI to Claude tomorrow, just update the config—no code needs to be rewritten.
Feature Maturity Table
Where do these three pillars stand in WordPress 7.0? Here’s an overview:
| Component | WP 7.0 Status | API Stability | Production Ready |
|---|---|---|---|
| Abilities API | Native core | Stable | Yes |
| MCP Adapter | Plugin → core integration in progress | Beta | With caution |
| AI Client SDK (JS) | Native Gutenberg package | Stable | Yes |
| AI Client SDK (PHP) | Composer package | Release Candidate | Pilot projects |
| Integrated AI providers | OpenAI, Anthropic | Stable | Yes |
The Abilities API and the JavaScript SDK are mature enough for production deployment. The MCP adapter is suitable for experimental projects or enterprise intranets where you control the environment.
Best Practices for Agencies
Your technical team should prepare now. A few recommendations based on real-world feedback:
1. Create reusable abilities
Instead of hard-coding features, encapsulate them in abilities. A lead management system developed for one client becomes instantly reusable—and potentially accessible to AI agents.
2. Think in schemas from the start
JSON Schemas are not optional. A well-defined schema ensures valid incoming data, automatically documents the API, and lets AI agents understand how to use your abilities.
3. Granular permissions
Never expose an ability without a permission_callback. Create dedicated WordPress capabilities to finely control who (human or agent) can execute what. If you work on e-commerce sites, multi-agent logic especially requires careful attention to access rights.
4. Logs and audit trails
Each execution of an ability via MCP should be logged. If a problem occurs, you must be able to trace which action was triggered, by which agent, with which parameters.
A well-designed ability is self-documenting through its JSON schemas: it’s self-documenting code by design.
Outlook: Toward Autonomous WordPress Sites
These three components lay the groundwork for a profound transformation. Imagine an e-commerce site where an AI agent:
- Analyzes sales trends via reporting abilities
- Automatically adjusts prices according to demand
- Generates SEO-optimized product descriptions
- Responds to support tickets with access to customer context
This is no longer science fiction. Recent advances in AI model APIs combined with this WordPress infrastructure make these scenarios possible today.
The WordPress Developer Blog (make.wordpress.org/ai) regularly publishes updates on the progress of the core merge. Follow the AI Contributor Meetings to stay up-to-date with new developments.
WordPress 7.0 with PHP 8.3 recommended also brings performance improvements that benefit ability execution. The speed gain on JSON Schema validation reaches 15-20% compared to PHP 8.1.
FAQ
Does the Abilities API replace the WordPress REST API?
No, it complements it. The REST API remains the standard for typical CRUD operations. The Abilities API targets complex, composable actions, especially those to be consumed by AI agents or automated workflows.
Do we need to update all our plugins for WordPress 7.0?
Not immediately. Existing plugins will continue to work. Adopting the Abilities API is optional but recommended for new features, especially if you’re planning AI integrations.
Is the MCP adapter secure for a production site?
Yes, provided you configure authentication through Application Passwords correctly and limit the abilities that are exposed. Avoid exposing sensitive abilities (data deletion, configuration changes) without strict controls.
Which AI provider is recommended with the AI Client SDK?
OpenAI and Anthropic are officially supported. The choice depends on your needs: GPT-4 excels at generating long text, Claude is great for document analysis. The SDK lets you switch providers without changing your application code.
How do I debug an ability that won’t execute?
First, check the permission_callback—this is the most common cause. Then, enable WP_DEBUG and check the logs. The Abilities API logs schema validation errors in debug.log.
Can I use the Abilities API without any AI integration?
Absolutely. The API is useful even without AI: it structures your code, makes sharing between plugins easier, and automatically documents your features. AI is a bonus, not a prerequisite.
What’s the difference between an ability and a WordPress hook?
A hook is an extension point for modifying existing behavior. An ability is an autonomous functional unit, with defined inputs/outputs, automatic validation, and built-in access control. Abilities are discoverable and are documented by design.
Does the MCP adapter work with AI models other than Claude?
Yes. MCP is an open standard. Any compatible MCP client can interact with your WordPress server—including custom agents built with LangChain, AutoGen, or other frameworks.
How do I migrate existing REST endpoints to abilities?
Identify endpoints that encapsulate complex business logic. Move this logic into an ability, then have the REST endpoint call the ability. This maintains backward compatibility while benefiting from the abilities architecture.
Is WordPress 7.0 compatible with standard shared hosting?
Yes, for basic features. The MCP adapter requires PHP 8.2+ and WebSocket or SSE connections depending on your setup—check with your host. Managed WordPress hosting (Kinsta, WP Engine) generally supports these requirements.
Related Articles
Claude Opus 4.6: The new revolutionary AI model for finance and legal
February 5, 2026, will remain a milestone date for tech teams at major corporations. Anthropic unveiled Claude Opus 4.6, its new flagship model, with a bold promise: to transform how…
AI accelerates: Is humanity in danger?
Between Planned Obsolescence of Human Labor and the Search for a New Social Contract We are living through a pivotal moment in human history. Artificial intelligence is no longer content…