HM REST Ability
A registered WordPress ability that exposes the REST API to agents using the current user's authentication
by Human Made · github.com/humanmade/hm-rest-ability · website
★ 1stars
1release downloads
47composer installs
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/humanmade/hm-rest-ability/releases/download/v0.2.0/hm-rest-ability-v0.2.0.zipAlso on Packagist as humanmade/hm-rest-ability:
composer require humanmade/hm-rest-abilityFrom the readme
HM REST Ability
OAuth2 discovery endpoints and a REST API ability, for exposing WordPress to
MCP clients (like Claude) via the official MCP Adapter
plugin and the WordPress Abilities API.
What it does
OAuth2 discovery (inc/oauth2-discovery.php)
- Serves /.well-known/oauth-authorization-server — RFC 8414 Authorization
Server Metadata — so MCP clients can auto-discover the OAuth2 endpoints
provided by the WP-API/OAuth2 plugin.
- Serves /.well-known/oauth-protected-resource — RFC 9728 Protected
Resource Metadata — so clients can discover the authorization server from
a 401 on the MCP endpoint.
- Adds a WWW-Authenticate header to 401 responses on MCP REST routes,
pointing clients at the protected resource metadata.
REST API ability (inc/rest-api-abilities.php)
- Registers a single rest-api/call ability that lets an MCP client dispatch
any internal WordPress REST API request (GET, POST, PUT, PATCH,
DELETE, OPTIONS), instead of needing a bespoke ability per endpoint.
Permissions are enforced by running the matched route's own
permissioncallback.
Requirements
- WordPress 6.9+ (for the built-in Abilities API)
- PHP 7.4+
- The MCP Adapter plugin
(wordpress/mcp-ad
Read the full README on GitHub →