Skip to main content

ACF 6.8.12+ & WordPress Abilities API: Safe MCP Setup for Claude & Cursor (2026)

ACF 6.8.12 flipped Abilities on by default and renamed allow_ai_access to enable_acf_abilities. Here is how to connect ACF to Claude and Cursor via MCP and lock down production fields.

Faisal Yaqoob
9 min
#ACF#Advanced Custom Fields#WordPress Abilities API#MCP#WordPress#PHP
ACF 6.8.12+ & WordPress Abilities API: Safe MCP Setup for Claude & Cursor (2026) — Development guide thumbnail

If you followed an early 2026 tutorial on connecting Advanced Custom Fields (ACF) to Claude or Cursor, check your settings before you upgrade.

Between ACF 6.8.0 and ACF 6.8.12, the ACF team switched Abilities from opt-in to opt-out, renamed the global filter, and renamed the Local JSON key that hides sensitive field groups. Any acf-json/*.json file still carrying "allow_ai_access": false from an older 6.8 build gets ignored after the update.

Quick Answer: How to Connect ACF to Claude or Cursor via MCP

To expose ACF custom fields to Claude or Cursor safely: Run WordPress 6.9+ and ACF 6.8.12+ (Abilities are enabled by default under ACF → Settings → Features), install the official mcp-adapter plugin, create a dedicated low-privilege WordPress user with an Application Password, and point your MCP client to /wp-json/mcp/mcp-adapter-default-server using @automattic/mcp-wordpress-remote. Set "enable_acf_abilities": false on any sensitive field groups before connecting.

How the Request Flow Works

WordPress 6.9+ includes a central Abilities API (WP_Abilities_Registry) where core and plugins register typed actions with JSON Schema inputs and PHP permission callbacks.

The official MCP Adapter plugin reads that registry and exposes each ability as a Model Context Protocol (MCP) tool. When Claude Desktop or Cursor invokes a tool, the request passes through three checks before reaching ACF data:

Request flow from Claude Desktop and Cursor through WordPress MCP Adapter and Abilities API to ACF 6.8.12+ field groups

  1. Application Password auth: The MCP Adapter authenticates as the WordPress user whose credentials live in your local client config.
  2. WordPress permission_callback: Each ability checks capabilities (such as edit_posts or manage_options) for that user before running.
  3. ACF enable_acf_abilities flag: ACF only registers abilities for field groups, custom post types, and taxonomies that have Abilities enabled.

The ACF 6.8.12+ Breaking Change Most Guides Miss

Older guides from earlier this year still tell you to drop add_filter('acf/settings/enable_acf_ai', '__return_true'); into functions.php. In ACF 6.8.12+, both the filter name and the per-group JSON key changed.

Setting / Behavior ACF 6.8.0 – 6.8.11 (Old) ACF 6.8.12+ on WP 6.9+ (Current)
Global default Off (opt-in) On by default (toggle under ACF → Settings → Features)
Global PHP filter acf/settings/enable_acf_ai acf/settings/enable_abilities
Per-group / CPT / Taxonomy key allow_ai_access enable_acf_abilities
Object ability names acf/create-book, acf/books acf/create-book-post, acf/list-book-posts

Watch your acf-json/ folder after updating. If you locked down a billing, CRM, or internal settings field group in ACF 6.8.x with "allow_ai_access": false, upgrading to 6.8.12+ causes ACF to ignore that old key and fall back to the new default (true).

Local JSON diff showing allow_ai_access ignored in ACF 6.8.12+ versus enable_acf_abilities active

Audit your theme's acf-json directory right after updating. If you hit missing sync tabs or stale JSON files during that cleanup, fix them first with my ACF Local JSON sync troubleshooting guide so Git and the database stay in sync.

Step 1: Install the Official WordPress MCP Adapter

On WordPress 6.9+ (PHP 7.4+), install and activate the official MCP Adapter with WP-CLI:

wp plugin install mcp-adapter --activate

Once active, WordPress exposes the default MCP server endpoint at:

https://yoursite.com/wp-json/mcp/mcp-adapter-default-server

Create a dedicated WordPress user for the agent instead of reusing your Administrator account:

  1. Go to Users → Add New and pick the lowest role the job needs (usually Editor for content work, not Administrator unless you want the agent registering CPTs or editing site options).
  2. Open that user's profile, scroll to Application Passwords, name it Claude MCP Staging, and copy the generated password.

Step 2: Connect Claude Desktop or Cursor

Claude Desktop and Cursor connect to remote WordPress MCP servers through @automattic/mcp-wordpress-remote.

Add this block to claude_desktop_config.json (Claude Desktop → Settings → Developer → Edit Config) or ~/.cursor/mcp.json (Cursor):

{
  "mcpServers": {
    "wordpress-acf-staging": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://staging.yoursite.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_USER": "mcp_editor",
        "WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Restart Claude Desktop or reload Cursor, then ask it to list available ACF field groups. If the connection works, it calls acf/field-groups (or acf/list-field-groups) and returns your field keys, types, and location rules.

Need a clean ACF Pro build for a client or agency? I turn Figma designs into custom WordPress themes with versioned acf-json and sub-1.2s load times. Send your brief for a written scope within 4 hours (100% async, no calls). View custom ACF theme services or request a quote.

Step 3: Lock Down Production Field Groups in Code

On production sites, put your access rules in PHP instead of relying on admin checkboxes so nobody accidentally exposes internal fields.

Turn Off ACF Abilities Globally on Production

If you only want AI tools running on staging and local environments, turn ACF Abilities off in production:

<?php
// Disable ACF Abilities API globally on production environments.
if ( function_exists( 'wp_get_environment_type' ) && 'production' === wp_get_environment_type() ) {
    add_filter( 'acf/settings/enable_abilities', '__return_false' );
}

Opt Out Specific Field Groups Registered in PHP

When registering field groups with acf_add_local_field_group(), set enable_acf_abilities to false on anything holding API keys, internal notes, or billing settings:

<?php
acf_add_local_field_group( array(
    'key'                  => 'group_internal_crm_sync',
    'title'                => 'Internal CRM Sync',
    'enable_acf_abilities' => false, // Replaces 'allow_ai_access' in ACF 6.8.12+
    'fields'               => array(
        array(
            'key'   => 'field_crm_webhook_secret',
            'label' => 'Webhook Secret',
            'name'  => 'crm_webhook_secret',
            'type'  => 'text',
        ),
    ),
    'location'             => array(
        array(
            array(
                'param'    => 'options_page',
                'operator' => '==',
                'value'    => 'theme-general-settings',
            ),
        ),
    ),
) );

Step 4: Register a Custom Read-Only ACF Ability in PHP

Built-in ACF abilities cover listing and creating objects, but client sites usually have custom checks too—like finding published Case Study posts that are missing required ACF fields before launch.

Register a read-only ability on wp_abilities_api_init. WordPress validates incoming arguments against your JSON Schema before your callback runs, and readonly => true marks the tool as read-only for MCP clients.

<?php
/**
 * 1. Register a custom ability category.
 */
add_action( 'wp_abilities_api_categories_init', function (): void {
    if ( ! function_exists( 'wp_register_ability_category' ) ) {
        return;
    }

    wp_register_ability_category( 'agency-audits', array(
        'label'       => __( 'Agency Audits', 'my-theme' ),
        'description' => __( 'Read-only ACF content quality checks.', 'my-theme' ),
    ) );
} );

/**
 * 2. Register a read-only ability that checks required ACF fields on a CPT.
 */
add_action( 'wp_abilities_api_init', function (): void {
    if ( ! function_exists( 'wp_register_ability' ) ) {
        return;
    }

    wp_register_ability( 'my-theme/audit-missing-acf-fields', array(
        'label'       => __( 'Audit Missing ACF Fields', 'my-theme' ),
        'description' => __( 'Returns published posts of a post type missing a required ACF field.', 'my-theme' ),
        'category'    => 'agency-audits',
        'input_schema' => array(
            'type'       => 'object',
            'required'   => array( 'post_type', 'field_name' ),
            'properties' => array(
                'post_type'  => array(
                    'type'        => 'string',
                    'description' => 'Registered post type slug, e.g. case_study.',
                ),
                'field_name' => array(
                    'type'        => 'string',
                    'description' => 'ACF field name to check for empty values.',
                ),
            ),
        ),
        'output_schema' => array(
            'type'       => 'object',
            'required'   => array( 'missing_count', 'post_ids' ),
            'properties' => array(
                'missing_count' => array( 'type' => 'integer' ),
                'post_ids'      => array(
                    'type'  => 'array',
                    'items' => array( 'type' => 'integer' ),
                ),
            ),
        ),
        'permission_callback' => function () {
            if ( ! current_user_can( 'edit_posts' ) ) {
                return new WP_Error(
                    'rest_forbidden',
                    __( 'You do not have permission to run this audit.', 'my-theme' ),
                    array( 'status' => rest_authorization_required_code() )
                );
            }
            return true;
        },
        'execute_callback' => function ( array $input ) {
            $post_type  = sanitize_key( $input['post_type'] );
            $field_name = sanitize_key( $input['field_name'] );

            if ( ! post_type_exists( $post_type ) || ! function_exists( 'get_field' ) ) {
                return new WP_Error( 'invalid_request', 'Invalid post type or ACF inactive.' );
            }

            $ids = get_posts( array(
                'post_type'      => $post_type,
                'post_status'    => 'publish',
                'posts_per_page' => 100,
                'fields'         => 'ids',
            ) );

            $missing = array();
            foreach ( $ids as $post_id ) {
                $val = get_field( $field_name, $post_id );
                if ( empty( $val ) ) {
                    $missing[] = (int) $post_id;
                }
            }

            return array(
                'missing_count' => count( $missing ),
                'post_ids'      => $missing,
            );
        },
        'meta' => array(
            'public'      => true,
            'annotations' => array(
                'readonly' => true,
            ),
        ),
    ) );
} );

Once that snippet lives in your child theme or site-specific plugin, Claude or Cursor can run "Check all published case_study posts missing the client_quote field" in a single call, without touching any database write paths.

Frequently Asked Questions

Do I still need acf/settings/enable_acf_ai in ACF 6.8.12+?

No. ACF 6.8.12 renamed enable_acf_ai to enable_abilities and turned the Abilities API integration on by default on WordPress 6.9+. You only need acf/settings/enable_abilities if you want to disable or force-lock the setting in PHP.

Why did my hidden ACF field group show up after updating to ACF 6.8.12?

Earlier ACF 6.8 releases stored opt-out flags as "allow_ai_access": false in Local JSON and PHP registrations. ACF 6.8.12+ ignores allow_ai_access and checks "enable_acf_abilities": false instead. Update your acf-json/*.json files and re-sync field groups to hide sensitive groups again.

Does enabling the ACF Abilities API expose my custom fields to the public?

No. Abilities registered through WordPress core require an authenticated user and run through each ability's permission_callback. Unauthenticated visitors cannot call MCP tools or read private field groups.

Should I connect Claude or Cursor to production WordPress with an Administrator Application Password?

No. Test on staging first and use a dedicated account with the lowest role required, such as Editor or a custom read-only role. On production, disable ACF Abilities globally or limit registered abilities to read-only audits.

What WordPress and ACF versions are required for MCP and the Abilities API?

You need WordPress 6.9 or newer (which added the core Abilities API), ACF 6.8.12+ for the current enable_abilities schema, PHP 7.4+, and the official mcp-adapter plugin.


Keep Reading

Professional portrait of Faisal Yaqoob, senior WordPress developer with 10+ years experience

Faisal Yaqoob

Senior WordPress Developer & Specialist

Senior WordPress specialist with 10+ years experience engineering custom ACF Pro themes, Core Web Vitals speed optimizations, WooCommerce stores, and white-label agency builds.

10+ Years500+ Projects100+ Agencies