Skip to main content

AI / MCP Setup

FreeSince 7.3Included in the free Events Manager plugin.

An AI assistant can work with your events the way a member of your team would. Once connected, you can ask Claude, ChatGPT, Cursor or another AI client to list upcoming events, check how many spaces are left, create an event or approve a booking, in plain language.

The connection uses the Model Context Protocol (MCP), an open standard that most AI clients support. Events Manager publishes its features as tools on an MCP server at one address on your site. The assistant always acts as a WordPress user that you choose, and it can do nothing that user couldn't do in wp-admin.

Before you start
  • WordPress 7.0 or later. The tools are built on the WordPress Abilities API, which is part of WordPress from 7.0.
  • The MCP Adapter plugin, made by the WordPress project. Events Manager can install it for you in the steps below. Nothing is exposed to AI clients until it is active.
  • HTTPS on a live site. AI clients refuse to connect to a public site over plain http://, and WordPress needs HTTPS for the application passwords the connection relies on.
  • An AI client that supports remote MCP servers, such as Claude, ChatGPT (custom connectors), Cursor, VS Code or Codex.

Connect an AI client​

  1. Go to Events then Settings then General and open the AI / MCP Setup section. Only administrators see it.

    Each card shows a status. The MCP server URL appears in the third card once the first two are ready.

  2. Check that 1. WordPress 7.0+ says Ready.

  3. Under 2. MCP Adapter, click Install MCP Adapter. The plugin is downloaded from its GitHub releases, installed and activated. If your server can't download it, use Manual download, upload the ZIP at Plugins then Add New, and come back to click Activate MCP Adapter.

  4. Under 3. MCP server URL, click Copy. The address looks like this:

    https://yoursite.com/wp-json/mcp/events-manager
  5. In your AI client, add a custom connector (some clients call it a remote MCP server) and paste the address. In Claude this is under Settings, then Connectors, then Add custom connector.

  6. The client opens your site in a browser. Log in as the WordPress user the assistant should act as, check the name of the application and what it is asking for, and click Approve.

  7. Back in the AI client, ask something to test it, such as "List my upcoming events".

There is no password or key to copy. The client is given its own credential when you approve, and it renews that credential by itself.

What the setup section checks​

CardStatusMeaning
1. WordPress 7.0+Ready or BlockedBlocked means WordPress is older than 7.0. Update WordPress.
2. MCP AdapterActive, Installed or MissingInstalled means the plugin is there but not activated.
3. MCP server URLReady or PendingPending until cards 1 and 2 are both ready.
4. AuthenticationReady or UnavailableUnavailable means WordPress application passwords are switched off, usually because the site isn't on HTTPS.
5. AI client discoveryOK, Unknown or Action neededOnly shown when WordPress is installed in a subdirectory. See Troubleshooting.

Choose the user the assistant acts as​

When you approve a connection, the assistant gets the permissions of the WordPress user you are logged in as at that moment. If you approve as an administrator, it can do everything an administrator can do with events and bookings.

Create a separate WordPress user for each assistant and give it only the capabilities its job needs. Then log in as that user (a private browser window helps) when you approve the connection, or use Switch account on the approval screen.

To let the assistantThe user needs
Read published events, locations, categories, tags and availability, and make or view bookings of its ownAny account, for example a Subscriber
Create and edit eventsedit_events, plus publish_events to publish them and edit_others_events to change other people's
Create and edit locationsedit_locations, plus publish_locations to publish them
Add imagesupload_files
Create, edit and delete tickets, and approve, reject, cancel, edit or delete bookingsmanage_bookings for its own events, manage_others_bookings for every event
Create and edit categories and tagsedit_event_categories
Delete events, locations, categories or tagsThe matching delete_events, delete_locations and delete_event_categories capabilities. Give these only to an assistant you would trust with the Trash button.

Event capabilities are set per role in Events then Settings then General then User Capabilities. See User capabilities.

Without publish_events, an event the assistant tries to publish is saved without being published, the same as for a person with that role.

What the assistant can do​

Each tool below appears in the AI client under the name shown. You don't call them yourself. The assistant picks the right ones from what you ask.

Events, tickets and locations​

ToolsWhat they do
events-manager-list-events, events-manager-get-eventFind and read events
events-manager-get-event-availabilitySpaces and ticket availability for one event
events-manager-create-event, events-manager-update-event, events-manager-delete-eventCreate, change and trash or delete events, including recurring events and timeslots
events-manager-list-event-tickets, events-manager-get-ticket, events-manager-create-event-ticket, events-manager-update-ticket, events-manager-delete-ticketRead and manage tickets. A ticket that has bookings can't be deleted.
events-manager-list-locations, events-manager-get-location, events-manager-create-location, events-manager-update-location, events-manager-delete-locationRead and manage locations
events-manager-list-location-countries, -regions, -states, -townsThe places your locations are in, for narrowing a search
events-manager-list-categories, events-manager-get-category, events-manager-create-category, events-manager-update-category, events-manager-delete-category, and the same five for tagsRead and manage event categories and tags
events-manager-upload-mediaAdd an image to the media library from a public address or from file data, and optionally set it as an event's or location's featured image

Bookings​

ToolsWhat they do
events-manager-list-bookings, events-manager-get-bookingRead bookings. A user who can't manage bookings sees only their own.
events-manager-get-booking-requirementsLists exactly what a booking for one event needs: tickets, form fields and payment options, with an example. Assistants call this before making a booking.
events-manager-create-bookingMakes a booking, under the connected user's own account
events-manager-update-bookingChanges a booking's details. The payment method of an existing booking can't be changed.
events-manager-set-booking-statusApproves, rejects or cancels a booking, with or without the usual email
events-manager-delete-bookingPermanently deletes a booking

More tools with Pro​

With Events Manager Pro active, its tools appear on the same connection. Pro

ToolsWhat they doThe user needs
Coupons: list, get, create, update, delete, validate, and attach to or detach from an eventManage discount codesmanage_bookings
Transactions: list, list for a booking, get, deleteRead payment recordsmanage_bookings
events-manager-pro-get-attendance, events-manager-pro-set-attendanceCheck an attendee in or outmanage_bookings
events-manager-pro-get-rsvp, events-manager-pro-set-rsvpRead and set a booking's RSVP statusAny account
Booking moves: list destinations, preview, moveMove a booking to another event, date or timeslotmanage_bookings
Booking forms and attendee forms: list, get, create, update, delete, duplicate, set defaultManage custom formsAccess to the form editor (list_users by default)
Claim links: create, get, cancelInvite an organizer to take over a draft event. Listed only while claim links are switched on. See Building a listings site with AI agents.edit_others_events

Pro also changes two things about bookings. The booking requirements include your custom booking form and attendee form fields, and a user who manages an event's bookings can book for someone else by giving that person's name and email address.

What an assistant can't do​

  • Issue refunds. No tool sends money back. Canceling or deleting a booking leaves the payment where it is, deleting a transaction removes the record only, and moving a booking to a cheaper event does not return the difference. Refund the customer in your payment provider's dashboard.
  • Take a payment. An assistant can create a booking with a payment method, but it can't enter card details. The customer pays through your site as usual.
  • Change settings, install plugins or do anything else outside events, locations, bookings and the Pro features above. See the next section.

What a connection can reach​

A connection approved through the browser is limited in three ways:

  • It acts as one WordPress user and has that user's capabilities, no more.
  • It can only call Events Manager: the MCP server and the Events Manager and Events Manager Pro REST APIs. A request to any other part of the WordPress REST API, such as users or plugins, is refused, even if the user is an administrator.
  • It only works over the REST API. The same credential is refused by XML-RPC.

The approval screen spells this out as Access is limited to the features listed above, within what your account is permitted to do.

See and remove connections​

Each approved client appears in the user's profile, at Users then Profile then Application Passwords, under the name shown on the approval screen (for example "Claude"), with the date and IP address of its last use. Click Revoke beside it to cut the client off at once. The client can't renew a revoked connection and has to be approved again.

A connection stays valid until it is revoked, so look through this list from time to time and remove clients you no longer use.

Local and staging sites​

  • On a site without HTTPS, WordPress switches application passwords off and card 4 shows Unavailable. For a development site, mark it as local in wp-config.php:

    define( 'WP_ENVIRONMENT_TYPE', 'local' );
  • Hosted AI clients such as ChatGPT and Claude on the web connect from their own servers, so they can't reach a site on your computer. Use a desktop client, or give the site a public HTTPS address through a tunnel and tell Events Manager about it, so the addresses it advertises use the tunnel:

    define( 'MCP_OAUTH_TUNNEL', 'https://your-tunnel.example.com' );

    The older name EM_OAUTH_TUNNEL still works.

Clients that can't use the browser approval​

Some clients and command-line tools only accept a username and password. For those, create a WordPress application password by hand and connect through a bridge.

A hand-made application password is not limited to Events Manager

The limits described under What a connection can reach apply to connections approved through the browser. An application password you create yourself can call the whole WordPress REST API as that user. Use it only with a dedicated, low-privilege user.

  1. Log in as the assistant's user and go to Users then Profile then Application Passwords.

  2. Enter a name such as MCP agent, click Add New Application Password, and copy the password. It is shown once.

  3. Configure the client to run the MCP WordPress Remote bridge with your MCP server URL, the username and the password.

claude_desktop_config.json or ~/.cursor/mcp.json
{
"mcpServers": {
"events-manager": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://yoursite.com/wp-json/mcp/events-manager",
"WP_API_USERNAME": "mcp-agent",
"WP_API_PASSWORD": "<application-password>"
}
}
}
}

On a development machine with WP-CLI, the MCP Adapter can also serve the tools directly, with no HTTP and no password. Events Manager's server is named events-manager:

wp --path=/path/to/wordpress mcp-adapter serve --server=events-manager --user=mcp-agent

For developers​

Addresses​

AddressPurpose
/wp-json/mcp/events-managerThe MCP server. Core tools use the events-manager/ ability namespace and Pro's use events-manager-pro/.
/wp-json/events-manager/v1The Events Manager REST API. See the API reference.
/wp-json/events-manager-pro/v1The Events Manager Pro REST API
/wp-json/wp-abilities/v1The WordPress Abilities API, which lists and runs the same abilities over REST. Not reachable with a browser-approved connection. Use an application password.
/.well-known/oauth-authorization-server/events-managerOAuth authorization server metadata (RFC 8414)
/events-manager/.well-known/oauth-protected-resourceOAuth protected resource metadata (RFC 9728)
/events-manager/oauth/authorizeThe approval screen
/wp-json/oauth/v1/token, /revoke, /registerToken exchange and renewal, revocation (RFC 7009) and dynamic client registration (RFC 7591)

How authentication works​

Events Manager includes a small OAuth 2.0 server (authorization code with PKCE). Clients register themselves, the user approves on the consent screen, and the access token the client receives is a WordPress application password for that user. WordPress's own application password check validates every request, which is why connections show up in the user's profile and can be revoked there.

Clients are told that the access token lasts 8 hours, and renew it with a refresh token that is valid for 30 days. Each renewal replaces the application password with a new one under the same name. An application password that is never renewed keeps working until it is revoked.

Events on a recurring event's dates and on timeslots use IDs with a suffix, such as 123:456. Tools return and accept them in that form.

Filters and constants​

NameWhat it does
em_mcp_server_ability_prefixesThe ability namespaces exposed on the Events Manager MCP server. Add your own plugin's namespace to publish its abilities as tools.
em_api_oauth_scope_routesThe REST route prefixes a browser-approved connection may call
em_api_scope_descriptionThe description of Events Manager on the approval screen
em_api_can_create_bookingWhether the current user may create bookings through the API
em_mcp_adapter_download_urlWhere Install MCP Adapter downloads the plugin from
pixelite_oauth_access_token_ttl, pixelite_oauth_refresh_token_ttlToken lifetimes in seconds
pixelite_oauth_allow_dynamic_registrationReturn false to stop new clients registering themselves
pixelite_oauth_mcp_public_urlThe MCP address shown in the setup section, for sites behind a proxy
MCP_OAUTH_TUNNEL (constant)A public address to advertise in place of the site's own, for tunnels
functions.php
// Ask clients to renew every hour instead of every 8 hours.
add_filter( 'pixelite_oauth_access_token_ttl', fn() => HOUR_IN_SECONDS );

Troubleshooting​

The AI client says it can't connect or can't find the server

Work through the cards in the setup section. All of them should be green. Then check that the address you pasted is exactly the one under 3. MCP server URL, and that the site is reachable from the internet over HTTPS if the client is a hosted one.

Card 5 says "Action needed"

WordPress is installed in a subdirectory (for example yoursite.com/blog). AI clients look for the connection details at the root of the domain, where WordPress can't answer. The card shows two redirect rules. Add them to the .htaccess file at the root of your domain, above the # BEGIN WordPress line, then reload the settings page to test again. On nginx, add equivalent redirects.

Card 4 says "Unavailable"

WordPress application passwords are switched off. Move the site to HTTPS, or check whether a security plugin has disabled application passwords.

The assistant says it isn't allowed to do something

The connected user lacks the capability. Compare what you asked for with the table under Choose the user the assistant acts as. After changing a role's capabilities you don't need to reconnect.

A request fails with "insufficient_scope"

The client tried to call something outside Events Manager with a browser-approved connection. That is the limit described under What a connection can reach.

Pro tools are missing

Events Manager Pro must be active. The claim link tools appear only while claim links are switched on. Some clients list tools once when they connect, so disconnect and reconnect the client after activating Pro or changing that setting.

The connection keeps asking for approval again

The credential was revoked in the user's profile, or the client went more than 30 days without renewing it. Approve it again.