acf-mcp-server
This server provides a production-ready MCP interface for safely reading and managing WordPress + ACF Pro structures (field groups, custom post types, taxonomies, and options pages) through ACF Local JSON files and explicit WP-CLI synchronization — without direct database access.
Field Group Management
List, get, create, update, and delete ACF field groups from Local JSON
Validate field group payloads against the ACF Local JSON schema
Custom Post Type Management
List all ACF-managed custom post types
Create or update custom post types (full or simplified)
Taxonomy Management
List all ACF-managed custom taxonomies
Create or update taxonomies (full or simplified)
Options Page Management
List and create ACF Pro options pages
Content Model Application
Apply a full declarative content model in one call (
acf_apply_content_model), creating post types, taxonomies, options pages, and field groups in dependency-safe order
WP-CLI Synchronization
Export ACF JSON via WP-CLI
Import ACF JSON files into WordPress
Sync Local JSON changes to the WordPress database (with dry-run support)
Auditing & Compatibility
Audit AI access readiness for ACF 6.8 Abilities API
Validate runtime compatibility for ACF 6.8 features
Audit Schema.org mappings for ACF field metadata
Check ACF runtime status
Safety Features
Dry-run mode on all write operations to preview changes before applying
Automatic backups before any mutation
No direct SQL, arbitrary PHP, or shell interpolation — changes are file-based and git-reviewable
Server health check via
acf_ping
Allows AI agents to inspect and modify ACF field groups, custom post types, taxonomies, and options pages within a WordPress site using ACF Local JSON and WP-CLI synchronization, without direct database access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@acf-mcp-server list all ACF field groups"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ACF MCP Server
Production-ready Model Context Protocol server for safely reading and changing WordPress + ACF Pro structure through ACF Local JSON and explicit WP-CLI synchronization.
The server is built for AI agents that need to inspect or propose changes to ACF field groups, custom post types, taxonomies, and options pages without direct database access.
ACF 6.8 also exposes ACF schema and content through the WordPress Abilities API when paired with the MCP Adapter plugin or another MCP server implementation. This project complements that runtime path with a repo-first workflow: Local JSON remains the source of truth, changes are reviewable in git, and WordPress synchronization is explicit.
Features
TypeScript, Node.js, Zod, Vitest, and
@modelcontextprotocol/sdk.JSON-first ACF Local JSON repository.
No direct SQL, no arbitrary PHP, no shell interpolation.
Automatic backups before mutations.
dryRunsupport for write workflows.Explicit WP-CLI sync/import/export tools.
ACF 6.8 runtime-readiness audits for AI access, REST visibility, and location references.
Simplified creation tools using ACF Abilities-style inputs.
Read-only Schema.org mapping audits for ACF field metadata.
stdiotransport by default, optional Streamable HTTP for development.DDEV WordPress fixture configuration.
Related MCP server: Tafa MCP Server
Install
npm install
npm run buildFor local development:
export ACF_MCP_ACF_JSON_DIR="/absolute/path/to/wp-content/themes/my-theme/acf-json"
export ACF_MCP_WP_ROOT="/absolute/path/to/wordpress"
npm run devMCP Client Configuration
Example stdio configuration:
{
"mcpServers": {
"acf": {
"command": "node",
"args": ["/absolute/path/to/acf_mcp/dist/server/stdio.js"],
"env": {
"ACF_MCP_ACF_JSON_DIR": "/absolute/path/to/wp-content/themes/my-theme/acf-json",
"ACF_MCP_WP_ROOT": "/absolute/path/to/wordpress"
}
}
}
}During development, use tsx:
{
"command": "npx",
"args": ["tsx", "/absolute/path/to/acf_mcp/src/server/stdio.ts"]
}Safety Model
Local JSON is the primary source of truth. Tools that create, update, delete, or apply content models write JSON files only. They do not sync the WordPress database automatically.
Recommended workflow:
Call a write tool with
dryRun: true.Review the planned
changes.Call the same tool with
dryRun: false.Review git diff for
acf-json.Call
acf_sync_jsonwithdryRun: true.Call
acf_sync_jsonwithdryRun: falseonly when ready.
Tools
acf_pingacf_list_field_groupsacf_get_field_groupacf_create_field_groupacf_create_field_group_simpleacf_update_field_groupacf_delete_field_groupacf_validate_field_groupacf_audit_ai_accessacf_validate_runtime_compatibilityacf_audit_schema_mappingsacf_runtime_statusacf_export_jsonacf_import_jsonacf_sync_jsonacf_list_post_typesacf_create_post_typeacf_create_post_type_simpleacf_list_taxonomiesacf_create_taxonomyacf_create_taxonomy_simpleacf_list_options_pagesacf_create_options_pageacf_apply_content_model
See docs/tools.md for schemas and examples. See docs/runtime-compatibility.md for ACF 6.8 Abilities API, MCP Adapter, and Schema.org guidance.
Example: Apply a Content Model
{
"dryRun": true,
"backup": true,
"model": {
"postTypes": [
{
"key": "post_type_product",
"post_type": "product",
"labels": { "name": "Products", "singular_name": "Product" },
"public": true,
"show_in_rest": true
}
],
"taxonomies": [
{
"key": "taxonomy_brand",
"taxonomy": "brand",
"object_type": ["product"],
"labels": { "name": "Brands", "singular_name": "Brand" }
}
],
"optionsPages": [
{
"key": "ui_options_page_theme_settings",
"menu_slug": "theme-settings",
"page_title": "Theme Settings"
}
],
"fieldGroups": [
{
"key": "group_product_details",
"title": "Product Details",
"fields": [
{
"key": "field_product_subtitle",
"label": "Subtitle",
"name": "subtitle",
"type": "text"
}
],
"location": [
[{ "param": "post_type", "operator": "==", "value": "product" }]
]
}
]
}
}DDEV
This repository includes .ddev/config.yaml for a WordPress fixture in wp/.
ACF Pro is not bundled or redistributed. Install your licensed ACF Pro copy in the fixture when running WordPress integration checks.
See docs/ddev.md.
Development
npm run typecheck
npm run lint
npm test
npm run buildOptional integration tests can be added under tests/integration and gated with:
RUN_DDEV_INTEGRATION=1 npm run test:integrationProject Structure
src/
adapters/
config/
errors/
prompts/
repositories/
resources/
schemas/
server/
services/
tools/
types/
utils/Explore ACF Pro skill for AI agents
https://github.com/symonbaikov/acf-pro-skill
Contributing
Keep changes small, tested, and backward-compatible. New tools must include:
Zod input schema.
Typed structured result.
Error handling through the shared tool wrapper.
Tests for success, validation failure, and dry-run behavior when mutating.
License
MIT
Available Tools
17 toolsacf_apply_content_modelApply ACF Content ModelA
Apply a declarative content model to Local JSON in dependency-safe order: post types, taxonomies, options pages, field groups.
Inputs: model (required), backup, dryRun.
acf_create_field_groupCreate ACF Field GroupB
Create a field group Local JSON file. Backs up an existing file if the key already exists.
Inputs: fieldGroup (required), backup, dryRun.
acf_create_options_pageCreate ACF Options PageC
Create or update an ACF Pro options page Local JSON file. Options pages require ACF Pro in WordPress.
Inputs: optionsPage (required), backup, dryRun.
acf_create_post_typeCreate ACF Post TypeC
Create or update an ACF-managed custom post type Local JSON file.
Inputs: postType (required), backup, dryRun.
acf_create_taxonomyCreate ACF TaxonomyC
Create or update an ACF-managed taxonomy Local JSON file.
Inputs: taxonomy (required), backup, dryRun.
acf_delete_field_groupDelete ACF Field GroupC
Delete a field group Local JSON file by key after creating a backup when possible.
Inputs: key (required), backup, dryRun.
acf_export_jsonExport ACF JSON via WP-CLIC
Run the whitelisted wp acf json export command. This does not execute arbitrary shell or PHP code.
Inputs: dir, stdout, postTypes, taxonomies, +2 more.
acf_get_field_groupGet ACF Field GroupB
Read one ACF field group by key from Local JSON.
Inputs: key (required).
acf_import_jsonImport ACF JSON via WP-CLIC
Run the whitelisted wp acf json import <file> command. This may update WordPress database ACF structures.
Inputs: file (required).
acf_list_field_groupsList ACF Field GroupsA
Read all ACF field groups from Local JSON without touching the WordPress database.
Inputs: no named parameters.
acf_list_options_pagesList ACF Options PagesA
Read ACF Pro options page Local JSON files. Options pages require ACF Pro in WordPress.
Inputs: no named parameters.
acf_list_post_typesList ACF Post TypesA
Read ACF-managed custom post type Local JSON files.
Inputs: no named parameters.
acf_list_taxonomiesList ACF TaxonomiesA
Read ACF-managed custom taxonomy Local JSON files.
Inputs: no named parameters.
acf_pingACF MCP PingA
Check server health and return non-secret configuration details.
Inputs: no named parameters.
acf_sync_jsonSync ACF Local JSON via WP-CLIB
Explicitly sync Local JSON changes to WordPress using wp acf json sync; supports WP-CLI dry-run.
Inputs: key, type, dryRun.
acf_update_field_groupUpdate ACF Field GroupC
Update a field group Local JSON file by writing the supplied full field group object.
Inputs: fieldGroup (required), backup, dryRun.
acf_validate_field_groupValidate ACF Field GroupB
Validate a field group payload against the server ACF Local JSON schema without writing files.
Inputs: fieldGroup (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool targets a distinct ACF entity (post type, taxonomy, field group, options page) with clear actions, so no ambiguity exists.
All tools follow the verb_noun pattern (e.g., acf_create_field_group, acf_list_post_types) with consistent prefix 'acf_'.
17 tools are well-scoped for managing ACF entities, covering create, read, update, delete, import, export, sync, validation, and health checks.
Covers CRUD for field groups, post types, taxonomies, options pages, plus import/export/sync/validation. Minor gap: no separate tool for managing individual fields within a group, but that is covered via field group updates.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
Model Context Protocol server for todo.vu task management and time tracking.
MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceImplements a Model Context Protocol server for WordPress that enhances VS Code with WordPress-specific intelligence, including database integration, code completion, and documentation.2MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready Model Context Protocol server that provides comprehensive file system management capabilities for seamless integration with Claude Desktop.1MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that turns WordPress sites into AI-operable surfaces by exposing CRUD primitives for posts, users, comments, and settings. It supports both local STDIO and remote HTTP transports, allowing AI assistants to manage content and site configuration directly.94 npm10MIT
- FlicenseBqualityDmaintenanceLocal MCP server for Codex/Claude to query and edit WordPress content through the WordPress REST API.26-