You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/Tools/McpRestApiCrud.php
+64-44Lines changed: 64 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -45,18 +45,18 @@ public function register_tools(): void {
45
45
46
46
newRegisterMcpTool(
47
47
array(
48
-
'name' => 'list_wordpress_rest_api_endpoints',
49
-
'description' => 'List all available WordPress REST API endpoints and their supported HTTP methods. Use this first to discover what API endpoints are available before making specific calls.',
50
-
'type' => 'read',
51
-
'inputSchema' => array(
48
+
'name'=> 'list_api_functions',
49
+
'description'=> 'List all available WordPress REST API endpoints that support CRUD operations (Create, Read, Update, Delete). Use this first to discover what API functions are available before inspecting or calling them.',
'description' => 'Get the complete schema and documentation for a specific WordPress REST API endpoint and HTTP method. Use this to understand what parameters are required and available for an endpoint before making calls.',
70
-
'type' => 'read',
71
-
'inputSchema' => array(
68
+
'name'=> 'get_function_details',
69
+
'description'=> 'Get detailed metadata for a specific WordPress REST API endpoint and HTTP method. Includes available parameters, required fields, authentication needs, and expected response structure. Use this to get the details of a specific function before calling it.',
70
+
'type'=> 'read',
71
+
'inputSchema'=> array(
72
72
'type' => 'object',
73
73
'properties' => array(
74
-
'route' => array(
75
-
'type' => 'string',
76
-
'description' => 'The REST API route (e.g., "/wp/v2/posts", "/wp/v2/users")'
74
+
'route' => array(
75
+
'type'=> 'string',
76
+
'description' => 'The REST API route (e.g., "/wp/v2/posts", "/wp/v2/users")',
'description' => 'The HTTP method to retrieve metadata for',
82
82
),
83
83
),
84
84
'required' => array( 'route', 'method' ),
85
85
),
86
-
'callback' => array( $this, 'get_tool_details' ),
87
-
'permission_callback' => '__return_true',
88
-
'annotations' => array(
89
-
'title' => 'Get Endpoint Schema',
86
+
'callback'=> array( $this, 'get_tool_details' ),
87
+
'permission_callback' => '__return_true',
88
+
'annotations'=> array(
89
+
'title' => 'Get Function Details',
90
90
'readOnlyHint' => true,
91
91
'openWorldHint' => false,
92
92
),
@@ -95,32 +95,32 @@ public function register_tools(): void {
95
95
96
96
newRegisterMcpTool(
97
97
array(
98
-
'name' => 'call_wordpress_rest_api',
99
-
'description' => 'Make a direct call to any WordPress REST API endpoint. Supports GET (read), POST (create), PATCH (update), and DELETE operations. Use this to interact with WordPress content like posts, pages, users, etc.',
100
-
'type' => 'action',
101
-
'inputSchema' => array(
98
+
'name'=> 'run_api_function',
99
+
'description'=> 'Execute a specific WordPress REST API function by providing the endpoint route, HTTP method, and any required parameters or request body. Supports standard CRUD operations: GET (read), POST (create), PATCH (update), DELETE (remove).',
100
+
'type'=> 'action',
101
+
'inputSchema'=> array(
102
102
'type' => 'object',
103
103
'properties' => array(
104
-
'route' => array(
105
-
'type' => 'string',
106
-
'description' => 'The REST API route (e.g., "/wp/v2/posts", "/wp/v2/users/123")'
104
+
'route' => array(
105
+
'type'=> 'string',
106
+
'description' => 'The REST API route (e.g., "/wp/v2/posts", "/wp/v2/users/123")',
Copy file name to clipboardExpand all lines: package.json
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "wordpress-mcp",
3
-
"version": "0.2.1",
3
+
"version": "0.2.2",
4
4
"description": "A plugin to integrate WordPress with Model Context Protocol (MCP), providing AI-accessible interfaces to WordPress data and functionality through standardized tools, resources, and prompts. Enables AI assistants to interact with posts, users, site settings, and WooCommerce data.",
Copy file name to clipboardExpand all lines: wordpress-mcp.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
/**
3
3
* Plugin name: WordPress MCP
4
4
* Description: A plugin to integrate WordPress with Model Context Protocol (MCP), providing AI-accessible interfaces to WordPress data and functionality through standardized tools, resources, and prompts. Enables AI assistants to interact with posts, users, site settings, and WooCommerce data.
0 commit comments