MCP for J add-on

MCP for FlexBanners

Manage your banner ads from your AI client

FreeJoomla 5Joomla 6 v1.0.1
Free

Free download. GPL, the same license as Joomla.

MCP 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 J โ†’ 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.

Recent changes

Version 1.0.1 20 Oct 2026
  • Renamed to "System - MCP for FlexBanners" in Extensions โ†’ Plugins (was "System - MCP for Joomla: FlexBanners add-on"). The new name follows the Joomla Extensions Directory's naming rules. Only the displayed name changes: the plugin's element, folder and update channel are the same, so updates keep working.
  • Every PHP file now carries a GPL licence notice (GNU General Public License version 2 or later).
  • Removed the non-standard <php_minimum> element from the manifest. Joomla never read it from there. The minimum PHP version is still published by the update server, which is where Joomla checks it.
  • No tool behaves differently.
Version 1.0.0 19 Oct 2026

First release. 26 tools for FlexBanners (com_flexbanners + mod_flexbanners) by Inch Hosting. Studied against FlexBanners 5.1.10 and checked against 6.0.05 (same schema, different module behaviour). Driven end-to-end on Joomla 6.2.0 / PHP 8.3, including banners rendering, rotating and counting clicks on the front end.

New

  • Diagnostics โ€” check_flexbanners_health, query_flexbanners_table.
  • Locations (ad groups) โ€” list_flexbanners_locations, create_flexbanners_location, update_flexbanners_location, delete_flexbanners_location.
  • Modules โ€” create_flexbanners_location_module (a new location and a cloned mod_flexbanners module in ONE call: "add another row of ads"), list_flexbanners_modules, update_flexbanners_module.
  • Banners โ€” list_flexbanners, get_flexbanner, create_flexbanner, update_flexbanner, set_flexbanner_state, reset_flexbanner_counters, delete_flexbanner.
  • Click-through links โ€” list_flexbanners_links, create_flexbanners_link, update_flexbanners_link.
  • Clients โ€” list_flexbanners_clients, create_flexbanners_client, update_flexbanners_client.
  • Size presets โ€” list_flexbanners_sizes, create_flexbanners_size, update_flexbanners_size.
  • Reports โ€” get_flexbanners_stats (impressions, clicks and CTR per banner, location and client).

Architecture

  • Every banner tool explains whether the banner will actually show, using the same rules as mod_flexbanners: published and not finished, an existing size and category (both INNER JOINed), a category visitors can see, language * or the site default, and a published, positioned module showing its location. When it will not show, it says exactly why.
  • Writes are targeted SQL of the named columns. FlexBanners' own banner save() cannot be driven from outside its admin form: it reads the request, mis-keys category/article restrictions, always clears "finished", and turns a category id it does not recognise into a new category.
  • Module rows go through Joomla's own module model (asset, menu assignment, cache), and module settings are changed by rewriting only the named params, so position and menu assignment are never touched.
  • Free, because FlexBanners is free.

FlexBanners behaviour worth knowing

  • On Joomla 6, FlexBanners (5.1.10 and 6.0.05) needs the "Behaviour - Backward Compatibility 6" plugin. Without it the component dies silently on load and the module fails with Class "JRoute" not found; any page showing a banner breaks. check_flexbanners_health detects both. These MCP tools are unaffected because they never boot the component.
  • One module shows one location, so several rows of ads means several locations and several modules.
  • 5.1.x never enforces end dates or impression/click limits. 6.x enforces them on every page view, and also re-publishes any unfinished banner whose start date has passed.
  • The language test uses the site's default language, not the language of the page.
  • Clicks are counted for every request, bots included; only impressions are bot-filtered.
  • There is no per-day statistics table: the counters are lifetime totals.
  • A size preset's "max file size" is stored but never enforced.
  • Article restrictions saved in the FlexBanners admin are stored as article id 0 and never work; update_flexbanner writes them correctly.

Build

  • Requires PHP 8.2+ and MCP for Joomla. Installs disabled, with an explanation, when MCP for Joomla is not present, and clears Joomla's caches after install.
Log in to comment

Add comment

Submit