WordPress Headless

v1.0.0
io.github.aj-ua/wp-headless-mcp Checked 2 days ago Published 24 days ago

Read WordPress content, ACF fields, and Yoast SEO data, and safely edit drafts.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_content Search site content

Full-text search across published posts, pages, and custom post types. "results" are title and body matches from WordPress search; "acf_matches" are items whose ACF custom fields contain every search word (WordPress search skips ACF, and on many sites most text lives there). Use get_post to read a result.

ParameterTypeDescription
query *stringSearch terms
include_acfbooleanAlso search ACF field values (first page only)
pageintegerPage number
per_pageintegerResults per page
post_typestringLimit to one post type slug (see list_post_types), e.g. "page" or "project"

list_post_types List content types

Lists the content types on the site (posts, pages, and custom post types such as projects), with how many published items each has and which taxonomies apply. Call this first to learn what the site contains.

get_post Get a post, page, or custom post

Returns one published item by ID or slug: title, URL, dates, author, featured image, terms, body as Markdown, and ACF custom fields. Works for any post type (see list_post_types).

ParameterTypeDescription
idintegerPost ID. Provide either id or slug.
include_acfbooleanInclude ACF custom fields
max_charsintegerMaximum characters of body text (and of each long ACF text field) to return
post_typestringPost type slug, e.g. "post", "page", "project"
slugstringPost slug. Provide either id or slug.

list_posts List posts, pages, or custom posts

Lists published items of one post type, newest first by default, with optional filters. Returns summaries (title, URL, dates, excerpt). Use get_post for the full content.

ParameterTypeDescription
afterstringOnly items published after this date (YYYY-MM-DD or ISO 8601)
beforestringOnly items published before this date (YYYY-MM-DD or ISO 8601)
include_acfbooleanInclude shortened ACF fields for each item (useful when content lives in ACF)
modified_afterstringOnly items last modified after this date (YYYY-MM-DD or ISO 8601); finds recent edits
orderstring
orderbystringSort field. "relevance" requires search.
pageinteger
per_pageinteger
post_typestringPost type slug, e.g. "post", "page", "project"
searchstringKeyword filter
taxonomystringTaxonomy slug to filter by, e.g. "category" or "post_tag"
termsarrayTerm slugs or numeric IDs in that taxonomy. Requires taxonomy.

list_terms List categories, tags, or custom taxonomy terms

Lists terms in a taxonomy with how many published items use each. Term slugs can be passed to list_posts to filter.

ParameterTypeDescription
hide_emptybooleanSkip terms with no published items
pageinteger
per_pageinteger
searchstringKeyword filter on term names
taxonomystringTaxonomy slug, e.g. "category" or "post_tag"

get_acf_fields Get ACF fields with labels

Returns the ACF custom fields of one item with each field's label, type, field group, and value. Use it to understand what each field means; get_post already includes the values alone.

ParameterTypeDescription
idintegerPost ID. Provide either id or slug.
max_charsintegerMaximum characters of body text (and of each long ACF text field) to return
post_typestringPost type slug, e.g. "page" or "project"
slugstringPost slug. Provide either id or slug.

get_company_info Get company and site info

Returns the site name, tagline, URL, and timezone, plus the organization behind the site (name, logo, social profiles, and contact details when published) from Yoast SEO data, and the text of the home page, where sites usually say who they are and what they do.