Bỏ qua để đến nội dung
WP & AI content How WordPress content works in MZPanel — fast list reads, the Quick edit drawer, one-click handoff to the owning editor — and how an AI agent manages content through MCP and the REST API.

WP & AI content

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

The content side of a WordPress site lives in its shell (/sites/:serverId/:domain): Posts · Pages (plus one entry per custom post type) · Categories · Tags · Media · Menus · SEO · Settings. Most everyday content work never needs a wp-admin login. Content management is not tier-gated — it is available on all plans.

There is no AI writing surface inside the shell. The old AI Studio entry was removed (2026-11-24; /studio now opens the Overview): AI works on your sites from your own AI tools — Claude Code, Cursor, ChatGPT — through MCP and the REST API, described below.

  1. Open Posts (or Pages). The list is searchable, filterable by status (with counts) and paged on the server.
  2. Click a row to open the Quick edit drawer: title, slug, status and schedule date, excerpt, categories and tags. New creates a draft first and keeps the drawer open on it.
  3. Save writes through WordPress itself, so hooks, slugs and revisions behave as in wp-admin.
  4. To change the body, use Open in editor: MZPanel signs you in with a one-time magic login and opens the editor that owns the content — the page builder for builder pages (Elementor, Divi, …), the WordPress block editor otherwise.
  • Bulk actions — select rows to publish, move to draft or trash (trash always asks).
  • Custom post types — each registered type gets its own read-only list; a row opens in its editor and New opens wp-admin’s new-item screen.
  • Categories / Tags, Media, Menus — see Media, menus & taxonomy.
  • SEO — plugin-free titles, social cards, schema and sitemaps: SEO.
  • Links — broken links, orphans, anchors, redirects: Link Manager.
  • Reads use a fast direct-database list on the box (one query, server-side filter and paging) instead of N WordPress REST calls.
  • Writes dispatch a wp.content job: a WordPress REST call (wp/v2/posts, wp/v2/pages, wp/v2/categories, …) executed locally on the box through the MZPanel mu-plugin bridge, authenticated with a per-site token that never leaves the server. Paths are allowlisted (wp/v2/*, wc/v3/*, a few mzpanel/v1/* routes). The REST proxy only writes posts and pages, which is why custom post types are read-only here.
  • Per-post SEO uses the wp.seo job with the same pattern.

MZPanel manages content only for WordPress sites on servers you connected — there is no remote-site mode.

Terminal window
mz wp example.com content GET wp/v2/posts --json # list posts
mz wp example.com content POST wp/v2/posts \
--data '{"title":"Hello","status":"draft"}' --json # create a draft
mz wp example.com content POST wp/v2/posts/42 --data '{"status":"publish"}' --json
mz wp example.com content GET wp/v2/categories --json # taxonomies
GoalMCP toolREST / job
List posts, pages or any post typewp_posts_listGET /v1/servers/{id}/wp/list?scope=site&domain=<site>
Categories / tagswp_terms_list (taxonomy=categories|tags)GET /v1/servers/{id}/wp/terms?scope=site&domain=
Media librarywp_media_listGET /v1/servers/{id}/wp/media?scope=site&domain=
Userswp_users_listGET /v1/servers/{id}/wp/users?scope=site&domain=
Create / update / trash contentjobs_createwp.content {domain, method: GET|POST|PUT|PATCH|DELETE, path: "wp/v2/posts[/id]", body?}
Per-post SEOjobs_createwp.seo {domain, method, path: "meta/…", body?}
WooCommerce datawc_status, wc_products, wc_orders, wc_customers, wc_coupons, wc_report

The list endpoints require scope=site and domain=<site>; without them they answer 400 "Site scope required". Create content as status: "draft" and let a human publish — MZPanel’s own stance is draft-first. Not available to tokens: wp.login-url (the magic login), so an agent cannot open wp-admin.

WordPress 6.9 added the Abilities API: plugins such as WooCommerce, and WordPress core itself, register named actions (core/get-site-info, product or order actions, …) with an input schema, a permission check and annotations that say whether the action only reads or may delete data. When a site offers an ability for the job, an agent should use it instead of guessing a REST route: the site validates the input and checks permissions itself.

Open the site and pick Manage → Abilities (/sites/:serverId/:domain/abilities).

  1. The page lists every ability the site exposes, grouped by namespace (core, woocommerce, …) or by category, with its label, namespace/name, description and a class badge: Read, Write or Destructive. Search and the class filter narrow the list; the refresh button re-reads it from the site.
  2. Click a row to open its drawer: description, class, and the Input schema and Output schema as JSON.
  3. Run shows a form built from the input schema: text, number, on/off and pick-list fields for simple properties, a JSON box for arrays, nested objects and anything else. Edit as JSON switches to one JSON box for the whole input.
  4. A Read ability runs at once. A Write ability asks you to confirm. A Destructive ability asks you to type its namespace/name first.
  5. The result (pretty JSON, the WordPress user it ran as and the job id) or the site’s error (code included) shows under the button. The dashboard always sends allow equal to the ability’s own class, so an ability that changed class since the list was read is refused.

Dashboard runs act as the site’s administrator; the ability’s own permission check still decides. A team member or client the site is shared with gets the same access checks as for other content jobs: a refusal shows inline. On a site below WordPress 6.9 the page says so instead of a list.

GoalMCP toolREST / job
List the abilities a site exposeswp_abilities_discoverGET /v1/servers/{id}/wp/abilities?domain=<site> · job wp.abilities {domain}
One ability with its input/output schemawp_ability_infoGET /v1/servers/{id}/wp/abilities/info?domain=&name= · job wp.abilities {domain, name}
Run an abilitywp_ability_executePOST /v1/servers/{id}/wp/abilities/execute {domain, name, input?, allow?} · job wp.ability-run

The three calls wait for the site and answer inline ({job_id, result}; 60 s by default, ?wait=1-90). Only abilities their author exposed (meta.show_in_rest, or meta.mcp.public for the WordPress MCP Adapter) are listed. Each has a class from its annotations: read (read-only) needs a Read token, write (not destructive) an Operate token, destructive (destructive, or not annotated at all) an Operate token with the opt-in scope data:delete. allow caps the class one call may run; the site refuses anything above it (403 ability_class_exceeds) before the ability runs. A token’s call runs as the WordPress user MZPanel AI; WordPress core and WooCommerce abilities get administrator rights for that call only, and every ability’s own permission check still decides.

A site below WordPress 6.9 answers 409 abilities_unavailable: use wp.content there. Needs agent 0.2.161 or newer (409 agent_update_required otherwise).

Terminal window
mz wp example.com abilities list --json
mz wp example.com abilities info core/get-site-info --json
mz wp example.com abilities run core/get-site-info --input '{"fields":["name","url"]}' --json
  • SEO needs a saved post. Per-post SEO is keyed by the WordPress post ID.
  • Needs the agent online. Reads and writes go through the agent; offline, the shell shows an “agent offline” banner.
  • Body edits happen in WordPress. The Quick edit drawer never touches post content.