WordPress
Make every contact form, WooCommerce checkout, login, registration, and comment form on your WordPress site callable by AI agents — without touching a single template. Install a free no-code plugin or add one line to your theme, and every <form> is instantly AI-ready.
The easiest method. WPCode (formerly "Insert Headers and Footers") lets you inject custom scripts from the WordPress admin without editing any files.
-
1
In your WordPress admin, go to Plugins › Add New Plugin and search for WPCode.
-
2
Install and activate WPCode – Insert Headers and Footers + Custom Code Snippets (free, 2M+ installs).
-
3
Go to Code Snippets › + Add Snippet, choose HTML Snippet, and paste the script tag below.
-
4
Set the Location to
Footerand Activate the snippet. Click Save Snippet. -
5
Visit any page with a form. Open the browser console — you should see
[auto-webmcp] registered N tools.
<script src="https://cdn.jsdelivr.net/npm/auto-webmcp@0.2.1/dist/auto-webmcp.iife.js" async></script>
If you prefer to keep dependencies in your theme, add the script via functions.php
in a child theme (never edit the parent theme directly).
add_action( 'wp_footer', function () {
echo '<script src="https://cdn.jsdelivr.net/npm/auto-webmcp@0.2.1/dist/auto-webmcp.iife.js" async></script>';
} );
functions.php
directly means your changes are overwritten on the next theme update. Create a child theme first,
or use the WPCode plugin above to avoid this entirely.
WordPress form types that become AI-callable out of the box
- WooCommerce checkout: billing address, shipping, payment method, order notes
- WooCommerce account: login, register, lost password, address edit
- Contact Form 7 / WPForms / Gravity Forms: any form rendered directly in the page DOM
- WordPress login & registration: username, password, email
- Comment forms: name, email, website, comment body
- Search forms: keyword, category, date range (theme-dependent)
For forms you control in a page builder or custom template, add WebMCP spec attributes
to the <form> element to give AI agents a precise description
of what the form does.
<form id="enquiry-form" toolname="submit_enquiry" tooldescription="Submit a product enquiry. Requires name, email, and message." toolautosubmit="true" > ... </form>