WordPress REST API
The WordPress REST API provides endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving JSON objects. It is the backbone of the WordPress Block Editor and enables headless CMS, mobile apps, and third-party integrations.
What You Can Do
MCP Tools
listposts
WordPress List Posts
createpost
WordPress Create Post
getpost
WordPress Get Post
updatepost
WordPress Update Post
deletepost
WordPress Delete Post
listpages
WordPress List Pages
createpage
WordPress Create Page
getpage
WordPress Get Page
listmedia
WordPress List Media
getmedia
WordPress Get Media Item
listcomments
WordPress List Comments
createcomment
WordPress Create Comment
listusers
WordPress List Users
getuser
WordPress Get User
listcategories
WordPress List Categories
createcategory
WordPress Create Category
listtags
WordPress List Tags
searchcontent
WordPress Search Content
getsettings
WordPress Get Settings
listthemes
WordPress List Themes
listplugins
WordPress List Plugins
listposttypes
WordPress List Post Types
listblocks
WordPress List Reusable Blocks
listblocktypes
WordPress List Block Types
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: WordPress REST API
description: The WordPress REST API provides endpoints for WordPress data types that allow developers to interact with sites
remotely by sending and receiving JSON objects. It is the backbone of the WordPress Block Editor and enables headless
CMS, mobile apps, and third-party integrations.
tags:
- Wordpress
- API
created: '2026-05-06'
modified: '2026-05-06'
capability:
consumes:
- type: http
namespace: wordpress
baseUri: https://example.com/wp-json
description: WordPress REST API HTTP API.
authentication:
type: apikey
in: cookie
name: wordpress_logged_in
value: '{{WORDPRESS_TOKEN}}'
resources:
- name: wp-v2-posts
path: /wp/v2/posts
operations:
- name: listposts
method: GET
description: WordPress List Posts
inputParameters:
- name: context
in: query
type: string
description: Scope under which the request is made; determines fields present in response.
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items to be returned in result set.
- name: search
in: query
type: string
description: Limit results to those matching a string.
- name: status
in: query
type: string
description: Limit result set to posts assigned one or more statuses.
- name: author
in: query
type: array
description: Limit result set to posts assigned to specific authors.
- name: categories
in: query
type: array
description: Limit result set to items with specific terms assigned in the categories taxonomy.
- name: tags
in: query
type: array
description: Limit result set to items with specific terms assigned in the tags taxonomy.
- name: orderby
in: query
type: string
description: Sort collection by object attribute.
- name: order
in: query
type: string
description: Order sort attribute ascending or descending.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: createpost
method: POST
description: WordPress Create Post
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-posts-id
path: /wp/v2/posts/{id}
operations:
- name: getpost
method: GET
description: WordPress Get Post
inputParameters:
- name: id
in: path
type: integer
required: true
description: Unique identifier for the post.
- name: context
in: query
type: string
description: Scope under which the request is made.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: updatepost
method: PUT
description: WordPress Update Post
inputParameters:
- name: id
in: path
type: integer
required: true
description: Unique identifier for the post.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: deletepost
method: DELETE
description: WordPress Delete Post
inputParameters:
- name: id
in: path
type: integer
required: true
description: Unique identifier for the post.
- name: force
in: query
type: boolean
description: Whether to bypass trash and force deletion.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-pages
path: /wp/v2/pages
operations:
- name: listpages
method: GET
description: WordPress List Pages
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items to be returned.
- name: status
in: query
type: string
description: Limit result set to pages with a specific status.
- name: parent
in: query
type: integer
description: Limit result set to pages with a specific parent ID.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: createpage
method: POST
description: WordPress Create Page
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-pages-id
path: /wp/v2/pages/{id}
operations:
- name: getpage
method: GET
description: WordPress Get Page
inputParameters:
- name: id
in: path
type: integer
required: true
description: Unique identifier for the page.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-media
path: /wp/v2/media
operations:
- name: listmedia
method: GET
description: WordPress List Media
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items to be returned.
- name: media_type
in: query
type: string
description: Limit result set to attachments of a particular media type.
- name: mime_type
in: query
type: string
description: Limit result set to attachments of a specific MIME type.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-media-id
path: /wp/v2/media/{id}
operations:
- name: getmedia
method: GET
description: WordPress Get Media Item
inputParameters:
- name: id
in: path
type: integer
required: true
description: Unique identifier for the media item.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-comments
path: /wp/v2/comments
operations:
- name: listcomments
method: GET
description: WordPress List Comments
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items to be returned.
- name: post
in: query
type: array
description: Limit result set to comments assigned to specific post IDs.
- name: status
in: query
type: string
description: Limit result set to comments assigned a specific status.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: createcomment
method: POST
description: WordPress Create Comment
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-users
path: /wp/v2/users
operations:
- name: listusers
method: GET
description: WordPress List Users
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items to be returned.
- name: roles
in: query
type: array
description: Limit result set to users matching at least one specific role.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-users-id
path: /wp/v2/users/{id}
operations:
- name: getuser
method: GET
description: WordPress Get User
inputParameters:
- name: id
in: path
type: integer
required: true
description: Unique identifier for the user.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-categories
path: /wp/v2/categories
operations:
- name: listcategories
method: GET
description: WordPress List Categories
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items.
- name: search
in: query
type: string
description: Limit results to matching categories.
- name: hide_empty
in: query
type: boolean
description: Whether to hide terms not assigned to any posts.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: createcategory
method: POST
description: WordPress Create Category
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-tags
path: /wp/v2/tags
operations:
- name: listtags
method: GET
description: WordPress List Tags
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items.
- name: search
in: query
type: string
description: Limit results to matching tags.
- name: hide_empty
in: query
type: boolean
description: Whether to hide terms not assigned to any posts.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-search
path: /wp/v2/search
operations:
- name: searchcontent
method: GET
description: WordPress Search Content
inputParameters:
- name: search
in: query
type: string
required: true
description: Limit results to those matching a string.
- name: type
in: query
type: string
description: Limit results to items of an object type.
- name: subtype
in: query
type: string
description: Limit results to items of one or more object subtypes.
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items to return.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-settings
path: /wp/v2/settings
operations:
- name: getsettings
method: GET
description: WordPress Get Settings
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-themes
path: /wp/v2/themes
operations:
- name: listthemes
method: GET
description: WordPress List Themes
inputParameters:
- name: status
in: query
type: string
description: Limit result set to themes assigned one or more statuses.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-plugins
path: /wp/v2/plugins
operations:
- name: listplugins
method: GET
description: WordPress List Plugins
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-types
path: /wp/v2/types
operations:
- name: listposttypes
method: GET
description: WordPress List Post Types
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-blocks
path: /wp/v2/blocks
operations:
- name: listblocks
method: GET
description: WordPress List Reusable Blocks
inputParameters:
- name: page
in: query
type: integer
description: Current page of the collection.
- name: per_page
in: query
type: integer
description: Maximum number of items.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: wp-v2-block-types
path: /wp/v2/block-types
operations:
- name: listblocktypes
method: GET
description: WordPress List Block Types
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
exposes:
- type: rest
port: 8080
namespace: wordpress-rest
description: REST adapter for WordPress REST API.
resources:
- path: /wp/v2/posts
name: listposts
operations:
- method: GET
name: listposts
description: WordPress List Posts
call: wordpress.listposts
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/posts
name: createpost
operations:
- method: POST
name: createpost
description: WordPress Create Post
call: wordpress.createpost
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/posts/{id}
name: getpost
operations:
- method: GET
name: getpost
description: WordPress Get Post
call: wordpress.getpost
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/posts/{id}
name: updatepost
operations:
- method: PUT
name: updatepost
description: WordPress Update Post
call: wordpress.updatepost
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/posts/{id}
name: deletepost
operations:
- method: DELETE
name: deletepost
description: WordPress Delete Post
call: wordpress.deletepost
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/pages
name: listpages
operations:
- method: GET
name: listpages
description: WordPress List Pages
call: wordpress.listpages
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/pages
name: createpage
operations:
- method: POST
name: createpage
description: WordPress Create Page
call: wordpress.createpage
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/pages/{id}
name: getpage
operations:
- method: GET
name: getpage
description: WordPress Get Page
call: wordpress.getpage
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/media
name: listmedia
operations:
- method: GET
name: listmedia
description: WordPress List Media
call: wordpress.listmedia
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/media/{id}
name: getmedia
operations:
- method: GET
name: getmedia
description: WordPress Get Media Item
call: wordpress.getmedia
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/comments
name: listcomments
operations:
- method: GET
name: listcomments
description: WordPress List Comments
call: wordpress.listcomments
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/comments
name: createcomment
operations:
- method: POST
name: createcomment
description: WordPress Create Comment
call: wordpress.createcomment
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/users
name: listusers
operations:
- method: GET
name: listusers
description: WordPress List Users
call: wordpress.listusers
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/users/{id}
name: getuser
operations:
- method: GET
name: getuser
description: WordPress Get User
call: wordpress.getuser
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/categories
name: listcategories
operations:
- method: GET
name: listcategories
description: WordPress List Categories
call: wordpress.listcategories
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/categories
name: createcategory
operations:
- method: POST
name: createcategory
description: WordPress Create Category
call: wordpress.createcategory
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/tags
name: listtags
operations:
- method: GET
name: listtags
description: WordPress List Tags
call: wordpress.listtags
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/search
name: searchcontent
operations:
- method: GET
name: searchcontent
description: WordPress Search Content
call: wordpress.searchcontent
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/settings
name: getsettings
operations:
- method: GET
name: getsettings
description: WordPress Get Settings
call: wordpress.getsettings
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/themes
name: listthemes
operations:
- method: GET
name: listthemes
description: WordPress List Themes
call: wordpress.listthemes
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/plugins
name: listplugins
operations:
- method: GET
name: listplugins
description: WordPress List Plugins
call: wordpress.listplugins
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/types
name: listposttypes
operations:
- method: GET
name: listposttypes
description: WordPress List Post Types
call: wordpress.listposttypes
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/blocks
name: listblocks
operations:
- method: GET
name: listblocks
description: WordPress List Reusable Blocks
call: wordpress.listblocks
outputParameters:
- type: object
mapping: $.
- path: /wp/v2/block-types
name: listblocktypes
operations:
- method: GET
name: listblocktypes
description: WordPress List Block Types
call: wordpress.listblocktypes
outputParameters:
- type: object
mapping: $.
- type: mcp
port: 9090
namespace: wordpress-mcp
transport: http
description: MCP adapter for WordPress REST API for AI agent use.
tools:
- name: listposts
description: WordPress List Posts
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listposts
with:
context: tools.context
page: tools.page
per_page: tools.per_page
search: tools.search
status: tools.status
author: tools.author
categories: tools.categories
tags: tools.tags
orderby: tools.orderby
order: tools.order
inputParameters:
- name: context
type: string
description: Scope under which the request is made; determines fields present in response.
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items to be returned in result set.
- name: search
type: string
description: Limit results to those matching a string.
- name: status
type: string
description: Limit result set to posts assigned one or more statuses.
- name: author
type: array
description: Limit result set to posts assigned to specific authors.
- name: categories
type: array
description: Limit result set to items with specific terms assigned in the categories taxonomy.
- name: tags
type: array
description: Limit result set to items with specific terms assigned in the tags taxonomy.
- name: orderby
type: string
description: Sort collection by object attribute.
- name: order
type: string
description: Order sort attribute ascending or descending.
outputParameters:
- type: object
mapping: $.
- name: createpost
description: WordPress Create Post
hints:
readOnly: false
destructive: false
idempotent: false
call: wordpress.createpost
outputParameters:
- type: object
mapping: $.
- name: getpost
description: WordPress Get Post
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.getpost
with:
id: tools.id
context: tools.context
inputParameters:
- name: id
type: integer
description: Unique identifier for the post.
required: true
- name: context
type: string
description: Scope under which the request is made.
outputParameters:
- type: object
mapping: $.
- name: updatepost
description: WordPress Update Post
hints:
readOnly: false
destructive: false
idempotent: true
call: wordpress.updatepost
with:
id: tools.id
inputParameters:
- name: id
type: integer
description: Unique identifier for the post.
required: true
outputParameters:
- type: object
mapping: $.
- name: deletepost
description: WordPress Delete Post
hints:
readOnly: false
destructive: true
idempotent: true
call: wordpress.deletepost
with:
id: tools.id
force: tools.force
inputParameters:
- name: id
type: integer
description: Unique identifier for the post.
required: true
- name: force
type: boolean
description: Whether to bypass trash and force deletion.
outputParameters:
- type: object
mapping: $.
- name: listpages
description: WordPress List Pages
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listpages
with:
page: tools.page
per_page: tools.per_page
status: tools.status
parent: tools.parent
inputParameters:
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items to be returned.
- name: status
type: string
description: Limit result set to pages with a specific status.
- name: parent
type: integer
description: Limit result set to pages with a specific parent ID.
outputParameters:
- type: object
mapping: $.
- name: createpage
description: WordPress Create Page
hints:
readOnly: false
destructive: false
idempotent: false
call: wordpress.createpage
outputParameters:
- type: object
mapping: $.
- name: getpage
description: WordPress Get Page
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.getpage
with:
id: tools.id
inputParameters:
- name: id
type: integer
description: Unique identifier for the page.
required: true
outputParameters:
- type: object
mapping: $.
- name: listmedia
description: WordPress List Media
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listmedia
with:
page: tools.page
per_page: tools.per_page
media_type: tools.media_type
mime_type: tools.mime_type
inputParameters:
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items to be returned.
- name: media_type
type: string
description: Limit result set to attachments of a particular media type.
- name: mime_type
type: string
description: Limit result set to attachments of a specific MIME type.
outputParameters:
- type: object
mapping: $.
- name: getmedia
description: WordPress Get Media Item
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.getmedia
with:
id: tools.id
inputParameters:
- name: id
type: integer
description: Unique identifier for the media item.
required: true
outputParameters:
- type: object
mapping: $.
- name: listcomments
description: WordPress List Comments
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listcomments
with:
page: tools.page
per_page: tools.per_page
post: tools.post
status: tools.status
inputParameters:
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items to be returned.
- name: post
type: array
description: Limit result set to comments assigned to specific post IDs.
- name: status
type: string
description: Limit result set to comments assigned a specific status.
outputParameters:
- type: object
mapping: $.
- name: createcomment
description: WordPress Create Comment
hints:
readOnly: false
destructive: false
idempotent: false
call: wordpress.createcomment
outputParameters:
- type: object
mapping: $.
- name: listusers
description: WordPress List Users
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listusers
with:
page: tools.page
per_page: tools.per_page
roles: tools.roles
inputParameters:
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items to be returned.
- name: roles
type: array
description: Limit result set to users matching at least one specific role.
outputParameters:
- type: object
mapping: $.
- name: getuser
description: WordPress Get User
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.getuser
with:
id: tools.id
inputParameters:
- name: id
type: integer
description: Unique identifier for the user.
required: true
outputParameters:
- type: object
mapping: $.
- name: listcategories
description: WordPress List Categories
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listcategories
with:
page: tools.page
per_page: tools.per_page
search: tools.search
hide_empty: tools.hide_empty
inputParameters:
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items.
- name: search
type: string
description: Limit results to matching categories.
- name: hide_empty
type: boolean
description: Whether to hide terms not assigned to any posts.
outputParameters:
- type: object
mapping: $.
- name: createcategory
description: WordPress Create Category
hints:
readOnly: false
destructive: false
idempotent: false
call: wordpress.createcategory
outputParameters:
- type: object
mapping: $.
- name: listtags
description: WordPress List Tags
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.listtags
with:
page: tools.page
per_page: tools.per_page
search: tools.search
hide_empty: tools.hide_empty
inputParameters:
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items.
- name: search
type: string
description: Limit results to matching tags.
- name: hide_empty
type: boolean
description: Whether to hide terms not assigned to any posts.
outputParameters:
- type: object
mapping: $.
- name: searchcontent
description: WordPress Search Content
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.searchcontent
with:
search: tools.search
type: tools.type
subtype: tools.subtype
page: tools.page
per_page: tools.per_page
inputParameters:
- name: search
type: string
description: Limit results to those matching a string.
required: true
- name: type
type: string
description: Limit results to items of an object type.
- name: subtype
type: string
description: Limit results to items of one or more object subtypes.
- name: page
type: integer
description: Current page of the collection.
- name: per_page
type: integer
description: Maximum number of items to return.
outputParameters:
- type: object
mapping: $.
- name: getsettings
description: WordPress Get Settings
hints:
readOnly: true
destructive: false
idempotent: true
call: wordpress.getsettings
outputParameters:
- type: object
mapping: $.
- name: listthemes
description: WordPress List Themes
hints:
# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/wordpress/refs/heads/main/capabilities/wordpress-capability.yaml