Appearance
Use WordPress and Plugin REST API Routes
Easy MCP AI can expose eligible REST API routes registered by WordPress core and installed plugins. A REST API route is an address an application can use to read or change site data.
In this article
Discover a Route
Ask your AI client to call wp_rest_routes without arguments to list the available namespaces. A namespace groups related routes, such as routes provided by WordPress or a plugin.
To narrow the results, pass namespace to list routes in a namespace, route to inspect a particular route, or search to find matching routes. The results show the route's supported methods, arguments, and fields. Use these details to choose a route and provide the values it requires.
Call a Route
Choose the tool that matches the route's HTTP method:
wp_rest_readfor GET requests that retrieve data.wp_rest_writefor POST, PUT, or PATCH requests that create or update data.wp_rest_deletefor DELETE requests that remove data.
Pass the route and any required arguments shown by wp_rest_routes. If the route uses a dedicated Easy MCP AI tool, discovery identifies it as dedicated_tool; prefer that tool for the operation.
Keep Responses Manageable
Tool responses have a size limit, so a large result may not fit in the AI client's response. Check the route's supported arguments with wp_rest_routes, then use available search, pagination, or field-selection arguments to request only the information you need.
Control Access
An administrator can enable or disable REST namespaces under Easy MCP AI > Tools. Changes to tools are saved with Save changes and apply on the client's next call.
Route calls run as the WordPress user connected to the AI client. The route's own permission check still decides whether that user can perform the requested action; enabling a namespace does not grant additional WordPress permissions.
Custom Fields Missing From Responses
A custom field (post meta, extra data saved with a post) is normally available in generic REST route responses only when its key is registered for REST access on that post type. Reconnecting the AI client or granting the token more tools does not register the key.
The dedicated wp_update_post_meta tool can also write an eligible unregistered, unclaimed key when it contains one supported text or numeric value. Easy MCP AI exposes the key temporarily for that update and its reread; this does not make it permanently visible in generic REST responses. The connected user must be allowed to edit the post. Protected keys that begin with _ also require the manage_options capability, which is normally available to administrators.
This fallback does not bypass a plugin's registration, permission, or value-cleaning (sanitization) rules. It does not apply to integration-owned or ACF keys, WordPress core bookkeeping keys used internally by WordPress, keys that are unsafe to expose or conflict with another field, unsupported values, keys with multiple stored values, or post types that do not support custom fields. Use the owning integration's tools when appropriate. If the tool refuses a key, do not retry by saving the entire post.
- ACF or Secure Custom Fields: enable Show in REST API in the field group's settings.
- Other custom fields: a developer registers the key for the post type with
register_post_meta(), settingshow_in_resttotrue.
Registering a field does not change who can edit it: the connected user still needs permission to edit the post.
Custom Post Types Hidden from REST
A custom post type is a type of content added by WordPress, a theme, or a plugin. If its show_in_rest setting is off, the dedicated Custom Post Type tools can temporarily access it when it meets the eligibility checks. This temporary access lasts only for the dedicated tool operation and does not expose the type through generic REST tools.
By default, a hidden custom post type must be public and have an admin screen. It must also use WordPress's standard posts REST controller, and its REST base (the URL segment used for that type) must not conflict with another post type. Built-in WordPress post types, types with their own custom REST controller, and types with a conflicting REST base are not eligible. The tools still apply WordPress's normal permission checks; opening a type does not grant the connected user permission to read or edit its content.
These temporary routes are available only to the dedicated Custom Post Type tools, not to wp_rest_routes, wp_rest_read, wp_rest_write, or wp_rest_delete.
Developers can control eligible types with the easy_mcp_ai_open_hidden_post_type filter. Its callback receives bool $open (the default open/closed value), string $post_type (the type's slug), and WP_Post_Type $object (the WordPress object describing the type). The default value is open for public types with an admin screen; returning false opts a type out. The filter cannot bypass the structural checks for built-in types, custom controllers, or conflicting REST bases.