1. Overview
WordPress plugin work is 80% repetition. MCP-aware agents get great at the repetition.
2. Development pipeline
- 1
Brief
- 2
Scaffold
- 3
Hook gen
- 4
Refactor
- 5
Test
3. Scaffold a plugin
plugin.php php
<?php
/**
* Plugin Name: My MCP Plugin
* Version: 0.1.0
*/
add_action('init', function () {
register_post_type('mcp_log', ['public'=>false,'show_ui'=>true]);
}); 4. Hooks & filters
Expose wp.hooks.search as an MCP resource. The agent finds the right hook by name, signature, and example usage — no more guessing.
5. Tests & refactors
tests/PluginTest.php php
<?php
class PluginTest extends WP_UnitTestCase {
public function test_cpt_registered() {
$this->assertTrue(post_type_exists('mcp_log'));
}
}