Wp Rest Api
Helps with REST APIs, API as part of developing backend services and APIs workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add automattic-wp-rest-api npx -- -y @trustedskills/automattic-wp-rest-api
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"automattic-wp-rest-api": {
"command": "npx",
"args": [
"-y",
"@trustedskills/automattic-wp-rest-api"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill assists with developing and debugging WordPress REST API integrations. It enables AI agents to create, update, and troubleshoot REST routes/endpoints within a WordPress environment. The skill focuses on tasks like adding custom fields to responses, exposing custom post types, implementing data validation, and adjusting pagination settings for APIs.
When to use it
- Creating or updating REST endpoints in a WordPress project.
- Debugging common REST API errors such as 401, 403, or 404 issues, including permission and nonce problems.
- Adding custom fields or metadata to the data returned by REST API responses.
- Exposing custom post types or taxonomies through the WordPress REST API.
- Adjusting response links, embedding options, or pagination behavior for APIs.
Key capabilities
- Creating and updating REST routes using
register_rest_route(). - Implementing schema and argument validation.
- Adding custom fields/meta to REST responses using
register_rest_fieldandregister_meta. - Exposing custom post types or taxonomies via the WordPress REST API (using
show_in_rest). - Adjusting response links with
WP_REST_Response::add_link().
Example prompts
- "Create a new REST endpoint under the 'my-plugin/v1' namespace to retrieve user data."
- "Debug why I am receiving a 403 error when accessing my custom REST route."
- "Add a custom field called 'featured_image_url' to the response for posts accessed via the /wp/v2/posts endpoint."
Tips & gotchas
- The skill requires knowledge of WordPress development and REST API principles.
- When working with full site repositories, ensure you are modifying code within the correct plugin or theme.
- Always use a unique namespace (e.g., vendor/v1) for custom endpoints to avoid conflicts.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🏢 Official
Published by the company or team that built the technology.