@adsim/wordpress-mcp-server 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,14 +3,14 @@
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
4
  [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-green.svg)](https://nodejs.org/)
5
5
  [![MCP SDK](https://img.shields.io/badge/MCP-SDK-blue.svg)](https://github.com/anthropics/mcp)
6
- [![Tests](https://img.shields.io/badge/tests-674%20passing-brightgreen.svg)](https://github.com/GeorgesAdSim/wordpress-mcp-server/actions)
6
+ [![Tests](https://img.shields.io/badge/tests-767%20passing-brightgreen.svg)](https://github.com/GeorgesAdSim/wordpress-mcp-server/actions)
7
7
  [![npm](https://img.shields.io/npm/v/@adsim/wordpress-mcp-server.svg)](https://www.npmjs.com/package/@adsim/wordpress-mcp-server)
8
8
 
9
9
  **Enterprise Governance · Audit Trail · Multi-Site · Plugin-Free**
10
10
 
11
11
  The enterprise governance layer for Claude-to-WordPress integrations — secure, auditable, and multi-site.
12
12
 
13
- **v4.5.0 Enterprise** · 85 tools · 674 Vitest tests · GitHub Actions CI · HTTP Streamable transport · MCPB bundle · SEO metadata · SEO audit suite · Content intelligence · Plugin intelligence · Plugin & theme management · Revision control · Editorial approval workflow · Destructive confirmation · Internal link analysis · WooCommerce (read + intelligence + write) · Execution controls · JSON audit trail · Multi-site targeting
13
+ **v4.6.0 Enterprise** · 92 tools · 767 Vitest tests · GitHub Actions CI · HTTP Streamable transport · MCPB bundle · SEO metadata · SEO audit suite · Content intelligence · Plugin intelligence · Plugin layer (ACF, Elementor) · Plugin & theme management · Revision control · Editorial approval workflow · Destructive confirmation · Internal link analysis · WooCommerce (read + intelligence + write) · Execution controls · JSON audit trail · Multi-site targeting
14
14
 
15
15
  ---
16
16
 
@@ -174,7 +174,7 @@ npx -y @adsim/wordpress-mcp-server
174
174
  ### Health check
175
175
  ```bash
176
176
  curl http://localhost:3000/health
177
- # → { "status": "ok", "version": "4.4.0", "transport": "http" }
177
+ # → { "status": "ok", "version": "4.6.0", "transport": "http" }
178
178
  ```
179
179
 
180
180
  ### Connect an MCP client via HTTP
@@ -214,7 +214,7 @@ Double-click `wordpress-mcp-server.mcpb` — Claude Desktop will prompt for:
214
214
 
215
215
  ---
216
216
 
217
- ## Available Tools (79)
217
+ ## Available Tools (92)
218
218
 
219
219
  ### Content Management
220
220
 
@@ -311,6 +311,33 @@ All SEO audit tools are read-only and always allowed regardless of governance fl
311
311
 
312
312
  All Content Intelligence tools are read-only and always allowed regardless of governance flags.
313
313
 
314
+ ### Plugin Intelligence Layer
315
+
316
+ > New in v4.6.0 — Extensible adapter architecture for third-party WordPress plugins. Adapters activate only when the plugin is detected via REST API namespace discovery.
317
+
318
+ Disable all plugin tools: `WP_DISABLE_PLUGIN_LAYERS=true`
319
+
320
+ **ACF (Advanced Custom Fields)**
321
+
322
+ | Tool | Description |
323
+ |---|---|
324
+ | `acf_get_fields` | Get ACF custom fields for a post/page with key filtering and raw/compact/summary modes |
325
+ | `acf_list_field_groups` | List all configured ACF field groups |
326
+ | `acf_get_field_group` | Get full detail of an ACF field group by ID |
327
+ | `acf_update_fields` | Update ACF custom fields for a post/page. Write — blocked by `WP_READ_ONLY` |
328
+
329
+ Requires ACF Pro or ACF Free with REST API enabled (`/acf/v3` namespace).
330
+
331
+ **Elementor**
332
+
333
+ | Tool | Description |
334
+ |---|---|
335
+ | `elementor_list_templates` | List Elementor templates (page, section, block, popup) with type filtering |
336
+ | `elementor_get_template` | Get full Elementor template content and elements. Context-guarded at 50k chars |
337
+ | `elementor_get_page_data` | Get Elementor editor data for a post/page: widgets used, elements count |
338
+
339
+ Requires Elementor Free or Pro (`/elementor/v1` namespace).
340
+
314
341
  ### Plugins
315
342
 
316
343
  | Tool | Description |
@@ -387,7 +414,7 @@ All WooCommerce write tools are blocked by `WP_READ_ONLY`. `wc_price_guardrail`
387
414
  | Tool | Description |
388
415
  |---|---|
389
416
  | `wp_set_target` | Switch active WordPress site in multi-target mode |
390
- | `wp_site_info` | Site info, current user, post types, enterprise controls, and available targets |
417
+ | `wp_site_info` | Site info, current user, post types, enterprise controls, available targets, and `plugin_layer` (detected plugins, tools count) |
391
418
 
392
419
  ---
393
420
 
@@ -716,7 +743,7 @@ WC_PRICE_GUARDRAIL_THRESHOLD=20 # percentage — changes above this require ex
716
743
 
717
744
  ## Testing
718
745
 
719
- 674 unit tests covering all 85 tools — zero network calls, fully mocked.
746
+ 767 unit tests covering all 92 tools — zero network calls, fully mocked.
720
747
  ```bash
721
748
  npm test # run all tests (vitest)
722
749
  npm run test:watch # watch mode
@@ -756,7 +783,17 @@ npm run test:coverage # coverage report
756
783
  | `transport/http.test.js` | HTTP transport, Bearer auth, sessions | 10 |
757
784
  | `pluginDetector.test.js` | SEO plugin detection, rendered head, HTML head parsing | 13 |
758
785
  | `pluginIntelligence.test.js` | 6 plugin intelligence tools: rendered head, rendered SEO audit, pillar content, schema plugins, SEO score, Twitter meta | 48 |
759
- | `dxt/manifest.test.js` | MCPB manifest validation, 85 tools declared | 10 |
786
+ | `dxt/manifest.test.js` | MCPB manifest validation, 86 tools declared | 10 |
787
+ | `dynamicFiltering.test.js` | WooCommerce/editorial/plugin-intelligence filtering, combined counts, callable when filtered | 9 |
788
+ | `outputCompression.test.js` | mode=full/summary/ids_only for 10 listing tools (pages, media, comments, categories, tags, users, custom posts, plugins, themes, revisions) | 30 |
789
+ | `siteOptions.test.js` | wp_get_site_options: all options, key filtering, 403, audit log, not blocked by WP_READ_ONLY | 5 |
790
+ | `plugins/registry.test.js` | PluginRegistry: ACF/Elementor detection, empty namespaces, WP_DISABLE_PLUGIN_LAYERS, getSummary | 6 |
791
+ | `plugins/contextGuard.test.js` | applyContextGuard: under threshold, truncation, raw bypass, stderr log | 4 |
792
+ | `plugins/iPluginAdapter.test.js` | validateAdapter: complete adapter, missing id, missing getTools | 3 |
793
+ | `plugins/acf/acfAdapter.test.js` | ACF read tools: get fields, filter, contextGuard, 404, list groups, get group, audit log | 10 |
794
+ | `plugins/acf/acfAdapter.write.test.js` | ACF write: update fields, WP_READ_ONLY blocking, validation, 404/403, audit log | 8 |
795
+ | `plugins/elementor/elementorAdapter.test.js` | Elementor adapter: list/get templates, page data, contextGuard, validation, namespace detection, audit log | 10 |
796
+ | `pluginLayer.test.js` | Plugin Layer integration: listTools, callTool routing, wp_site_info, WP_DISABLE_PLUGIN_LAYERS, no collisions | 8 |
760
797
 
761
798
  Each test verifies: success response shape, governance blocking (write tools), HTTP error handling (403/404), and audit log entries.
762
799
 
@@ -853,7 +890,7 @@ The server performs a health check on startup: REST API connectivity, user authe
853
890
  - Credentials never logged — audit trail sanitizes all sensitive data
854
891
  - No credentials in code — `.env` or environment variables only
855
892
  - Instant revocation — Application Passwords can be revoked from WordPress admin
856
- - Traceable requests — custom `User-Agent: WordPress-MCP-Server/4.4.0`
893
+ - Traceable requests — custom `User-Agent: WordPress-MCP-Server/4.6.0`
857
894
  - Bearer token auth in HTTP mode — timing-safe comparison, no token in logs
858
895
  - Origin validation in HTTP mode — anti-DNS-rebinding protection
859
896
 
@@ -926,6 +963,50 @@ npx @modelcontextprotocol/inspector node index.js
926
963
 
927
964
  ## Changelog
928
965
 
966
+ ### v4.6.0 (2026-02-22) — Plugin Intelligence Layer
967
+
968
+ Extensible adapter architecture for third-party WordPress plugins. Adapters activate only when their plugin is detected via REST API namespace discovery — zero overhead when plugins are absent.
969
+
970
+ **Architecture:**
971
+ - `src/plugins/registry.js` — PluginRegistry with automatic plugin detection via REST namespaces. `WP_DISABLE_PLUGIN_LAYERS=true` disables all plugin tools
972
+ - `src/plugins/contextGuard.js` — LLM context overflow protection: automatic truncation at 50k chars with truncation metadata
973
+ - `src/plugins/IPluginAdapter.js` — Adapter contract interface: id, namespace, riskLevel, contextConfig, getTools, handleTool
974
+ - `wp_site_info` now reports `plugin_layer` (detected plugins, available tools count)
975
+
976
+ **ACF Adapter:**
977
+ - `acf_get_fields` — ACF custom fields with key filtering, raw/compact/summary modes
978
+ - `acf_list_field_groups` — all configured field groups
979
+ - `acf_get_field_group` — field group detail by ID
980
+ - `acf_update_fields` — update custom fields. Blocked by `WP_READ_ONLY`. riskLevel: "medium"
981
+
982
+ **Elementor Adapter (read-only):**
983
+ - `elementor_list_templates` — templates with type filter (page/section/block/popup)
984
+ - `elementor_get_template` — full template content, context-guarded at 50k chars
985
+ - `elementor_get_page_data` — widgets used, elements count, Elementor status per post
986
+
987
+ 767 Vitest unit tests · 92 tools
988
+
989
+ ### v4.5.1 (2026-02-21) — Context Optimization
990
+
991
+ LLM context reduction across all 85 tools — zero breaking changes.
992
+
993
+ **Dynamic filtering:**
994
+ - `getFilteredTools()` hides WooCommerce (13), editorial (3), and plugin intelligence (6) tools when their env vars are absent
995
+ - `listTools` returns only exposed tools; `callTool` still handles all 85
996
+ - `wp_site_info` now reports `tools_total`, `tools_exposed`, `filtered_out`
997
+
998
+ **LLM-optimized descriptions:**
999
+ - All 85 tool descriptions rewritten: `"Use when [TRIGGER]. [ACTION]. [Read-only | Write — blocked by X]. [Hint: optional]"`
1000
+
1001
+ **Schema compact:**
1002
+ - Redundant `description` fields removed from `inputSchema` properties (id, per_page, page, status with enum, search, force, post_type with enum, etc.)
1003
+
1004
+ **Output compression (`mode` parameter):**
1005
+ - 10 listing tools gain `mode` param: `full` (default), `summary` (key fields only), `ids_only` (flat array)
1006
+ - wp_list_pages, wp_list_media, wp_list_comments, wp_list_categories, wp_list_tags, wp_list_users, wp_list_custom_posts, wp_list_plugins, wp_list_themes, wp_list_revisions
1007
+
1008
+ 713 Vitest unit tests · 85 tools
1009
+
929
1010
  ### v4.5.0 (2026-02-21) — Plugin Intelligence (RankMath + Yoast)
930
1011
 
931
1012
  6 new tools exploiting native RankMath and Yoast SEO API endpoints for rendered head analysis, schema validation, and social meta management.
@@ -1091,16 +1172,16 @@ All Content Intelligence tools are read-only and always allowed regardless of go
1091
1172
 
1092
1173
  ## Roadmap
1093
1174
 
1094
- ### v4.5 — GSC Integration
1175
+ ### v4.7 — GSC Integration
1095
1176
  - `wp_get_gsc_performance` — Google Search Console API (clicks, impressions, position, CTR per URL)
1096
1177
  - `wp_find_quick_win_keywords` — surface keywords ranking positions 11–20 for targeted updates
1097
1178
  - `wp_seo_content_decay` — cross-reference GSC traffic loss with content age to prioritize refresh candidates
1098
1179
 
1099
- ### v4.6 — Redirect Intelligence
1180
+ ### v4.8 — Redirect Intelligence
1100
1181
  - `wp_create_redirect` — create 301 redirects via Redirection plugin or RankMath/Yoast Redirects. Auto-triggered governance hook when `wp_update_post` changes a slug
1101
1182
  - `wp_list_404_errors` — surface recent 404s from Redirection plugin log
1102
1183
 
1103
- ### v4.7 — OAuth & Registry
1184
+ ### v4.9 — OAuth & Registry
1104
1185
  - OAuth 2.0 / JWT authentication
1105
1186
  - MCP Registry submission
1106
1187
 
package/dxt/manifest.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "wordpress-mcp-server",
4
4
  "display_name": "WordPress MCP Server",
5
- "version": "4.5.0",
6
- "description": "Manage your WordPress site from Claude Desktop — posts, pages, media, SEO audits, content intelligence, plugin intelligence, plugins, themes, revisions, WooCommerce, content compression, and more. 85 tools, no WordPress plugin required.",
7
- "long_description": "A full-featured MCP server for WordPress REST API integration. Manage posts, pages, media, categories, tags, comments, users, SEO metadata, plugins, themes, revisions, and WooCommerce products/orders/customers through 85 tools — all from Claude Desktop.\n\nNo WordPress plugin required. Uses the built-in WordPress REST API with Application Passwords for secure authentication.\n\nFeatures:\n- Content management: create, read, update, delete posts and pages\n- Content compression: field filtering, content_format (html/text/links_only), list modes (full/summary/ids_only) for LLM context optimization\n- Content intelligence: readability scoring, duplicate detection, entity extraction, publishing velocity, revision diff, content structure analysis, FAQ extraction, CTA detection, link mapping, anchor text audit, schema markup validation\n- Plugin intelligence: SEO plugin detection (RankMath/Yoast/SEOPress), rendered head analysis, schema validation from plugin fields, SEO score reading, Twitter Card meta, pillar content management\n- Editorial approval workflow: submit for review, approve, reject\n- Media library: list, get details, upload from URL\n- Taxonomy: categories, tags, custom post types\n- SEO: auto-detects Yoast, RankMath, SEOPress, or All in One SEO\n- SEO audit suite: media alt text, orphan pages, heading structure, thin content, canonicals, E-E-A-T signals, broken links, keyword cannibalization, taxonomy bloat, outbound links\n- Plugins & themes: list, activate, deactivate\n- Revisions: list, view, restore, delete\n- WooCommerce read: products, orders, customers, price guardrail\n- WooCommerce intelligence: inventory alerts, order analytics, product SEO audit, product link suggestions\n- WooCommerce write: update products (with price guardrail), stock management, order status transitions\n- Enterprise controls: read-only mode, draft-only, disable-delete, require-approval (global and per-target)\n- Multi-site: target multiple WordPress installations with per-target controls",
5
+ "version": "4.6.0",
6
+ "description": "Manage your WordPress site from Claude Desktop — posts, pages, media, SEO audits, content intelligence, plugin intelligence, plugin layer (ACF, Elementor), plugins, themes, revisions, WooCommerce, content compression, and more. 92 tools, no WordPress plugin required.",
7
+ "long_description": "A full-featured MCP server for WordPress REST API integration. Manage posts, pages, media, categories, tags, comments, users, SEO metadata, plugins, themes, revisions, and WooCommerce products/orders/customers through 92 tools — all from Claude Desktop.\n\nNo WordPress plugin required. Uses the built-in WordPress REST API with Application Passwords for secure authentication.\n\nFeatures:\n- Content management: create, read, update, delete posts and pages\n- Content compression: field filtering, content_format (html/text/links_only), list modes (full/summary/ids_only) for LLM context optimization\n- Content intelligence: readability scoring, duplicate detection, entity extraction, publishing velocity, revision diff, content structure analysis, FAQ extraction, CTA detection, link mapping, anchor text audit, schema markup validation\n- Plugin intelligence: SEO plugin detection (RankMath/Yoast/SEOPress), rendered head analysis, schema validation from plugin fields, SEO score reading, Twitter Card meta, pillar content management\n- Plugin layer: extensible adapter architecture for third-party plugins (ACF, Elementor). Adapters activate only when plugin detected via REST namespace discovery\n- Editorial approval workflow: submit for review, approve, reject\n- Media library: list, get details, upload from URL\n- Taxonomy: categories, tags, custom post types\n- SEO: auto-detects Yoast, RankMath, SEOPress, or All in One SEO\n- SEO audit suite: media alt text, orphan pages, heading structure, thin content, canonicals, E-E-A-T signals, broken links, keyword cannibalization, taxonomy bloat, outbound links\n- Plugins & themes: list, activate, deactivate\n- Revisions: list, view, restore, delete\n- WooCommerce read: products, orders, customers, price guardrail\n- WooCommerce intelligence: inventory alerts, order analytics, product SEO audit, product link suggestions\n- WooCommerce write: update products (with price guardrail), stock management, order status transitions\n- Enterprise controls: read-only mode, draft-only, disable-delete, require-approval (global and per-target)\n- Multi-site: target multiple WordPress installations with per-target controls",
8
8
  "author": {
9
9
  "name": "AdSim",
10
10
  "email": "georges@adsim.be",
@@ -59,7 +59,7 @@
59
59
  { "name": "wp_list_custom_posts", "description": "List posts from any custom post type" },
60
60
  { "name": "wp_list_users", "description": "List users with roles" },
61
61
  { "name": "wp_set_target", "description": "Switch active WordPress site (multi-target mode)" },
62
- { "name": "wp_site_info", "description": "Get site info, current user, post types, and enterprise controls" },
62
+ { "name": "wp_site_info", "description": "Get site info, current user, post types, enterprise controls, and plugin_layer (detected plugins, tools count)" },
63
63
  { "name": "wp_get_seo_meta", "description": "Get SEO metadata for a post or page" },
64
64
  { "name": "wp_update_seo_meta", "description": "Update SEO metadata for a post or page" },
65
65
  { "name": "wp_audit_seo", "description": "Audit SEO metadata across multiple posts/pages" },
@@ -118,7 +118,15 @@
118
118
  { "name": "wp_get_pillar_content", "description": "Read or set RankMath pillar/cornerstone content flag. Write mode blocked by WP_READ_ONLY" },
119
119
  { "name": "wp_audit_schema_plugins", "description": "Audit JSON-LD schemas from SEO plugin native fields (rank_math_schema or Yoast head)" },
120
120
  { "name": "wp_get_seo_score", "description": "Read RankMath native SEO score (0-100) with bulk mode distribution stats" },
121
- { "name": "wp_get_twitter_meta", "description": "Read or write Twitter Card meta (title, description, image) from RankMath, Yoast, or SEOPress" }
121
+ { "name": "wp_get_twitter_meta", "description": "Read or write Twitter Card meta (title, description, image) from RankMath, Yoast, or SEOPress" },
122
+ { "name": "wp_get_site_options", "description": "Read WordPress site settings (title, tagline, language, timezone) via /wp/v2/settings. Requires manage_options" },
123
+ { "name": "acf_get_fields", "description": "Get ACF custom fields for a post/page with key filtering and raw/compact/summary modes. Requires ACF plugin" },
124
+ { "name": "acf_list_field_groups", "description": "List all configured ACF field groups. Requires ACF plugin" },
125
+ { "name": "acf_get_field_group", "description": "Get full detail of an ACF field group by ID. Requires ACF plugin" },
126
+ { "name": "acf_update_fields", "description": "Update ACF custom fields for a post/page. Write — blocked by WP_READ_ONLY. Requires ACF plugin" },
127
+ { "name": "elementor_list_templates", "description": "List Elementor templates (page, section, block, popup) with type filtering. Requires Elementor" },
128
+ { "name": "elementor_get_template", "description": "Get full Elementor template content and elements. Context-guarded at 50k chars. Requires Elementor" },
129
+ { "name": "elementor_get_page_data", "description": "Get Elementor editor data for a post/page: widgets used, elements count. Requires Elementor" }
122
130
  ],
123
131
  "keywords": [
124
132
  "wordpress",
@@ -136,7 +144,10 @@
136
144
  "ecommerce",
137
145
  "content-compression",
138
146
  "content-intelligence",
139
- "plugin-intelligence"
147
+ "plugin-intelligence",
148
+ "plugin-layer",
149
+ "acf",
150
+ "elementor"
140
151
  ],
141
152
  "license": "MIT",
142
153
  "user_config": {