MCP for J add-on logoMCP for FlexBanners is a free add-on for MCP for J that lets your AI client manage FlexBanners by Inch Hosting. Its 26 tools cover banners, ad locations and the modules that show them, click-through links, clients, size presets and impression and click statistics. Every banner tool also tells you whether that banner will actually appear on your site, and if it won't, which rule is stopping it. FlexBanners itself gives you no hint when a banner quietly drops off the page, so that answer is the part you'll probably use most.

Why this exists

This add-on started on a client site where six rows of ads had to be set up by writing SQL by hand. The job people actually want from FlexBanners is usually "add another row of ads", and in the admin that means creating a location, creating a module, copying its settings across from the first one, putting it in the right position and then moving banners into it. Now it's one sentence to your AI client. The other common question, "why isn't my banner showing?", gets a straight answer instead of an afternoon of checking settings.

What Claude can do

There are 26 tools, grouped roughly the way you'd reach for them.

AreaToolsWhat you can do
Banners7List and read banners, create image, remote-image or custom-code banners, change them, publish or unpublish, reset their counters, and delete a banner once it's in the trash.
Locations4List, create, change and delete the locations (ad groups) banners are shown in. Delete refuses while any banner or module still uses the location.
Modules3Add another row of ads in one call, which creates a new location and a copy of an existing FlexBanners module in the same position, next in order. You can also list the FlexBanners modules and change one's settings without touching its position or menu assignment.
Links3List, create and change the click-through links banners point to.
Clients3List, create and change the advertisers your banners belong to.
Sizes3List, create and change size presets.
Reports1Impressions, clicks and click-through rate per banner, per location and per client.
Diagnostics2A health check that names every banner that isn't showing and why, and a read-only look at FlexBanners' own six tables.

Installing it

You'll need Joomla 5 or 6, PHP 8.2 or later, MCP for J, and FlexBanners itself, which is free. The add-on was built against FlexBanners 5.1.10 and checked against 6.0.05. On Joomla 6, read the next section before you go any further.

  1. Open Components โ†’ MCP for Joomla โ†’ Browse MCP Add-Ons and click Install on this add-on. You can also download the ZIP above and install it through System โ†’ Install โ†’ Extensions.
  2. That's the whole install. The plugin switches itself on, and the tools show up in your AI client the next time it lists them.

If MCP for J isn't installed, the plugin installs switched off and tells you why, rather than leaving you with tools that go nowhere.

On Joomla 6, FlexBanners needs a core plugin switched on

This is about FlexBanners, not about this add-on, but you need to know it before you rely on FlexBanners on a Joomla 6 site. Both FlexBanners 5.1.10 and 6.0.05 depend on older code that Joomla 6 only provides through a core plugin called Behaviour - Backward Compatibility 6. If that plugin is disabled, the FlexBanners component stops silently as it loads, with no error and nothing in the logs. A page showing banners comes back looking normal except that the banners are simply missing. If the module gets there first, the page fails outright with Class "JRoute" not found, and that happens on every page where a FlexBanners module is published.

The fix is to enable Behaviour - Backward Compatibility 6 under System โ†’ Plugins. The MCP tools work either way, because they never load the FlexBanners component, and check_flexbanners_health reports both problems as errors. If you're still on Joomla 5 none of this applies yet, but it's worth running the health check before you upgrade.

Using it

Start with "Check my FlexBanners setup". FlexBanners is strict about what it shows and silent about what it doesn't. A banner needs to be published and not finished, it needs a size and a category that both exist, the category has to be one your visitors are allowed to see, and its language has to be All or your site's default language. That last one catches people, because it's the site default that counts, not the language of the page being viewed. On top of that, the banner's location has to be shown by a published module that's actually in a position. Fail any one of those and the banner just isn't there. The health check and every banner tool apply the same rules and tell you which one failed.

After that, ask for what you want in plain language. "Add another row of ads under the first one and move the two newest banners into it" does exactly that. "Which banners got the most clicks?" and "Point the summer sale banner at the new landing page" both work too. One FlexBanners module shows one location, so several rows of ads always means several locations and several modules stacked in the same position.

A few things about FlexBanners are worth knowing before you build a campaign around them:

  • FlexBanners doesn't create a category when you install it. Your first banner needs one, so create_flexbanner will refuse until a FlexBanners category exists.
  • End dates and impression or click limits depend on the version. FlexBanners 5.1.x never enforces them. 6.x enforces them on every page view, and it also re-publishes any unfinished banner whose start date has passed, so unpublishing one of those only lasts until the next visitor. set_flexbanner_state warns you when that applies and offers to clear the start date.
  • Article restrictions saved in the FlexBanners admin don't work. They're stored against article 0. update_flexbanner writes them correctly.

About the statistics

FlexBanners keeps lifetime totals and nothing else. There's no per-day history behind the counters, so there's no way to ask for last month's clicks, and no add-on can work that out after the fact. If you want figures for a period, note the totals at the start or reset the counters with reset_flexbanner_counters. The totals the add-on reports are the same impression and click columns the FlexBanners admin shows.

Impressions are filtered for bots. Clicks aren't, so every request to a click link counts, and a banner's click-through rate can come out above 100%.

Permissions and security

The tools only work for a logged-in user who has Access Administration Interface on FlexBanners, which is what the FlexBanners admin itself requires, and each change also checks the specific FlexBanners permission it needs. It's checked for the person whose MCP connection makes the request, so your AI client can't do anything that person couldn't do in the admin.

The table viewer is read-only and limited to FlexBanners' own six tables. A banner can only be deleted once it's in the trash, the same rule FlexBanners uses. FlexBanners' own banner save can't be driven from outside its admin form, so the tools write only the columns you asked to change, and module changes go through Joomla's own module code, so module permissions, menu assignment and caching behave the way they do when you save a module yourself.

Why it's free

FlexBanners is free on the Joomla Extensions Directory and has no paid edition, so this add-on is free too.

This is version 1.0.0. All 26 tools were driven end to end on Joomla 6.2.0 with PHP 8.3 against FlexBanners 5.1.10, including banners showing up and counting clicks on the front end, and every change was checked against the database rather than the tool's own report. That testing caught one bug in the health check, which was fixed before release. FlexBanners 6.0.05 has been studied but not installed, so its expiry and re-publishing behaviour is described from its code rather than tested. Multilingual sites, and banners restricted to particular category or article pages, haven't been tried yet either. If your site uses those, start with the health check, and I'd like to hear how it goes.

Open source

GPL-2.0-or-later, the same license as Joomla itself. Source lives on GitHub.


Interesting blog? Like it on Facebook, Post it or share this article on other bookmarking websites.

Written by:
Tim Davis is the founder and owner of Cybersalt.
Log in to comment

Add comment

Submit