fix(qa): SEO API Bridge fixes, transport type corrections, README improvements

- Fix SEO API Bridge branding, meta keys, route namespaces, GET auth
- Create WordPress.org-compatible readme.txt
- Fix transport types across all docs (streamableHttp/http, not sse)
- Add WordPress Plugin Requirements section to README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-18 19:42:32 +03:30
parent 809dc264af
commit 91979ee18d
9 changed files with 178 additions and 55 deletions

View File

@@ -31,7 +31,7 @@ SEO API Bridge is a comprehensive WordPress plugin that exposes Rank Math SEO an
#### Core Fields
- `rank_math_focus_keyword` - Focus keyword
- `rank_math_seo_title` - Meta title
- `rank_math_title` - Meta title
- `rank_math_description` - Meta description
- `rank_math_additional_keywords` - Additional keywords
@@ -94,7 +94,7 @@ SEO API Bridge is a comprehensive WordPress plugin that exposes Rank Math SEO an
2. Go to WordPress Admin → Plugins
3. Find "SEO API Bridge" and click "Activate"
### Method 3: WP-CLI (Recommended for Coolify)
### Method 3: WP-CLI
```bash
# Via SSH to your WordPress container
@@ -107,48 +107,48 @@ wp plugin activate seo-api-bridge
### Status Endpoint
**GET** `/wp-json/seo-bridge/v1/status`
**GET** `/wp-json/seo-api-bridge/v1/status`
Check plugin status and detected SEO plugins.
```bash
curl https://yoursite.com/wp-json/seo-bridge/v1/status
curl https://yoursite.com/wp-json/seo-api-bridge/v1/status
```
### Post SEO Endpoints
**GET** `/wp-json/seo-bridge/v1/posts/{id}/seo`
**GET** `/wp-json/seo-api-bridge/v1/posts/{id}/seo`
Get SEO metadata for a post.
**POST** `/wp-json/seo-bridge/v1/posts/{id}/seo`
**POST** `/wp-json/seo-api-bridge/v1/posts/{id}/seo`
Update SEO metadata for a post.
```bash
curl -X POST https://yoursite.com/wp-json/seo-bridge/v1/posts/123/seo \
curl -X POST https://yoursite.com/wp-json/seo-api-bridge/v1/posts/123/seo \
-H "Content-Type: application/json" \
-d '{"focus_keyword": "wordpress", "seo_title": "My Title"}'
```
### Page SEO Endpoints
**GET** `/wp-json/seo-bridge/v1/pages/{id}/seo`
**GET** `/wp-json/seo-api-bridge/v1/pages/{id}/seo`
**POST** `/wp-json/seo-bridge/v1/pages/{id}/seo`
**POST** `/wp-json/seo-api-bridge/v1/pages/{id}/seo`
### Product SEO Endpoints (WooCommerce)
**GET** `/wp-json/seo-bridge/v1/products/{id}/seo`
**GET** `/wp-json/seo-api-bridge/v1/products/{id}/seo`
Get SEO metadata for a WooCommerce product.
**POST** `/wp-json/seo-bridge/v1/products/{id}/seo`
**POST** `/wp-json/seo-api-bridge/v1/products/{id}/seo`
Update SEO metadata for a WooCommerce product.
```bash
curl -X POST https://yoursite.com/wp-json/seo-bridge/v1/products/1217/seo \
curl -X POST https://yoursite.com/wp-json/seo-api-bridge/v1/products/1217/seo \
-H "Content-Type: application/json" \
-d '{"focus_keyword": "product keyword", "seo_title": "Product Title"}'
```
@@ -190,7 +190,7 @@ await mcp.wordpress_update_product_seo({
"title": {"rendered": "My Post"},
"meta": {
"rank_math_focus_keyword": "wordpress seo",
"rank_math_seo_title": "Complete SEO Guide",
"rank_math_title": "Complete SEO Guide",
"rank_math_description": "Learn WordPress SEO best practices..."
}
}
@@ -210,7 +210,7 @@ GET /wp-json/wp/v2/posts/{id}
"title": {"rendered": "My Post"},
"meta": {
"rank_math_focus_keyword": "wordpress seo",
"rank_math_seo_title": "Complete WordPress SEO Guide",
"rank_math_title": "Complete WordPress SEO Guide",
"rank_math_description": "Learn how to optimize your WordPress site...",
"rank_math_facebook_title": "SEO Guide for Facebook",
"rank_math_twitter_card_type": "summary_large_image"
@@ -229,7 +229,7 @@ Content-Type: application/json
{
"meta": {
"rank_math_focus_keyword": "wordpress optimization",
"rank_math_seo_title": "WordPress Optimization Tips",
"rank_math_title": "WordPress Optimization Tips",
"rank_math_description": "Discover the best practices for WordPress optimization"
}
}
@@ -255,7 +255,7 @@ POST /wp-json/wp/v2/products/{id}
## Usage with MCP Server
This plugin is designed to work with the [Coolify Projects MCP Server](https://github.com/your-repo/mcphub).
This plugin is designed to work with the [MCP Hub](https://github.com/airano-ir/mcphub).
### Example MCP Tool Usage
@@ -397,8 +397,8 @@ curl -X GET "https://your-site.com/wp-json/wp/v2/posts/1" \
## Support
For issues related to:
- **This plugin:** [GitHub Issues](https://github.com/your-repo/mcphub/issues)
- **MCP Server:** [MCP Server Documentation](https://github.com/your-repo/mcphub)
- **This plugin:** [GitHub Issues](https://github.com/airano-ir/mcphub/issues)
- **MCP Server:** [MCP Server Documentation](https://github.com/airano-ir/mcphub)
- **Rank Math SEO:** [Rank Math Support](https://rankmath.com/support/)
- **Yoast SEO:** [Yoast Support](https://yoast.com/help/)
@@ -425,4 +425,4 @@ MIT License - See LICENSE file for details
## Credits
Developed for use with Coolify Projects MCP Server to enable AI-powered SEO content management.
Developed for use with MCP Hub to enable AI-powered SEO content management.

View File

@@ -0,0 +1,82 @@
=== SEO API Bridge ===
Contributors: airano
Tags: seo, rest-api, rank-math, yoast, mcp
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.3.0
License: MIT
License URI: https://opensource.org/licenses/MIT
Exposes Rank Math SEO and Yoast SEO meta fields via WordPress REST API for use with MCP servers and AI agents.
== Description ==
SEO API Bridge is a WordPress plugin that exposes Rank Math SEO and Yoast SEO meta fields via dedicated REST API endpoints. This enables MCP servers, AI agents, and other applications to read and write SEO metadata programmatically for posts, pages, and WooCommerce products.
**Features:**
* **Rank Math SEO Support** — Full access to all Rank Math meta fields
* **Yoast SEO Support** — Full access to all Yoast SEO meta fields
* **WooCommerce Compatible** — Works with product post types
* **Secure** — Requires WordPress Application Password and edit_posts capability
* **Auto-Detection** — Automatically detects which SEO plugin is active
* **Status Endpoint** — Dedicated API endpoint for plugin and SEO detection
* **Zero Configuration** — Works out of the box after activation
**REST API Endpoints:**
* `GET/POST /wp-json/seo-api-bridge/v1/posts/{id}/seo` — Post SEO data
* `GET/POST /wp-json/seo-api-bridge/v1/pages/{id}/seo` — Page SEO data
* `GET/POST /wp-json/seo-api-bridge/v1/products/{id}/seo` — Product SEO data (WooCommerce)
* `GET /wp-json/seo-api-bridge/v1/status` — Plugin status and SEO detection
**Designed for [MCP Hub](https://github.com/airano-ir/mcphub)** — the AI-native management hub for WordPress and self-hosted services.
== Installation ==
1. Upload the `seo-api-bridge` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Ensure either Rank Math SEO or Yoast SEO is active
4. The REST API endpoints are now available
== Frequently Asked Questions ==
= Which SEO plugins are supported? =
Rank Math SEO and Yoast SEO. The plugin auto-detects which one is active.
= Does it work with WooCommerce? =
Yes. Product SEO endpoints are available when WooCommerce is active.
= How is authentication handled? =
All endpoints require WordPress Application Password authentication and the `edit_posts` capability. POST requests require the same capability.
= Can I use this without MCP Hub? =
Yes. The REST API endpoints work with any application that can make HTTP requests with proper WordPress authentication.
== Changelog ==
= 1.3.0 =
* Added REST API endpoints for posts, pages, and products (GET/POST operations)
* Added authentication requirement for all endpoints
* Fixed rank_math_title meta key registration
= 1.2.0 =
* Enhanced WooCommerce product support
* Improved MariaDB compatibility
= 1.1.0 =
* Added status endpoint for plugin detection
* Improved error handling
= 1.0.0 =
* Initial release with Rank Math and Yoast SEO support
== Upgrade Notice ==
= 1.3.0 =
GET endpoints now require authentication (edit_posts capability). Update your API clients if needed.

View File

@@ -1,11 +1,11 @@
<?php
/**
* Plugin Name: SEO API Bridge
* Plugin URI: https://github.com/your-repo/seo-api-bridge
* Plugin URI: https://github.com/airano-ir/mcphub
* Description: Exposes Rank Math SEO and Yoast SEO meta fields via WordPress REST API for use with MCP servers and AI agents. Supports posts, pages, and WooCommerce products with full CRUD operations.
* Version: 1.3.0
* Author: MCP Coolify Projects
* Author URI: https://github.com/your-repo
* Author: MCP Hub
* Author URI: https://github.com/airano-ir
* License: MIT
* Requires at least: 5.0
* Requires PHP: 7.4
@@ -70,7 +70,9 @@ class SEO_API_Bridge {
[
'methods' => 'GET',
'callback' => [$this, 'get_post_seo'],
'permission_callback' => '__return_true',
'permission_callback' => function() {
return current_user_can('edit_posts');
},
'args' => [
'id' => [
'validate_callback' => function($param) {
@@ -100,7 +102,9 @@ class SEO_API_Bridge {
[
'methods' => 'GET',
'callback' => [$this, 'get_page_seo'],
'permission_callback' => '__return_true',
'permission_callback' => function() {
return current_user_can('edit_posts');
},
'args' => [
'id' => [
'validate_callback' => function($param) {
@@ -130,7 +134,9 @@ class SEO_API_Bridge {
[
'methods' => 'GET',
'callback' => [$this, 'get_product_seo'],
'permission_callback' => '__return_true',
'permission_callback' => function() {
return current_user_can('edit_posts');
},
'args' => [
'id' => [
'validate_callback' => function($param) {
@@ -246,7 +252,7 @@ class SEO_API_Bridge {
'description' => 'Rank Math focus keyword',
'single' => true,
],
'rank_math_seo_title' => [
'rank_math_title' => [
'type' => 'string',
'description' => 'Rank Math SEO title (meta title)',
'single' => true,