GTM4WP 2.1 brings MCP: connect an AI assistant to Google Tag Manager for WordPress
GTM4WP 2.1 lets AI assistants such as Claude or Cursor check how Google Tag Manager for WordPress is set up on your site, through MCP.
GTM4WP 2.1 adds MCP support to Google Tag Manager for WordPress. With the free MCP Adapter plugin installed, an AI assistant such as Claude, Cursor or OpenAI’s Codex can read how GTM4WP is set up on your WordPress site, explain any of its settings and help you find out why tracking does not work. When you approve a change, the assistant can make that change too. The assistant sees what GTM4WP knows about your site, for example its settings and its Site Health report. It does not see the tags inside your GTM container.
The MCP Adapter is now on WordPress.org
On 2 October 2026 the WordPress project added the MCP Adapter plugin to the WordPress.org plugin directory. Before that, it was available only from GitHub or as a copy bundled inside other plugins. Now you can install it from Plugins → Add New Plugin like any other plugin, on any site running WordPress 6.9 or newer.
The Model Context Protocol (MCP) is the standard most AI assistants use to call tools. By itself the adapter knows nothing about any plugin. It offers the assistant the abilities that plugins register with the WordPress Abilities API, which WordPress 6.9 introduced. GTM4WP 2.1 registers eleven of them, and it needs no MCP server of its own: one adapter connection serves every plugin on the site that registers abilities.
What an AI assistant can do with GTM4WP
Six abilities only read: the plugin status, every setting with its description, the Site Health report, a settings export, the stored Google service accounts and the send log of the Google Data Manager integration. Five can change something: they update or import settings, test a service account key, test a Data Manager destination and send failed refunds again. The MCP page lists all eleven.
The assistant does not change anything on its own. Before a change it shows you the old and the new value and waits for your confirmation, and GTM4WP refuses an import or a refund resend unless the call carries that confirmation. Every new value goes through the same checks as the Save button of the settings screen, and options set in wp-config.php cannot be changed.
The abilities never return a service account key, an access token or any data about your visitors and customers. Everything the assistant reads is sent to the AI service it runs on, so connect only sites whose configuration you are willing to share with that service.
Example prompts for your WordPress site
Once the site is connected, you can ask in plain words. These prompts work on a site running GTM4WP 2.1:
- “Is GTM4WP set up correctly on this site? Check Site Health too and tell me what needs attention.”
- “Which GTM container loads on this site, where is the container code placed, and is anything overridden in wp-config.php?”
- “Which supported plugins are installed here, and is GTM4WP tracking all of them?”
- “Purchases stopped showing up in GA4 yesterday. Look at the GTM4WP settings of this shop and tell me which of them could explain it.”
- “Which order statuses trigger the purchase event in this shop?”
- “Explain what ‘Clear ecommerce object before new event’ does. Should I turn it on for this site? If yes, turn it on.”
- “Is my Google service account key still working?”
- “Did any refund fail to reach Google Analytics this week? Tell me why, then send the failed ones again.”
- “Export the GTM4WP settings of my staging site and import them on this site.” (This one needs both sites connected to the assistant.)
The purchase and order status prompts apply to WooCommerce and Easy Digital Downloads shops, and the refund prompt needs the Google Data Manager integration. GTM4WP cannot read the tags in your GTM container or your GA4 reports, so you still need to check those yourself.
How to connect your assistant with the MCP Adapter
- Update GTM4WP to 2.1 on a site running WordPress 6.9 or newer.
- Install and activate the MCP Adapter plugin from WordPress.org.
- Create an application password for an administrator under Users → Profile.
- Add the endpoint of your site to your assistant.
The setup section of the MCP page has the configuration for Claude Code, Codex, Claude Desktop and Cursor. I tested the connection on WordPress 7.1.2 with MCP Adapter 0.7.0, including sites that run Elementor or Rank Math SEO. Both of those plugins can change how the adapter behaves, and the MCP page explains what to do on such a site.
Experimental in 2.1, and how to turn it off
The abilities are experimental in 2.1. If you do not want them on a site, the gtm4wp_abilities_enabled filter turns all of them off, and gtm4wp_abilities_allow_write keeps only the six that read. The MCP page has the code for both.
If you try it, please let me know which questions worked for you and which did not, on the support forum or on GitHub.
