| 开发者 | airano |
|---|---|
| 更新时间 | 2026年5月11日 01:20 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
php://input, which bypasses the upload_max_filesize PHP limit (still bounded by post_max_size). Unlocks reliable hero-image and large-asset uploads for AI-agent workflows.upload_max_filesize for AI-agent uploadsairano-mcp-bridge/v1)
GET/POST /wp-json/airano-mcp-bridge/v1/posts/{id}/seo — Post SEO dataGET/POST /wp-json/airano-mcp-bridge/v1/pages/{id}/seo — Page SEO dataGET/POST /wp-json/airano-mcp-bridge/v1/products/{id}/seo — Product SEO data (WooCommerce)GET /wp-json/airano-mcp-bridge/v1/status — Plugin status + active SEO pluginsairano-mcp/v1, added in 2.0.0)
GET /wp-json/airano-mcp/v1/upload-limits — Effective PHP + WP upload limitsPOST /wp-json/airano-mcp/v1/upload-chunk — Raw-body media upload (bypasses upload_max_filesize)GET /wp-json/airano-mcp/v1/capabilities — Effective capabilities + feature flags + available routes (added in 2.1.0)POST /wp-json/airano-mcp/v1/bulk-meta — Batch post/product meta writes in a single HTTP round-trip (added in 2.2.0)GET /wp-json/airano-mcp/v1/export — Structured JSON export: posts, pages, products + media + terms + meta, with post_type/status/since/limit/offset paging (added in 2.3.0)POST /wp-json/airano-mcp/v1/cache-purge — Auto-detects active cache plugins (LiteSpeed, WP Rocket, W3TC, Super Cache, Fastest Cache, SG Optimizer) and invokes their purge API; always flushes object cache (added in 2.4.0)POST /wp-json/airano-mcp/v1/transient-flush — Native transient cleanup with scope=expired/all/pattern (glob); optional site-transient handling on multisite (added in 2.5.0)GET /wp-json/airano-mcp/v1/site-health — Unified site-health snapshot: PHP/MySQL/WP versions, extensions, disk free, active plugins + theme, writability checks (added in 2.6.0)GET|POST|DELETE /wp-json/airano-mcp/v1/audit-hook — Configure + query a webhook that forwards WordPress action events to MCP Hub (HMAC-SHA256 signed, non-blocking) (added in 2.7.0)POST /wp-json/airano-mcp/v1/regenerate-thumbnails — Regenerate attachment sub-sizes via wp_generate_attachment_metadata for a list of IDs or in paged batch mode (added in 2.8.0)POST /wp-json/airano-mcp/v1/upload-and-attach — Raw-body upload + metadata + attach-to-post + set-featured in a single REST call (added in 2.9.0). Query params: attach_to_post, set_featured, title, alt_text, caption, description. Permission: upload_files + edit_post on the target post.airano-mcp-bridge folder to /wp-content/plugins/Rank Math SEO and Yoast SEO. The plugin auto-detects which one is active.
Yes. Product SEO endpoints are available when WooCommerce is active.
All endpoints require WordPress Application Password authentication. SEO routes require edit_posts. Upload helper routes require upload_files or manage_options.
No. The /airano-mcp/v1/upload-chunk route is a standard authenticated REST endpoint and can be used from any client that can send a raw-binary POST with Content-Disposition and Content-Type headers.
The helper reads the request body via php://input, which is not subject to PHP's upload_max_filesize limit — but it is still bounded by post_max_size and memory_limit. For files larger than post_max_size, MCP Hub falls back to its own server-side chunked session pipeline.
Plugin slugs on wordpress.org are permanent. Existing installs keep working; the display name and feature set are updated in 2.0.0.
Yes. All REST API endpoints work with any application that can make authenticated HTTP requests.
SEO_API_Bridge to Airano_MCP_Bridge per the wp.org "unique prefixes" guideline. The class is only instantiated from this file's bootstrap line and is never referenced by callers (the plugin's public surface is its REST routes, not its PHP class), so this is an internal refactor with no behaviour change.wp-admin/includes/media.php includes from /upload-chunk and /upload-and-attach. The code only uses helpers from file.php (wp_tempnam, wp_handle_sideload) and image.php (wp_generate_attachment_metadata) — media.php was a needless direct core include./upload-and-attach permission_callback into its own method (require_upload_and_attach_capability) that explicitly enforces current_user_can('edit_post', $attach_to_post) at the route gate when attach_to_post is supplied (no longer hidden inside the callback body), and rejects set_featured requests that don't include a target post.capabilities and site-health routes now share a single source of truth for the routes bitmap (previously duplicated with conflicting values for audit_hook and missing upload_and_attach). Both endpoints now read from the shared route-map constant.POST /wp-json/airano-mcp/v1/upload-and-attach now honours an Idempotency-Key request header. A retry within 24 hours with the same key returns the already-created attachment (_idempotent_replay: true) rather than creating a duplicate -2.webp orphan. Protects against client-timeout regressions where a successful upload was retried because the response was lost.POST /wp-json/airano-mcp/v1/upload-and-attach — same raw-body semantics as /upload-chunk, but accepts query params (attach_to_post, set_featured, title, alt_text, caption, description) and applies them in one PHP round-trip. Saves 2-3 REST calls per upload. Per-target permission enforced via current_user_can('edit_post', attach_to_post).status + capabilities routes now advertise upload_and_attach: true alongside the existing capability flags.POST /wp-json/airano-mcp/v1/regenerate-thumbnails — rebuild attachment sub-sizes via wp_generate_attachment_metadata() after an upload or format conversion changes source pixels. Supports two modes: { "ids": [...] } for targeted regeneration (up to 50 per call) and { "all": true, "offset": N, "limit": M } for paged batches (max 50 per page, with has_more + next_offset for pagination). Non-image attachments are skipped; per-item permission check via current_user_can('edit_post', $attachment_id). Permission: upload_files or manage_options.GET|POST|DELETE /wp-json/airano-mcp/v1/audit-hook — configure a webhook that forwards WordPress action events (post transitions, deletions, user events, plugin activations, theme switches) to MCP Hub for unified auditing. Each event is signed with HMAC-SHA256 using a shared secret and posted non-blocking via wp_remote_post so the admin UI stays snappy. Secret is stored in wp_options and never echoed back in GET responses (only the last 4 characters are returned). Permission: manage_options.GET /wp-json/airano-mcp/v1/site-health — single-envelope health snapshot: WordPress version/multisite/locale, PHP version + critical extensions, server software + disk free, MySQL/MariaDB version + charset, active plugins list (with versions), active + parent theme, writability checks (wp-content, uploads) and SSL status. Replaces 5+ separate REST calls with a single request. Permission: manage_options.POST /wp-json/airano-mcp/v1/transient-flush — native PHP transient cleanup. Scopes: expired (default, calls delete_expired_transients()), all (delete every _transient_% row), or pattern (glob match, e.g. rank_math_*). Optional include_site_transients for multisite. Response includes deleted_count + capped deleted_sample for observability. Permission: manage_options.POST /wp-json/airano-mcp/v1/cache-purge — auto-detects active page-cache plugins (LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, WP Fastest Cache, SiteGround Optimizer) and triggers their purge API. Always calls wp_cache_flush() for object caches. Permission: manage_options. Removes the need for Docker-socket + WP-CLI to flush caches on managed hosts.GET /wp-json/airano-mcp/v1/export — structured JSON export of posts, pages, and WooCommerce products (not WXR). Query params: post_type, status, since, limit (max 500), offset, include_media, include_terms, include_meta. Response includes posts + referenced media + taxonomy terms + post meta in a single envelope, plus has_more / next_offset for pagination. Permission: edit_posts.POST /wp-json/airano-mcp/v1/bulk-meta — writes many post_meta / product_meta entries in a single REST request. Capped at 500 items per call; each item is permission-checked via current_user_can('edit_post', $post_id). Null meta values delete the key. Status endpoint now advertises capabilities.bulk_meta = true and the capabilities probe reports routes.bulk_meta = true.GET /wp-json/airano-mcp/v1/capabilities — reports the effective capabilities of the calling application password, plus feature flags (Rank Math / Yoast / WooCommerce / multisite) and the list of companion routes this version actually ships. Consumed by MCP Hub's capability probe so per-user clients only see tools they're actually authorised to use.capabilities.capabilities = true.GET /wp-json/airano-mcp/v1/upload-limits — returns effective PHP + WP upload limits for MCP Hub probes.POST /wp-json/airano-mcp/v1/upload-chunk — raw-body upload route that bypasses upload_max_filesize.capabilities: { seo_meta, upload_limits, upload_chunk }.airano-mcp-bridge (permanent on wordpress.org).