Skip to content

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_read for GET requests that retrieve data.
  • wp_rest_write for POST, PUT, or PATCH requests that create or update data.
  • wp_rest_delete for 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.

Was this helpful?