ACF (Advanced Custom Fields)
New in v3.2.1. When Advanced Custom Fields (free or PRO) is active, EMCP exposes ACF as a first-class integration: enough for an agent to stand up a whole content structure end to end: custom post type → taxonomy → field group → posts with values.
Two tools, not fifteen
Section titled “Two tools, not fifteen”To keep the MCP tool-list small, the whole domain is exposed as two dispatcher tools rather than one tool per operation:
acf-read: all read operations (enabled by default)acf-write: all write operations (ships disabled by default)
Each takes an operation and an arguments object. Call a tool with no operation to get its catalog of operations, then call it again to run one:
// discoveracf-read({})// → { mode: "read", operations: [ { operation: "list-field-groups", … }, … ] }
// actacf-read({ operation: "get-fields", arguments: { post_id: 123 } })This is the same discover → act pattern as the widget catalog. The two dispatchers only register when ACF is active, and each operation still enforces its own WordPress capability, checked per call.
The 15 operations
Section titled “The 15 operations”Read (acf-read)
Section titled “Read (acf-read)”| Operation | Arguments | Returns |
|---|---|---|
list-field-groups | None | Field groups: key, title, active, field count. |
get-field-group | { key } | One group’s location rules + recursive field tree. Read this before writing values. |
list-options-pages | None | ACF PRO options pages (empty on free ACF). |
get-fields | { post_id } or { options_page } | Current field values, formatted. |
list-post-types | None | ACF-managed custom post types (ACF 6.1+). |
get-post-type | { key } | One CPT’s definition (6.1+). |
list-taxonomies | None | ACF-managed taxonomies (6.1+). |
get-taxonomy | { key } | One taxonomy’s definition (6.1+). |
Write (acf-write)
Section titled “Write (acf-write)”| Operation | Arguments | Notes |
|---|---|---|
update-fields | { post_id|options_page, fields: { name: value } } | Writes values by field name (resolved to keys). |
create-field-group | { title, fields: […], location: [[…]] } | Creates a group with fields + location rules. |
update-field-group | { key, … } | Edit settings / add fields. No deletes or renames. |
create-post-type | { post_type, title, … } | Registers a CPT as data through ACF (6.1+). |
update-post-type | { key, … } | Edit a CPT. Slug is immutable. (6.1+) |
create-taxonomy | { taxonomy, title, object_type: […] } | Registers a taxonomy as data (6.1+). |
update-taxonomy | { key, … } | Edit a taxonomy. Slug is immutable. (6.1+) |
The Custom Post Type / Taxonomy operations require ACF 6.1+; they’re omitted from the catalog on older ACF.
Safety by design
Section titled “Safety by design”- Data, not code. Custom post types and taxonomies are registered through ACF’s own
acf_import_post_type/acf_import_taxonomy: nothing executable is written, and ACF registers them itself. - No deletes. There is no delete operation for anything.
- Immutable identifiers. A field’s
name/key/type, and a post type / taxonomy slug, can never change: renaming would orphan stored content. - PRO fields. Repeaters, flexible content (rows validated against the field’s layouts), galleries, groups and clones round-trip as nested JSON; on free ACF those field types are rejected with
acf_pro_required. - Per-operation capabilities. Field reads need
edit_posts; field-value writes neededit_poston the target; field-group / CPT / taxonomy writes needmanage_options.
Full worked example
Section titled “Full worked example”// 1. a custom post typeacf-write({ operation: "create-post-type", arguments: { post_type: "book", title: "Books", singular: "Book", supports: ["title","editor","thumbnail"] } })
// 2. a taxonomy on itacf-write({ operation: "create-taxonomy", arguments: { taxonomy: "genre", title: "Genres", object_type: ["book"] } })
// 3. a field group on that post typeacf-write({ operation: "create-field-group", arguments: { title: "Book Details", fields: [ { label: "Subtitle", name: "subtitle", type: "text" }, { label: "Rating", name: "rating", type: "number", min: 0, max: 5 } ], location: [[ { param: "post_type", operator: "==", value: "book" } ]] } })
// 4. create a book (with the content tools), then write its valuesacf-write({ operation: "update-fields", arguments: { post_id: 123, fields: { subtitle: "The Spice Must Flow", rating: 5 } } })
// 5. read it backacf-read({ operation: "get-fields", arguments: { post_id: 123 } })In the admin
Section titled “In the admin”The dispatchers appear under EMCP Tools → Tools → Plugins → ACF as two toggles, acf-read (on) and acf-write (off by default), each card listing the operations it covers. Toggle a tool to allow or block all of its operations at once.
Agent skill
Section titled “Agent skill”Pro ships an emcp-plugins Agent Skill that teaches a connected agent this whole model (the two-dispatcher pattern, the discover→act flow, and the full ACF operation reference), so it drives the integration correctly without you spelling it out.