Skip to content

Auto-Posting to Joomla via Cherry Studio and MCP

Cover: auto-posting via Cherry Studio and MCP

TL;DR

My task was to publish two articles daily to a blog on an old Joomla 3.10.12 site. I built a chain of three AI assistants in Cherry Studio + MCP that picks a topic, writes the article, publishes it to the CMS, and submits it for re-indexing to Yandex.Webmaster — all without a single heavyweight orchestrator.

Technology Stack

Technology Role
Cherry Studio Orchestration of three AI assistants
MCP Connecting tools to assistants
Desktop Commander Terminal and file system
Playwright Browser automation of the Joomla admin panel
Python Scripts: topic selection, re-indexing
PowerShell Clipboard insertion, deterministic checks
Yandex.Webmaster API Re-indexing without browser login

Context and Task

I work at a small SEO studio. One of the workflows is regularly filling the blog of a client's site running on Joomla 3.10.12. The plan is simple: two articles a day.

Before automation, the entire process was done manually:

  1. come up with a topic;
  2. write the text in one chat;
  3. move it to another for review;
  4. manually format the article in the Joomla admin panel;
  5. manually submit the page for re-indexing in Yandex.Webmaster.

This is monotonous and time-consuming. The task was to automate the chain — but without bringing in heavyweight orchestrators like n8n or Make. The reasons are simple: the project is small, there's no budget for infrastructure, and I need control over every step.

Solution: Three Assistants Instead of One Pipeline

The key idea is not to try to make one chat do everything, but to split responsibilities across three separate assistants in Cherry Studio:

  1. Headlines — picks the next unused topic from the list;
  2. Copywriter — writes the article on the topic and reviews it before delivery;
  3. Posting — publishes the finished article to the CMS and triggers re-indexing.

Each assistant has its own system prompt and its own set of tools.

A Cherry Studio nuance that isn't obvious

The structure in Cherry Studio is two-level: assistant → topic. Topics within a single assistant use the same system prompt. If you create three "topics" under one assistant expecting different roles — it won't work; all three will behave identically. You need exactly three separate assistants.

Tools

Desktop Commander — Terminal and Files

Gives the assistant access to the file system and command line of the computer. Through it, assistants read and write pipeline files (topic list, drafts, logs) and run Python scripts.

Installation in Cherry Studio on Windows — via the "Quick Create" MCP server:

Command: cmd
Arguments: /c npx -y @wonderwhy-er/desktop-commander

Playwright — Managed Browser

Unlike regular web search (which is essentially curl and doesn't see JS content), Playwright launches a real browser: logs in, clicks, fills forms, waits for dynamic loading. For a Joomla admin panel without a convenient API, this is the only way.

Command: cmd
Arguments: /c npx -y @playwright/mcp@latest --user-data-dir="C:\Users\USERNAME\.playwright-mcp" --output-dir="C:\Users\USERNAME\.playwright-mcp\output"

How It All Connects: File-Based Transfer

Chats in Cherry Studio don't "talk" to each other directly. The transfer medium is a shared folder on disk:

D:\content-pipeline\Liga\
  ├── headlines.csv          — topic list with statuses (unused / in progress / published)
  ├── current-task.txt       — topic handed off for work
  ├── drafts\                — finished reviewed drafts
  ├── published-log.csv      — publication history
  └── .secrets\              — tokens and passwords, separate from the rest

The chain works like this:

  1. The "Headlines" assistant reads the CSV, finds the next free topic, updates the status, and writes the topic to current-task.txt.
  2. The "Copywriter" assistant reads that file, writes the article, and saves it to drafts/.
  3. The "Posting" assistant takes the file from drafts/, publishes it, and updates published-log.csv.

Problems I Encountered

1. npx Not Visible from GUI Applications

GUI applications on Windows don't always see npx directly due to PATH inheritance quirks. The solution is to wrap the command in cmd /c, otherwise the MCP server simply won't start.

2. Playwright Tried to Write to Program Files

By default, Playwright's working folder can coincide with Cherry Studio's installation directory (C:\Program Files\...), where Windows doesn't allow writing without administrator rights. I didn't run everything as administrator (that's an extra risk with a connected terminal), but explicitly specified working directories with the --user-data-dir and --output-dir flags in the user folder.

3. "Leakage" of Service Citations into the Text

The copywriter sometimes inserted service fragments like [citation ...] into the text — an artifact of the model's citation mechanism. This can't be reliably fixed with a prompt: a model that mistakenly inserts a tag may equally miss it during self-check — it's the same blind spot.

A working solution is a deterministic check via the terminal before publishing:

Select-String -Path "path\to\draft.html" -Pattern "\[citation|\[cite|【|†"

If a pattern is found — publication stops. This is a separate, model-independent layer of protection.

4. Inserting HTML into Joomla's CodeMirror Editor

The content field turned out to be not a regular textarea, but a CodeMirror-based editor. Regular programmatic insertion via fill() works unreliably with it.

A working method: write the HTML to the clipboard via PowerShell (explicitly with UTF-8 encoding, otherwise Cyrillic gets corrupted), click into the editor, paste with Ctrl+V, then call CodeMirror's internal save() — so the content syncs with the hidden textarea that actually goes to the server.

5. "Save as Copy" Instead of Creating from Scratch

After the first full run, it turned out: existing site articles have hidden fields (e.g., the alternative text for the "Read More" button instead of the default English "Read More"), which are easy to forget when creating an article from scratch.

The solution is the "Save as Copy" function in Joomla: open the last published article, duplicate it, and change only the title, alias, and content. The rest of the fields are inherited from the working template. This eliminated a whole class of "forgotten fields" with one architectural decision rather than point patches.

Security: Where I Avoided the Browser

For page re-crawling, browser automation for logging into Webmaster was not used — it's a sensitive service, and passing a password through clicks is impractical. Instead, the official REST API was used:

POST https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/recrawl/queue
Body: {"url": "https://example.com/page"}

The token is obtained once via Yandex's OAuth application (valid for 6 months). Then a simple Python script sends the URL for accelerated re-indexing, either individually or as a list. The token is stored in a separate .secrets/ file outside the shared content folder.

A rule that paid off

Where a service has an official API — use it instead of browser automation. The API is more reliable (doesn't break from layout changes) and safer (doesn't send passwords through clicks).

Final Scheme

flowchart LR
    A["Headlines Assistant<br>Desktop Commander"] -->|current-task.txt| B["Copywriter Assistant<br>Desktop Commander"]
    B -->|drafts/*.html + self-check| C["Posting Assistant<br>Desktop Commander + Playwright"]
    C -->|publish to Joomla| D[Yandex.Webmaster API]
    D -->|recrawl.py| E[Re-indexing]

Result

The chain works. It can't be called fully autonomous — switching between the three assistants is still manual, and that's a deliberate choice: at each stage I can check the result with my own eyes before moving on. For a daily volume of two articles, manual switching takes a couple of minutes and doesn't create a bottleneck.

The main achievement is not speed, but predictability: an article no longer gets lost between chats, the format is always the same, re-indexing runs automatically, and no draft with service junk goes into publication.

What I Learned

  1. Don't cram everything into one chat. Splitting into narrow roles proved more reliable than a single "universal" assistant.
  2. Don't trust the model where determinism is needed. Checks for service junk — with code, not a prompt.
  3. Look for an API before launching a browser. This saves time.
  4. Files are a simple and reliable bridge between assistants when there's no shared backend.

What's Next

The next candidates for automation: generating illustrations via browser (similar to Playwright for the admin panel) and logging publications to the team's task tracker via its API.

See Also