Skip to content
Back to search

tr-wordpress-ai-toolkit

Connect Claude, Copilot and any MCP client to WordPress. Manage content, media, SEO and site health using natural language. 35 tools across 5 modules.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/bharatkabharman-pixel--tr-wordpress-ai-toolkit/badge.svg)](/listings/bharatkabharman-pixel--tr-wordpress-ai-toolkit)

HTML

<a href="/listings/bharatkabharman-pixel--tr-wordpress-ai-toolkit"><img src="/api/listings/bharatkabharman-pixel--tr-wordpress-ai-toolkit/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 441 lines
  1. # TR WordPress AI Toolkit
  2. > Connect Claude, Copilot, Cursor and any MCP-compatible AI assistant to your WordPress site — manage content, media, SEO and site health using natural language.
  3. [![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)](https://github.com/bharatkabharman-pixel/tr-wordpress-ai-toolkit/releases)
  4. [![WordPress](https://img.shields.io/badge/WordPress-6.9%2B-21759b.svg)](https://wordpress.org)
  5. [![PHP](https://img.shields.io/badge/PHP-8.1%2B-777bb4.svg)](https://php.net)
  6. [![License](https://img.shields.io/badge/license-GPL--2.0--or--later-green.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
  7. ---
  8. ## What It Does
  9. TR WordPress AI Toolkit gives AI assistants direct access to your WordPress site through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io). The plugin exposes **35 tools** across five modules — Content, Media, SEO, Health and Users — all secured by WordPress capability checks.
  10. Once connected, you manage your site in plain English:
  11. ```
  12. "Show all published posts from this month."
  13. "Create a draft post titled 'AI Trends 2026' in the Technology category."
  14. "Find all posts missing a featured image."
  15. "Give me an SEO health summary and list gaps."
  16. "Which plugins are active? Are any outdated?"
  17. "List editors registered in the last 30 days."
  18. "Find orphaned media files in the library."
  19. "What is the current PHP version and memory limit?"
  20. ```
  21. **Compatible clients:** Claude.ai Projects, Claude Desktop, Cursor, Windsurf, Codeium, and any MCP 2025-11-25 / 2026-07-28 compliant client.
  22. ---
  23. ## Table of Contents
  24. - [Features](#features)
  25. - [Quick Start](#quick-start)
  26. - [Connecting to Claude.ai](#connecting-to-claudeai)
  27. - [Prompt Library](#prompt-library)
  28. - [Tools Reference](#tools-reference)
  29. - [Security](#security)
  30. - [Architecture](#architecture)
  31. - [Project Structure](#project-structure)
  32. - [Development](#development)
  33. - [FAQ](#faq)
  34. - [Changelog](#changelog)
  35. - [License](#license)
  36. ---
  37. ## Features
  38. ### One-Click Quick Connect
  39. Generate an Application Password and a ready-to-paste Claude.ai / Claude Desktop configuration in one click — no manual credential setup.
  40. ### Built-in MCP Server
  41. The plugin ships its own MCP endpoint at `/wp-json/tr-ai-toolkit/mcp`. No separate protocol plugin required. Supports both **Streamable HTTP** (MCP 2025-11-25 and 2026-07-28) and **STDIO** transports.
  42. ### 42-Prompt Library
  43. A categorized library of 42 ready-to-use prompts for Claude.ai — covering Content, SEO, Media, Site Health, Users, WooCommerce, Comments, Custom Post Types and Power Prompts. Copy any prompt with one click.
  44. ### Manual Credentials Encoder
  45. Enter a WordPress username and Application Password directly in the admin — the plugin computes the base64 `Authorization` header and the full Claude.ai config JSON for you.
  46. ### 58 WordPress Abilities Across 8 Modules
  47. | Module | Tools | Highlights |
  48. |--------|-------|------------|
  49. | Content | 14 | List, search, create, update, trash posts & pages; manage categories and tags |
  50. | Media | 5 | Browse, search, update metadata, find orphaned files |
  51. | SEO | 5 | Health score, missing titles/descriptions/images, per-post structure analysis |
  52. | Health | 7 | WP version, PHP info, plugins, theme, cron, permalinks, memory |
  53. | Users | 4 | List, search users, inspect roles and capabilities |
  54. | WooCommerce | 12 | Products, orders, customers, coupons, sales summary (auto-detects WC) |
  55. | Comments | 6 | List, approve, trash, reply to comments; moderation summary |
  56. | Custom Post Types | 5 | Discover and manage any registered CPT with custom fields |
  57. ### Security First
  58. Every tool has a `permission_callback` that checks the authenticated user's WordPress capabilities. Sensitive fields (passwords, auth keys, secrets) are never exposed in tool output.
  59. ### Audit Log
  60. Every AI tool invocation is recorded — user ID, IP address, tool name and status — with configurable retention.
  61. ---
  62. ## Quick Start
  63. ### 1. Install the Plugin
  64. Download the latest ZIP from the [Releases page](https://github.com/bharatkabharman-pixel/tr-wordpress-ai-toolkit/releases) and upload via **Plugins → Add New → Upload Plugin**, then activate.
  65. The plugin auto-installs and activates MCP Adapter on first activation (required for STDIO transport).
  66. ### 2. Generate Your Credentials
  67. Go to **TR AI Toolkit → Connection Guide → Quick Connect** and click **Generate Config**. The plugin creates an Application Password for the current admin user and displays the ready-to-paste configuration.
  68. ### 3. Connect Your AI Client
  69. Copy the configuration JSON and add it to your AI client. For Claude.ai Projects, paste it in **Project Settings → MCP Servers**.
  70. Done — your AI assistant now has direct access to WordPress.
  71. ---
  72. ## Connecting to Claude.ai
  73. ### HTTP Transport (Claude.ai Projects — Recommended)
  74. ```json
  75. {
  76. "mcpServers": {
  77. "tr-ai-toolkit": {
  78. "type": "http",
  79. "url": "https://your-site.com/wp-json/tr-ai-toolkit/mcp",
  80. "headers": {
  81. "Authorization": "Basic BASE64(username:application_password)"
  82. }
  83. }
  84. }
  85. }
  86. ```
  87. Use **Quick Connect** in the admin to get the exact JSON with your real credentials pre-filled.
  88. ### STDIO Transport (Claude Desktop / Local)
  89. ```json
  90. {
  91. "mcpServers": {
  92. "tr-ai-toolkit": {
  93. "command": "wp",
  94. "args": [
  95. "mcp-adapter", "serve",
  96. "--server=tr-ai-toolkit",
  97. "--user=admin",
  98. "--path=/path/to/wordpress"
  99. ]
  100. }
  101. }
  102. }
  103. ```
  104. ### Authentication
  105. The plugin uses **WordPress Application Passwords** (built into WordPress 5.6+). Generate one at **Users → Profile → Application Passwords**. No OAuth, no external tokens.
  106. ---
  107. ## Prompt Library
  108. The admin includes a **Prompt Library** with 25 curated prompts across six categories:
  109. | Category | Count | Example Prompt |
  110. |----------|-------|----------------|
  111. | Content Management | 7 | "List all draft posts and suggest which ones to publish first." |
  112. | SEO Optimization | 6 | "Audit this site's SEO and list the top 5 issues to fix." |
  113. | Media Library | 3 | "Find all media files not used in any post." |
  114. | Site Health | 5 | "Check the site health and flag any critical issues." |
  115. | Users | 3 | "Show all editors and their last activity." |
  116. | WooCommerce | 7 | "Show all out of stock products and pending orders." |
  117. | Comments | 6 | "Show all pending comments and approve the genuine ones." |
  118. | Custom Post Types | 5 | "List all custom post types and how many entries each has." |
  119. | Power Prompts | 6 | "Run a full site audit: SEO, health, WooCommerce, media and comments." |
  120. Access it via **TR AI Toolkit → Prompt Library** in the WordPress admin.
  121. ---
  122. ## Tools Reference
  123. ### Content (14 tools)
  124. | Tool | Description | Capability |
  125. |------|-------------|------------|
  126. | `tr-ai-toolkit/list-posts` | Paginated posts with status/category/date filters | `read` |
  127. | `tr-ai-toolkit/get-post` | Full post details including meta and taxonomy | `read` |
  128. | `tr-ai-toolkit/search-posts` | Full-text search across posts | `read` |
  129. | `tr-ai-toolkit/create-post` | Create a post (defaults to draft) | `edit_posts` |
  130. | `tr-ai-toolkit/update-post` | Partial update — title, content, status, meta | `edit_posts` |
  131. | `tr-ai-toolkit/delete-post` | Move post to trash (no permanent deletion) | `edit_posts` |
  132. | `tr-ai-toolkit/list-pages` | Paginated pages list | `read` |
  133. | `tr-ai-toolkit/get-page` | Full page details | `read` |
  134. | `tr-ai-toolkit/create-page` | Create a page (defaults to draft) | `edit_posts` |
  135. | `tr-ai-toolkit/update-page` | Partial update for pages | `edit_posts` |
  136. | `tr-ai-toolkit/list-categories` | All post categories with counts | `read` |
  137. | `tr-ai-toolkit/create-category` | Create a category | `edit_posts` |
  138. | `tr-ai-toolkit/list-tags` | All post tags with counts | `read` |
  139. | `tr-ai-toolkit/create-tag` | Create a tag | `edit_posts` |
  140. ### Media (5 tools)
  141. | Tool | Description | Capability |
  142. |------|-------------|------------|
  143. | `tr-ai-toolkit/list-media` | Paginated media library | `read` |
  144. | `tr-ai-toolkit/get-media-details` | Full attachment details with all image sizes | `read` |
  145. | `tr-ai-toolkit/search-media` | Search media by title or filename | `read` |
  146. | `tr-ai-toolkit/update-media-metadata` | Update title, alt text, caption, description | `upload_files` |
  147. | `tr-ai-toolkit/find-unused-media` | Orphaned attachments with no parent post | `upload_files` |
  148. ### SEO (5 tools)
  149. | Tool | Description | Capability |
  150. |------|-------------|------------|
  151. | `tr-ai-toolkit/get-seo-summary` | Overall SEO health with score estimate | `read` |
  152. | `tr-ai-toolkit/find-missing-meta-titles` | Posts without SEO title | `read` |
  153. | `tr-ai-toolkit/find-missing-meta-descriptions` | Posts without meta description | `read` |
  154. | `tr-ai-toolkit/find-posts-without-featured-images` | Posts without thumbnail | `read` |
  155. | `tr-ai-toolkit/analyze-content-structure` | Per-post word count, headings, links, images | `read` |
  156. SEO tools automatically detect and read from **Yoast SEO**, **Rank Math** and **All in One SEO Pack**.
  157. ### Health (7 tools)
  158. | Tool | Description | Capability |
  159. |------|-------------|------------|
  160. | `tr-ai-toolkit/get-wordpress-info` | WP version, site URL, language, timezone | `manage_options` |
  161. | `tr-ai-toolkit/get-php-version` | PHP version and loaded extensions | `manage_options` |
  162. | `tr-ai-toolkit/get-active-plugins` | Active plugins with versions | `manage_options` |
  163. | `tr-ai-toolkit/get-active-theme` | Active theme and block theme support | `manage_options` |
  164. | `tr-ai-toolkit/get-site-health-summary` | Post/page counts, memory, HTTPS, debug status | `manage_options` |
  165. | `tr-ai-toolkit/get-permalink-structure` | Permalink and URL base settings | `manage_options` |
  166. | `tr-ai-toolkit/get-cron-status` | Scheduled WP-Cron events and overdue count | `manage_options` |
  167. Admin email is masked in all health tool output.
  168. ### Users (4 tools)
  169. | Tool | Description | Capability |
  170. |------|-------------|------------|
  171. | `tr-ai-toolkit/list-users` | Paginated user list (email masked) | `list_users` |
  172. | `tr-ai-toolkit/get-user` | Single user profile (email masked) | `list_users` |
  173. | `tr-ai-toolkit/search-users` | Search by display name or email | `list_users` |
  174. | `tr-ai-toolkit/get-user-roles` | All roles with capability summary | `manage_options` |
  175. ### WooCommerce (12 tools)
  176. > Auto-enabled when WooCommerce is active. Silently skipped when WooCommerce is not installed.
  177. | Tool | Description | Capability |
  178. |------|-------------|------------|
  179. | `tr-ai-toolkit/wc-list-products` | Paginated product list with status/stock/category filters | `read` |
  180. | `tr-ai-toolkit/wc-get-product` | Full product details | `read` |
  181. | `tr-ai-toolkit/wc-search-products` | Search products by name or SKU | `read` |
  182. | `tr-ai-toolkit/wc-create-product` | Create a simple product (defaults to draft) | `edit_products` |
  183. | `tr-ai-toolkit/wc-update-product` | Update name, price, stock, SKU or status | `edit_products` |
  184. | `tr-ai-toolkit/wc-get-low-stock-products` | Out of stock / backorder products | `edit_products` |
  185. | `tr-ai-toolkit/wc-list-orders` | Paginated orders with status filter | `edit_shop_orders` |
  186. | `tr-ai-toolkit/wc-get-order` | Full order details with line items and billing | `edit_shop_orders` |
  187. | `tr-ai-toolkit/wc-update-order-status` | Change order status with optional note | `edit_shop_orders` |
  188. | `tr-ai-toolkit/wc-list-customers` | Customers with order count and total spent (email masked) | `list_users` |
  189. | `tr-ai-toolkit/wc-list-coupons` | Coupons with discount type, usage count and expiry | `edit_shop_orders` |
  190. | `tr-ai-toolkit/wc-get-sales-summary` | Revenue and order counts for today / week / month / year | `view_woocommerce_reports` |
  191. ### Comments (6 tools)
  192. | Tool | Description | Capability |
  193. |------|-------------|------------|
  194. | `tr-ai-toolkit/get-comment-summary` | Counts by status: pending, approved, spam, trash | `moderate_comments` |
  195. | `tr-ai-toolkit/list-comments` | Paginated list filtered by status and optionally post ID | `moderate_comments` |
  196. | `tr-ai-toolkit/get-comment` | Full comment details | `moderate_comments` |
  197. | `tr-ai-toolkit/approve-comment` | Approve a pending comment | `moderate_comments` |
  198. | `tr-ai-toolkit/trash-comment` | Move comment to trash (no permanent deletion) | `moderate_comments` |
  199. | `tr-ai-toolkit/reply-to-comment` | Post a reply as the authenticated user | `moderate_comments` |
  200. ### Custom Post Types (5 tools)
  201. Works with any public CPT registered on the site — portfolio, testimonials, events, team members and more.
  202. | Tool | Description | Capability |
  203. |------|-------------|------------|
  204. | `tr-ai-toolkit/list-post-types` | All public CPTs with labels, archive info and published count | `read` |
  205. | `tr-ai-toolkit/list-cpt-posts` | Paginated posts for any CPT by slug | `read` |
  206. | `tr-ai-toolkit/get-cpt-post` | Full post details including all custom fields | `read` |
  207. | `tr-ai-toolkit/create-cpt-post` | Create a CPT post with custom fields (defaults to draft) | `edit_posts` |
  208. | `tr-ai-toolkit/update-cpt-post` | Update title, content, status or custom fields | `edit_posts` |
  209. ---
  210. ## Security
  211. | Area | Implementation |
  212. |------|---------------|
  213. | Authentication | WordPress Application Passwords — standard HTTP Basic auth |
  214. | Authorization | Per-tool `permission_callback` checks WordPress capabilities |
  215. | Write operations | Require `edit_posts` or `upload_files` |
  216. | Admin operations | Require `manage_options` |
  217. | Input sanitization | WordPress `sanitize_*` functions throughout |
  218. | Output escaping | All admin views use `esc_html`, `esc_attr`, `esc_url` |
  219. | Sensitive data | Passwords, tokens, auth keys and salts never appear in tool output |
  220. | Audit log | Every invocation logged: user ID, IP, tool name, status |
  221. | No dangerous ops | No arbitrary PHP execution, no shell commands, no unrestricted SQL |
  222. ---
  223. ## Architecture
  224. ```
  225. WordPress 6.9+
  226. ├── TR WordPress AI Toolkit (this plugin)
  227. │ ├── Built-in MCP Server ← /wp-json/tr-ai-toolkit/mcp
  228. │ │ ├── Implements MCP protocol directly (Streamable HTTP)
  229. │ │ └── Session management via WP transients
  230. │ ├── Abilities Manager
  231. │ │ ├── Content Module (14 tools)
  232. │ │ ├── Media Module (5 tools)
  233. │ │ ├── SEO Module (5 tools)
  234. │ │ ├── Health Module (7 tools)
  235. │ │ ├── Users Module (4 tools)
  236. │ │ ├── WooCommerce Module (12 tools — auto-detects WC)
  237. │ │ ├── Comments Module (6 tools)
  238. │ │ └── CPT Module (5 tools)
  239. │ └── Admin UI
  240. │ ├── Dashboard, Settings, Activity Log
  241. │ ├── Connection Guide + Quick Connect
  242. │ └── Prompt Library (42 prompts)
  243. └── MCP Adapter (auto-installed — required for STDIO transport)
  244. ```
  245. The plugin implements the MCP protocol directly via the WordPress REST API. MCP Adapter is auto-installed for STDIO support but is not required for HTTP connections.
  246. ---
  247. ## Project Structure
  248. ```
  249. tr-wordpress-ai-toolkit/
  250. ├── tr-wordpress-ai-toolkit.php Plugin entry point
  251. ├── uninstall.php Clean removal of all plugin data
  252. ├── composer.json
  253. ├── readme.txt WordPress.org listing
  254. ├── includes/
  255. │ ├── class-plugin.php Bootstrap singleton
  256. │ ├── class-activator.php Activation (DB table, options, MCP Adapter install)
  257. │ ├── class-deactivator.php Deactivation
  258. │ ├── class-abilities-manager.php Ability registration orchestrator
  259. │ ├── class-permissions.php Capability checks
  260. │ ├── class-logger.php Audit logger
  261. │ └── class-settings.php Settings manager
  262. ├── modules/
  263. │ ├── content/class-content-module.php
  264. │ ├── media/class-media-module.php
  265. │ ├── seo/class-seo-module.php
  266. │ ├── health/class-health-module.php
  267. │ └── users/class-users-module.php
  268. ├── admin/
  269. │ ├── class-admin.php
  270. │ ├── views/
  271. │ │ ├── dashboard.php
  272. │ │ ├── settings.php
  273. │ │ ├── connect.php Quick Connect + Manual Encoder
  274. │ │ ├── prompts.php Prompt Library (25 prompts)
  275. │ │ └── logs.php
  276. │ ├── css/admin.css
  277. │ └── js/admin.js
  278. ├── integrations/
  279. │ └── mcp-adapter/class-mcp-server.php MCP protocol handler
  280. ├── tests/phpunit/
  281. ├── docs/
  282. └── .github/workflows/
  283. ```
  284. ---
  285. ## Development
  286. **Requirements:** PHP 8.1+, Composer, WordPress test suite.
  287. ```bash
  288. # Clone the repository
  289. git clone https://github.com/bharatkabharman-pixel/tr-wordpress-ai-toolkit.git
  290. cd tr-wordpress-ai-toolkit
  291. # Install all dependencies (including dev tools)
  292. composer install
  293. # Run PHP Code Standards check
  294. composer lint
  295. # Auto-fix code standards
  296. composer lint-fix
  297. # Run PHPUnit tests
  298. composer test
  299. ```
  300. ### Building a Release ZIP
  301. ```bash
  302. composer install --no-dev --optimize-autoloader
  303. zip -r tr-wordpress-ai-toolkit.zip . \
  304. --exclude="*.git*" \
  305. --exclude="tests/*" \
  306. --exclude="vendor/*/test*" \
  307. --exclude="composer.*" \
  308. --exclude="phpunit.xml" \
  309. --exclude=".github/*"
  310. ```
  311. ---
  312. ## FAQ
  313. **Do I need the MCP Adapter plugin?**
  314. Not for HTTP connections. The plugin has its own built-in MCP server at `/wp-json/tr-ai-toolkit/mcp`. MCP Adapter is only required for STDIO transport (Claude Desktop). It is auto-installed on plugin activation.
  315. **Which AI clients work?**
  316. Any MCP 2025-11-25 or 2026-07-28 compliant client: Claude.ai Projects, Claude Desktop, Cursor, Windsurf, Codeium and others.
  317. **How do I authenticate?**
  318. WordPress Application Passwords (built into WP 5.6+). Use Quick Connect in the admin to generate one automatically, or create one at Users → Profile → Application Passwords.
  319. **Is write access safe?**
  320. Yes. Create/update/delete operations require `edit_posts` or `upload_files`. Admin operations (plugins, theme, users) require `manage_options`. Read-only operations require `read`. Post deletion moves to trash only — no permanent deletion.
  321. **Which SEO plugins are supported?**
  322. Yoast SEO, Rank Math, and All in One SEO Pack are auto-detected. The plugin reads SEO metadata from whichever plugin is active.
  323. **Does this work on WordPress Multisite?**
  324. Single-site only. Multisite support is planned for a future release.
  325. **Where is the MCP endpoint URL?**
  326. `https://your-site.com/wp-json/tr-ai-toolkit/mcp`. The exact URL for your site is shown in **TR AI Toolkit → Connection Guide**.
  327. ---
  328. ## Changelog
  329. See [CHANGELOG.md](CHANGELOG.md) for the full version history.
  330. ---
  331. ## Contributing
  332. See [CONTRIBUTING.md](CONTRIBUTING.md).
  333. ---
  334. ## License
  335. [GPL-2.0-or-later](https://www.gnu.org/licenses/gpl-2.0.html) © [True Response Softech Pvt. Ltd.](https://trsoftech.com)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.