Skip to main content
Glama

Why?

WordPress powers 43% of the web — but AI dev tools don't speak WordPress natively.

This toolkit bridges that gap with 23 tools, 33 skills, and universal SEO plugin support:

For Developers

  • Validate PHP, templates, block.json

  • Scaffold plugins, blocks, Elementor widgets

  • Analyze themes & plugins like Theme Check

  • Introspect REST API endpoints live

For Content Teams

  • Score content SEO quality (0-100)

  • Detect AI writing patterns

  • Publish to WordPress with SEO metadata

  • Analyze competitor sites & tech stacks

For Store Owners

  • Search WooCommerce products

  • Track orders & store stats

  • Manage sites via WP-CLI

  • Works with Yoast, RankMath, AIOSEO


Related MCP server: WordPress MCP Server

Quick Start

One command. That's it.

claude mcp add wp-ai-toolkit npx -y @erayusta/wp-ai-toolkit

Then open Claude Code and try:

> Analyze the theme in my wp-content/themes/flavor directory

> Scaffold an Elementor widget called Pricing Card

> Score this article's SEO quality and check for AI patterns

> Publish this draft to my WordPress site as a draft with SEO metadata

The AI calls the right tools automatically.


Architecture

   Claude Code  ·  Cursor  ·  VS Code  ·  Gemini CLI  ·  Codex
                            │
                            │  stdio (JSON-RPC)
                            ▼
   ┌─────────────────────────────────────┐    ┌─────────────────────────────┐
   │       wp-ai-toolkit (Dev Server)    │    │  wp-storefront (Commerce)   │
   │              18 tools               │    │          5 tools            │
   ╞═════════════════════════════════════╡    ╞═════════════════════════════╡
   │                                     │    │                             │
   │  DOCS & DISCOVERY                   │    │  search_products            │
   │  ├── learn_wordpress_api            │    │  get_product_details        │
   │  ├── search_docs                    │    │  get_orders                 │
   │  ├── fetch_full_docs                │    │  get_store_info             │
   │  └── introspect_rest_api            │    │  get_store_stats            │
   │                                     │    │                             │
   │  VALIDATION                         │    └─────────────────────────────┘
   │  ├── validate_php                   │
   │  ├── validate_block_json            │    ┌─────────────────────────────┐
   │  └── validate_theme_template        │    │    WordPress MU-Plugins     │
   │                                     │    ╞═════════════════════════════╡
   │  ANALYSIS & SEO                     │    │  Universal SEO REST API     │
   │  ├── analyze_theme                  │    │  (auto-detects plugin)      │
   │  ├── analyze_plugin                 │    │                             │
   │  ├── analyze_content_seo            │    │  ✅ Yoast SEO              │
   │  ├── analyze_competitors            │    │  ✅ Rank Math              │
   │  └── score_content_quality          │    │  ✅ All in One SEO         │
   │                                     │    └─────────────────────────────┘
   │  ACTIONS                            │
   │  ├── manage_wp_site                 │    ┌─────────────────────────────┐
   │  ├── scaffold_component             │    │      33 Agent Skills        │
   │  └── publish_to_wordpress           │    ╞═════════════════════════════╡
   │                                     │    │  REST API · Hooks · Blocks  │
   └─────────────────────────────────────┘    │  Themes · Plugins · WooC    │
                                              │  Gutenberg · Custom Fields  │
                                              │  Security · Multisite       │
                                              │  Page Builders · Perf       │
                                              │  Admin UI · Cron · SEO      │
                                              │  Migrations · Copywriting   │
                                              │  Content Strategy · CRO     │
                                              │  Analytics · Forms · Media  │
                                              │  Email · Debug · Backup     │
                                              │  Database · Testing · PHPCS │
                                              │  Blogging · E-Commerce+     │
                                              │  Plugin Dev · Multilingual  │
                                              │  Popular Themes             │
                                              └─────────────────────────────┘

Highlights


Installation

# Option 1: npx (zero install — recommended)
npx -y @erayusta/wp-ai-toolkit

# Option 2: Global install
npm install -g @erayusta/wp-ai-toolkit

# Option 3: Build from source
git clone https://github.com/erayusta/wp-ai-toolkit.git
cd wp-ai-toolkit && npm install && npm run build

Dev Server — 18 Tools

Docs & Discovery

Tool

Description

learn_wordpress_api

Start here — creates session, loads context

search_docs

Search developer.wordpress.org

fetch_full_docs

Full doc page as markdown

introspect_rest_api

Explore REST endpoints + live discovery

Validation

Tool

Description

validate_php

Hooks, security, deprecated, anti-patterns

validate_block_json

block.json / theme.json schema checks

validate_theme_template

Template hierarchy, escaping, The Loop

Analysis & SEO

Tool

Description

analyze_theme

Full theme directory audit

analyze_plugin

Full plugin directory audit

analyze_content_seo

Readability, keyword density, SEO score

analyze_competitors

Detect theme/plugins/tech of any WP site

score_content_quality

5-dimension score + AI pattern detection

analyze_database

Table sizes, bloat, orphaned data, cleanup

Diagnostics

Tool

Description

debug_wordpress

Debug log, config constants, checksums, conflicts

check_site_health

Health score: PHP, DB, updates, SSL, cron

Actions

Tool

Description

manage_wp_site

WP-CLI commands with safety checks

scaffold_component

Generate 13 component types

publish_to_wordpress

Publish with Yoast/RankMath/AIOSEO metadata

See src/tools/README.md for full tool reference with example calls.

scaffold_component — 13 Types

analyze_content_seo — What It Scores

┌──────────────────────────────────────────────────────────────┐
│                    SEO Score: 82/100 (A)                     │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│  Word Count          2,847 words          ✅ Excellent       │
│  Readability         Flesch 64 (Standard) ✅ Optimal         │
│  Keyword Density     1.8%                 ✅ Optimal         │
│  Keyword in H1       Yes                  ✅                 │
│  Keyword in H2       Yes                  ✅                 │
│  First Paragraph     Yes                  ✅                 │
│  Heading Structure   1×H1, 5×H2, 3×H3    ✅                 │
│  Internal Links      4                    ✅                 │
│  External Links      2                    ✅                 │
│  Images              3 (all with alt)     ✅                 │
│  Meta Title          54 chars             ✅ (50-60)         │
│  Meta Description    148 chars            ✅ (140-160)       │
│                                                              │
└──────────────────────────────────────────────────────────────┘

score_content_quality — 5 Dimensions

┌──────────────────────────────────────────────────────────────┐
│                Content Quality: 76/100 (B)                   │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│  Humanity      ████████░░  16/20   Natural writing           │
│  Specificity   ██████░░░░  12/20   Needs more data/examples  │
│  Structure     █████████░  18/20   Well organized            │
│  Engagement    ███████░░░  14/20   Good use of questions     │
│  Completeness  ████████░░  16/20   Solid depth               │
│                                                              │
├──────────────────────────────────────────────────────────────┤
│  AI Patterns Detected:                                       │
│  ⚠ "leverage" (2x) → use "use"                              │
│  ⚠ "In conclusion" (1x) → state the takeaway directly       │
└──────────────────────────────────────────────────────────────┘

analyze_competitors — What It Detects

┌──────────────────────────────────────────────────────────────┐
│           Competitor Analysis: competitor.com                 │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│  Platform       WordPress 6.7                                │
│  Theme          flavor (custom)                              │
│  Page Builder   Elementor                                    │
│  SEO Plugin     Rank Math                                    │
│  E-Commerce     WooCommerce                                  │
│  Analytics      Google Analytics + GTM                       │
│  CDN/Cache      Cloudflare + WP Rocket                       │
│  REST API       wp/v2, wc/v3, rankmath/v1                    │
│                                                              │
│  Detected Plugins (8):                                       │
│  elementor, woocommerce, wordpress-seo, wp-rocket,           │
│  contact-form-7, wp-mail-smtp, updraftplus, wordfence        │
│                                                              │
└──────────────────────────────────────────────────────────────┘

Storefront Server — 5 Tools

WooCommerce store operations via REST API.

Tool

Description

search_products

Search with filters (category, price range, stock)

get_product_details

Full product data by ID or slug

get_orders

Order listing with status filters

get_store_info

Store settings, payment gateways, shipping zones

get_store_stats

Sales totals, top sellers, order counts

claude mcp add wp-storefront node dist/storefront.js

Agent Skills — 33

Deep expertise files that give AI agents WordPress superpowers.

Core Development

Skill

API

wp-rest-api — endpoints, auth, custom routes

Hooks

wp-hooks — actions, filters, priority

Blocks

wp-blocks — block.json, attributes, supports

React

wp-gutenberg-components — RichText, InnerBlocks

Fields

wp-custom-fields — ACF, CMB2, meta API

Plugins

wp-plugins — headers, settings, CPTs, AJAX

Themes

wp-themes — block vs classic, FSE, theme.json

Testing

wp-testing — PHPUnit, WP_UnitTestCase, wp-env

Standards

wp-coding-standards — PHPCS, WPCS, pre-commit

Database

wp-database — custom tables, dbDelta, optimization

Plugin Dev

wp-plugin-development — OOP, autoloading, WP.org

Infrastructure

Skill

Security

wp-security — escaping, nonces, roles

Speed

wp-performance — caching, query optimization

Network

wp-multisite — network admin, shared tables

Jobs

wp-cron-background — WP-Cron, Action Scheduler

Admin

wp-admin-ui — meta boxes, list tables

Builders

wp-page-builders — Elementor, Divi, Beaver

Deploy

wp-migrations-deploy — DB migrations, Bedrock

Debug

wp-debugging — WP_DEBUG, Query Monitor, errors

Backup

wp-backups-recovery — UpdraftPlus, disaster recovery

Email

wp-email-transactional — wp_mail, SMTP, templates

Content & Marketing

Skill

Commerce

wp-woocommerce — products, gateways, HPOS

SEO

wp-seo-schema — JSON-LD, Yoast, RankMath

Strategy

wp-content-strategy — topic clusters, calendars

Writing

wp-copywriting — headlines, meta, snippets

CRO

wp-cro-optimization — landing pages, A/B, forms

Analytics

wp-analytics-tracking — GA4, GTM, GSC, UTM

Forms

wp-forms — CF7, WPForms, Gravity Forms

Media

wp-media-management — images, WebP, SVG, CDN

Themes

wp-popular-themes — Astra, GeneratePress, OceanWP

i18n

wp-multilingual — WPML, Polylang, hreflang

Blog

wp-blogging — posts, editorial, RSS, comments

E-Com+

wp-ecommerce-advanced — subscriptions, marketplace


SEO Plugins

WordPress MU-plugins that expose SEO data via REST API.

One file. Three SEO plugins. Zero config.

cp wordpress/wp-ai-toolkit-seo-rest.php /path/to/wp-content/mu-plugins/

Auto-detects Yoast SEO, Rank Math, or All in One SEO and exposes a unified seo field:

Read SEO data:

GET /wp-json/wp/v2/posts/123
{
  "title": "My Post",
  "seo": {
    "plugin": "rankmath",
    "seo_title": "My Post | My Site",
    "meta_description": "A great post about...",
    "focus_keyword": "wordpress seo",
    "seo_score": "87",
    "canonical_url": "",
    "og_title": "My Post",
    "og_description": "...",
    "og_image": "https://...",
    "twitter_title": "...",
    "twitter_description": "..."
  }
}

Write SEO data:

POST /wp-json/wp/v2/posts/123
{
  "seo": {
    "seo_title": "New Title | My Site",
    "meta_description": "Updated desc",
    "focus_keyword": "new keyword"
  }
}

Check active plugin:

GET /wp-json/wp-ai-toolkit/v1/seo-status
{
  "active_plugin": "rankmath",
  "supported": ["yoast", "rankmath", "aioseo"]
}

Individual Plugins

File

SEO Plugin

Use Case

wp-ai-toolkit-seo-rest.php

Universal (auto-detect)

Recommended for most sites

seo-machine-yoast-rest.php

Yoast SEO only

Yoast-only environments

wp-ai-toolkit-rankmath-rest.php

Rank Math only

RankMath-only environments

wp-ai-toolkit-aioseo-rest.php

All in One SEO only

AIOSEO-only environments

See wordpress/README.md for full SEO plugin documentation with field mapping and API examples.


MCP Configuration

claude mcp add wp-ai-toolkit npx -y @erayusta/wp-ai-toolkit

Or .mcp.json in project root:

{
  "mcpServers": {
    "wp-ai-toolkit": {
      "command": "npx",
      "args": ["-y", "@erayusta/wp-ai-toolkit"]
    }
  }
}

~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "wp-ai-toolkit": {
      "command": "npx",
      "args": ["-y", "@erayusta/wp-ai-toolkit"]
    },
    "wp-storefront": {
      "command": "npx",
      "args": ["-y", "@erayusta/wp-ai-toolkit/dist/storefront.js"]
    }
  }
}

.cursor/mcp.json:

{
  "mcpServers": {
    "wp-ai-toolkit": {
      "command": "npx",
      "args": ["-y", "@erayusta/wp-ai-toolkit"]
    }
  }
}

settings.json:

{
  "mcp.servers": {
    "wp-ai-toolkit": {
      "command": "npx",
      "args": ["-y", "@erayusta/wp-ai-toolkit"]
    }
  }
}

Uses the gemini-extension.json file in the package root.


Tool Reference

Parameter

Type

Required

Description

api

string

Yes

rest-api hooks blocks themes plugins woocommerce wp-cli gutenberg multisite custom-fields

conversationId

string

No

Existing session to add another API context

Parameter

Type

Required

Description

code

string

Yes

PHP code to validate

conversationId

string

Yes

Session ID

context

string

No

plugin theme mu-plugin functions-php general

Checks: Hook mismatches · Security (nonces, escaping, SQL injection) · Deprecated functions (30+) · Anti-patterns (query_posts, extract, direct cURL) · Function prefixing · Absolute includes · Plugin headers

Parameter

Type

Required

Description

type

string

Yes

See 13 types above

name

string

Yes

Component name

conversationId

string

Yes

Session ID

slug

string

No

Custom slug override

namespace

string

No

PHP namespace/prefix

description

string

No

Component description

Parameter

Type

Required

Description

content

string

Yes

Article content (HTML or text)

conversationId

string

Yes

Session ID

targetKeyword

string

No

Primary keyword to check

secondaryKeywords

string[]

No

Additional keywords to track

metaTitle

string

No

Meta title to validate (50-60 chars)

metaDescription

string

No

Meta description to validate (140-160 chars)

Returns: Word count · Readability (Flesch) · Keyword density · Heading structure · Link counts · Image analysis · Overall SEO score with A+ to F grade

Parameter

Type

Required

Description

siteUrl

string

Yes

WordPress site URL

title

string

Yes

Post title

content

string

Yes

Post content (HTML)

conversationId

string

Yes

Session ID

status

string

No

draft publish pending private (default: draft)

postType

string

No

posts pages or custom type (default: posts)

seoTitle

string

No

SEO title — works with Yoast/RankMath/AIOSEO

seoDescription

string

No

Meta description

seoFocusKeyword

string

No

Focus keyword

ogTitle

string

No

Open Graph title

ogDescription

string

No

Open Graph description

ogImage

string

No

Open Graph image URL

username

string

No

WP username for auth

applicationPassword

string

No

WP Application Password

Requires: wp-ai-toolkit-seo-rest.php MU-plugin for SEO fields

Parameter

Type

Required

Description

url

string

Yes

Competitor website URL

conversationId

string

Yes

Session ID

Detects: WordPress version · Theme · Plugins (from HTML) · Page builders (Elementor, Divi, Beaver) · SEO plugins (Yoast, RankMath) · WooCommerce · Analytics (GA4, GTM) · CDN (Cloudflare) · Caching (WP Rocket, LiteSpeed) · REST API namespaces · Security indicators

Parameter

Type

Required

Description

content

string

Yes

Content to score (HTML or text)

conversationId

string

Yes

Session ID

contentType

string

No

blog-post landing-page product-page documentation general

Dimensions:

  • Humanity — AI pattern detection (delve, leverage, seamlessly, holistic...)

  • Specificity — Numbers, data points, quotes, URLs, examples

  • Structure — Headings, lists, images, code blocks, paragraphs

  • Engagement — Questions, personal pronouns, transitions, examples

  • Completeness — Depth, conclusion, CTA, topic coverage

Tool

Key Parameters

search_docs

query, category, limit

fetch_full_docs

url

introspect_rest_api

query, namespace, siteUrl, method

validate_block_json

json, type (block/theme)

validate_theme_template

code, templateType, themeType

analyze_theme

themePath

analyze_plugin

pluginPath

analyze_database

wpPath

debug_wordpress

wpPath, action (status/errors/config/health/conflicts)

check_site_health

wpPath

manage_wp_site

command, wpPath, format

Storefront Server:

Tool

Key Parameters

search_products

siteUrl, query, category, minPrice, maxPrice

get_product_details

siteUrl, productId or slug

get_orders

siteUrl, status, consumerKey, consumerSecret

get_store_info

siteUrl, consumerKey, consumerSecret

get_store_stats

siteUrl, period, consumerKey, consumerSecret


Environment Variables

Variable

Default

Description

WP_TOOLKIT_LOG_LEVEL

INFO

DEBUG INFO WARN ERROR — logs to stderr


Development

npm install          # Install dependencies
npm run dev          # Watch mode (tsx)
npm run build        # Compile TypeScript
npm test             # Run 140 tests
npm run lint         # ESLint
npm run typecheck    # tsc --noEmit

Project Structure

wp-ai-toolkit/
│
├── src/
│   ├── index.ts                       # Dev MCP server (18 tools)
│   ├── storefront.ts                  # Storefront MCP server (5 tools)
│   ├── types.ts                       # Shared type definitions
│   │
│   ├── tools/                         # 18 tool implementations
│   │   ├── learn-wordpress-api.ts     #   Session bootstrap
│   │   ├── search-docs.ts            #   Documentation search
│   │   ├── fetch-full-docs.ts        #   Full page retrieval
│   │   ├── introspect-rest-api.ts    #   REST API explorer
│   │   ├── validate-php.ts           #   PHP validation
│   │   ├── validate-block-json.ts    #   Block/theme JSON validation
│   │   ├── validate-theme-template.ts #   Template validation
│   │   ├── manage-wp-site.ts         #   WP-CLI bridge
│   │   ├── scaffold-component.ts     #   Code generation (13 types)
│   │   ├── analyze-theme.ts          #   Theme audit
│   │   ├── analyze-plugin.ts         #   Plugin audit
│   │   ├── analyze-content-seo.ts    #   SEO content analysis
│   │   ├── analyze-competitors.ts    #   Competitor detection
│   │   ├── publish-to-wordpress.ts   #   REST publishing + SEO
│   │   ├── score-content-quality.ts  #   Quality scoring
│   │   ├── debug-wordpress.ts        #   Debug log & diagnostics
│   │   ├── check-site-health.ts      #   Site health score
│   │   └── analyze-database.ts       #   Database analysis
│   │
│   ├── data/                          # Built-in reference data
│   │   ├── wp-api-descriptions.ts    #   API domain descriptions
│   │   ├── wp-hooks-registry.ts      #   50+ hooks reference
│   │   └── wp-rest-schema.ts         #   60+ REST endpoints
│   │
│   └── utils/
│       ├── conversation.ts            # Session management
│       ├── http.ts                    # HTTP client
│       └── logger.ts                  # Structured logging
│
├── skills/                            # 33 agent skill files (markdown + README each)
│
├── wordpress/                         # SEO REST API MU-plugins
│   ├── wp-ai-toolkit-seo-rest.php    #   Universal (auto-detect)
│   ├── wp-ai-toolkit-rankmath-rest.php
│   ├── wp-ai-toolkit-aioseo-rest.php
│   └── seo-machine-yoast-rest.php
│
├── tests/                             # 140 tests (Vitest)
│   ├── tools/                        #   14 tool test files (140 tests)
│   └── utils/                        #   2 utility test files
│
├── examples/                          # MCP config examples
├── scripts/                           # Setup & install scripts
│
├── .claude-plugin/                    # Claude Code plugin
├── .cursor-plugin/                    # Cursor plugin
├── .codex-plugin/                     # Codex plugin
├── plugin.json                        # Plugin manifest
├── gemini-extension.json              # Gemini CLI extension
│
└── .github/workflows/                 # CI/CD (Node 20 + 22)
    ├── ci.yml                        #   Build, lint, test on push/PR
    └── publish.yml                   #   npm publish on release

Platform Support

Platform

Method

Status

Claude Code

claude mcp add or .mcp.json

✅

Claude Desktop

claude_desktop_config.json

✅

Cursor

.cursor/mcp.json

✅

VS Code

settings.json

✅

Gemini CLI

gemini-extension.json

✅

Codex

.codex-plugin/

✅


Contributing

  1. Fork the repository

  2. Create a feature branch: git checkout -b feature/my-feature

  3. Make changes

  4. Run checks: npm test && npm run lint

  5. Commit and open a pull request


Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers