Advanced Content Editor
Premium add-on that turns the free MxChat AI Content Generator into a publish-ready production tool. Adds programmatic SEO bulk generation, smart internal linking, AI image management, Google Search Console integration, and a headless REST API.
Overview
The free MxChat Content Generator produces full blog posts and landing pages with AI-generated images, live preview, and inline editing. Advanced Content Editor unlocks the locked PRO features inside that same editor: CSV-driven bulk page generation (programmatic SEO), automatic internal linking, full image management (upload/replace/regenerate), per-field meta generation that syncs to Rank Math / Yoast / AIOSEO, one-click AI SEO fixes, live Google Search Console data per post, surgical tool-based editing, and a bearer-token REST endpoint for headless automations. It's for site owners running content programs at scale and for engineers wiring MxChat into n8n, Zapier, or custom AI agents. Requires the free mxchat-basic plugin plus an active MxChat Pro license.
Setup
- Upload
mxchat-advanced-content.zipvia Plugins → Add New → Upload Plugin, or drop the folder into/wp-content/plugins/. - Activate via Plugins → Installed Plugins. The add-on will warn you if
mxchat-basicisn't active or if MxChat Pro isn't licensed. - Confirm Pro is active at MxChat → Activation. Without an active license, the add-on shows a notice and loads zero features.
- Open MxChat → Content (the existing Content Generator admin). The previously-locked PRO sections — Meta tab, Images panel actions, SEO panel, Templates, Calendar — are now unlocked.
- To connect Google Search Console, go to MxChat → Content → Settings and click Connect Google Search Console. OAuth runs through a Firebase Cloud Function proxy — Google credentials never touch the WordPress database. After redirect, pick the property to use.
- For first programmatic-SEO import, open the Templates tab on the Content page, upload a CSV (column headers become
{placeholder}variables), pick template-mode or AI-mode, and preview the first five expansions before generating.
Settings
All settings live at MxChat → Content → Settings (the free plugin's settings page; this add-on adds rows and unlocks fields).
Content Model
Picks which AI model runs body generation, meta generation, AI editing, and SEO optimization. Supports OpenAI (GPT-5.2 / 5.1 / 5), Anthropic (Claude Opus 4.6, Sonnet 4.6, Haiku 4.5), Google (Gemini 3 Pro, 2.5 Pro), and xAI (Grok 4, 4.1 Fast, Code Fast). Same model is used by per-field AI buttons in the Meta tab.
Image Model
Which model generates and re-generates images. Options: OpenAI GPT Image 1.5 (1536x1024 PNG), xAI Grok 2 Image (URL-based), Google Gemini (inline base64, 16:9). Default: whatever you set in core MxChat settings.
Enable Internal Linking
Toggle that activates the smart internal linking funnel for blog posts only (landing pages skip it). When on, every AI-generated post pulls up to 20 candidate posts from your existing content and tells the model to weave in 3-5 natural links.
Tool Use for AI Editing
Toggle that switches AI editing from full-page rewrites to surgical str_replace calls. Off by default for older models; on by default for the supported model list (GPT-5.x, Claude 4.5/4.6, Gemini 3 Pro / 2.5 Pro, Grok 4).
AI Auto-Optimize Checks
Checkboxes that pick which optimizations run when you click AI Auto-Optimize on a post: Readability, Internal Links, Image ALT Text, Featured Image. Each can also be run individually from the SEO detail panel.
Connect Google Search Console
Button that kicks off OAuth. After authorizing, select which Search Console property to bind. Once connected, clicks/impressions columns appear in the SEO table and per-post search data appears in the SEO detail panel. Disconnect any time to wipe tokens.
Business Info
Free-form text describing your product/service. Used by the Content Calendar to generate a contextually-relevant 30-day plan.
Features
- Programmatic SEO (CSV bulk generation): Upload a CSV and generate hundreds of unique pages — template mode replaces
{placeholders}from existing pages instantly (no AI tokens), AI mode writes original content for every row. Supports spintax{best|top|leading}, custom slug templates like{service}-in-{city}, section structure templates, duplicate-slug detection, scheduled publishing, and queues up to 500 rows. - Smart Internal Linking: When generating a blog post, the add-on searches your existing posts for up to 20 candidates by keyword and title-word match, then injects them into the AI prompt with instructions to link to 3-5 naturally. Uses real permalinks — no hallucinated URLs — and only fires for posts, not landing pages.
- Full AI Image Management: Every image in a generated post gets Upload (pick from Media Library) and Regenerate (re-roll with original or new prompt) actions. The old URL is swapped everywhere it appears, including custom CSS background-images. Generation uses your configured image model; original prompts are stored as
_mxchat_image_promptattachment meta so re-rolls always have context. - SEO + Meta Management: The Meta tab unlocks four editable fields (Title, Meta Description with 160-char counter, Focus Keyword, Excerpt) with 800ms-debounce auto-save. Each field has a purple AI button that opens a targeted chat-mode banner — describe what you want or send empty to auto-generate, and only the chosen field updates. Auto-syncs to Yoast (
_yoast_wpseo_metadesc,_yoast_wpseo_focuskw), Rank Math (rank_math_description,rank_math_focus_keyword), and AIOSEO (_aioseo_description). - Google Search Console Integration: After OAuth, every post shows clicks / impressions / CTR / average position plus a table of top search queries with color-coded rankings (1-10 green, 11-20 yellow, 21+ red). The main SEO table gains clicks and impressions columns synced to post meta for server-side sorting. Data is cached for 6 hours per post; force-refresh on demand. Last 28 days of search activity.
- Tool-Based Editing: AI editing switches from "rewrite the whole page" to surgical
str_replacetool calls — the AI finds and replaces only the specific text you asked about. Faster, fewer tokens, and avoids accidentally altering unrelated content. Multi-part edits run sequentially; aread_contenttool lets the model verify state between edits. Capped at 30 iterations per edit. Falls back to full rewrite when disabled or for unsupported models. - AI SEO Optimization: One-click actions on any post from the SEO panel — Readability (rewrites for shorter sentences, simpler words, active voice while preserving HTML/images/links), Internal Links (inserts contextual links to existing posts), Image ALT Text (fills missing alt attributes), Featured Image (generates and sets one). AI Auto-Optimize runs all enabled checks in batch. Skips Elementor/Divi/WPBakery/Beaver Builder content to avoid corrupting page-builder structures.
- Bearer-token REST API: A
POST /wp-json/mxchat-adv/v1/generate-contentendpoint runs the full generator pipeline (body, images, internal linking, meta, focus keyword) synchronously and returns the post details — designed for AI agents, n8n / Zapier / Make, and CI pipelines that need to publish without an admin session. Defaultspost_statustodraftfor safety; also supportspublishandfuturewithschedule_date.
API & Integration
REST Endpoints
Namespace: mxchat-adv/v1.
GET /wp-json/mxchat-adv/v1/health— No auth. Returns{ ok, token_configured, core_generator_loaded, plugin_version }. Use this for connectivity checks before firing a generation request.POST /wp-json/mxchat-adv/v1/generate-content— Bearer-token auth. Runs full content generation synchronously. Returns{ success, post_id, post_url, edit_url, post_title, post_status, images, meta, progress_key }.
Authentication
Single shared secret stored in the mxchat_adv_api_token WordPress option. No admin UI — manage via WP-CLI. Set initially or rotate with:
wp option update mxchat_adv_api_token "$(openssl rand -hex 32)"
Rotation is instantaneous (no grace period). Token comparison uses hash_equals() for constant-time safety. Until a token is set, the endpoint returns HTTP 500 with rest_token_unset. Delete the option to disable the endpoint entirely:
wp option delete mxchat_adv_api_token
Request body (JSON)
| Field | Required | Default | Notes |
|---|---|---|---|
| prompt | yes | — | Topic and instructions for the post. |
| post_status | no | draft | draft / publish / future. |
| content_type | no | post | post or page. |
| schedule_date | no | — | YYYY-MM-DD HH:MM:SS (required when post_status=future). |
| layout | no | fullwidth | fullwidth or sidebar. |
| title_display | no | hide | show or hide. |
| template_mode | no | off | on or off. |
| custom_system_prompt | no | — | Override for the system prompt. |
Example:
curl -X POST https://example.com/wp-json/mxchat-adv/v1/generate-content \
-H "Authorization: Bearer $MXCHAT_ADV_TOKEN" \
-H "Content-Type: application/json; charset=utf-8" \
-d @body.json
SEO plugin sync
Detected on plugin load. Sync fires on both manual saves and AI-generated updates.
- Yoast SEO —
_yoast_wpseo_metadesc,_yoast_wpseo_focuskw - Rank Math —
rank_math_description,rank_math_focus_keyword - All in One SEO —
_aioseo_description
If you edit fields directly in Yoast/Rank Math after the add-on syncs them, your manual edits win — sync only happens when you save or generate through the Content Generator.
WordPress filter
mxchat_content_pro_feature — the add-on hooks this filter to unlock pro features in the Content Generator UI. Unlocked feature keys: internal_linking, image_management, meta_management, tool_use, seo_readability, seo_internal_links, seo_img_alt, seo_featured_img, gsc_integration, content_calendar, template_generator.
Requirements
- MxChat (mxchat-basic): Required and active. Free on WordPress.org.
- MxChat Pro License: Required. Without an active license the add-on loads only the admin notice. See /pricing/.
- WordPress: 5.0 or newer.
- PHP: 7.2 or newer.
- Google Search Console OAuth: Required only for the GSC integration feature. Uses Google account auth via Firebase Cloud Function proxy.
- AI provider API key: An OpenAI / Anthropic / Google / xAI key configured in core MxChat settings drives all AI features (body, meta, editing, SEO optimization, image generation).
- WP-CLI (optional): Needed to set the REST API bearer token. Direct DB option-table edits also work.
Troubleshooting
Image generation fails or hangs
Open Tools → Site Health → Info and verify your AI provider key is set and not rate-limited. The image model is configured separately from the content model in MxChat → Content → Settings. If using OpenAI GPT Image 1.5, your key must have image-generation access enabled in the OpenAI dashboard. If posts hang at "generating images", your hosting may be killing the PHP request before generation finishes — set set_time_limit(300) is already applied by the REST path, but admin-AJAX paths are limited by your server's max_execution_time.
Image regenerate button does nothing
The Image Manager attaches via a MutationObserver to the image grid. If you've heavily customized the admin styling, the .mxg- class prefixes may have been stripped. Open the browser console — a missing observer logs MxChat: image grid container not found. Clear any page-builder admin overrides on the Content page.
Google Search Console connection succeeds but no data appears
Confirm you selected the correct property after OAuth (the property selector appears after redirect — easy to miss). Visit MxChat → Content → Settings and confirm the connected property matches the site domain. If it does, click the refresh button in the per-post SEO panel — data is cached for 6 hours, and fresh OAuth doesn't auto-prime the cache.
"Invalid grant" or "redirect_uri mismatch" during GSC OAuth
The OAuth proxy runs on a Firebase Cloud Function with a fixed redirect URL. If you're behind a corporate firewall blocking *.cloudfunctions.net, OAuth will fail mid-flow. Try from a different network, or contact support to whitelist the proxy endpoint.
REST endpoint returns rest_token_unset
The mxchat_adv_api_token option is empty. Set it via WP-CLI: wp option update mxchat_adv_api_token "$(openssl rand -hex 32)". There is no admin UI for this — by design, to keep the token out of any settings page or audit log.
REST endpoint returns HTTP 524 even though the post was created
Cloudflare on Free/Pro plans severs proxied connections at 100 seconds. Image-heavy posts often take 100-180s. The post still gets created server-side. Two workarounds: (1) bypass Cloudflare for that one request using curl's --resolve flag, or (2) look up the most recent draft after a 524 with wp post list --post_status=draft --orderby=date --order=desc --posts_per_page=1 and don't re-fire (you'll duplicate).
REST JSON body rejected as malformed UTF-8
WordPress's REST parser rejects curly quotes and non-UTF-8 em-dashes. Always send Content-Type: application/json; charset=utf-8 and write the body to a file (-d @body.json) instead of inlining on the shell to dodge quoting issues.
Bulk CSV generation invents {date} or {year} placeholders
Fixed in 1.5.1 — AI bulk mode now restricts placeholders to CSV headers only. If you're on an older version, upgrade. The free Content Generator does not have this guard.
Internal links aren't being added to landing pages
By design. Internal linking only fires for blog posts (post type), not landing pages, since it's a blog SEO strategy. Use the Programmatic SEO templates or AI Auto-Optimize → Internal Links to seed links into landing pages manually.
Last reviewed by Sage on 2026-05-21. Spotted an issue? Open a ticket and we'll patch the doc.