{"id":42,"date":"2026-06-10T21:15:48","date_gmt":"2026-06-11T02:15:48","guid":{"rendered":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/?p=42"},"modified":"2026-06-10T21:15:48","modified_gmt":"2026-06-11T02:15:48","slug":"connect-wordpress-7-0-claude-code-mcp","status":"publish","type":"post","link":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/wordpress-tutorials\/connect-wordpress-7-0-claude-code-mcp\/","title":{"rendered":"How to Connect WordPress 7.0 to Claude Code via MCP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress 7.0 includes AI-related infrastructure around the <strong>Abilities API<\/strong>, and the WordPress <strong>MCP Adapter<\/strong> can bridge those abilities to tools like Claude Code. You still need extra setup before Claude can discover WordPress functionality or make changes to your website. This guide walks through every step to get it working from scratch.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s New in WordPress 7.0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress 7.0 introduces important AI-related building blocks:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Component<\/th><th>What it does<\/th><\/tr><tr><td><strong>Abilities API<\/strong><\/td><td>Registers WordPress actions as typed, discoverable &#8220;abilities&#8221;<\/td><\/tr><tr><td><strong>MCP Adapter<\/strong><\/td><td>Bridges those abilities to the Model Context Protocol (MCP) so AI clients can call them<\/td><\/tr><tr><td><strong>AI Client<\/strong><\/td><td>A shared PHP\/JS SDK for making LLM calls from within WordPress<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Abilities API<\/strong> is available in WordPress core. The <strong>MCP Adapter<\/strong> is a separate WordPress package that must be installed and configured before MCP clients can use exposed abilities.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress 7.0 or higher<\/li>\n\n\n\n<li><a href=\"https:\/\/getcomposer.org\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">Composer<\/a> installed on your machine<\/li>\n\n\n\n<li><a href=\"https:\/\/claude.ai\/code\" target=\"_blank\" rel=\"noreferrer noopener\">Claude Code<\/a> CLI installed<\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/cli\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP CLI<\/a> installed (optional)<\/li>\n\n\n\n<li>Administrator access to your WordPress site<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1 \u2014 Install the MCP Adapter Plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The MCP Adapter is the official WordPress plugin that exposes your site as an MCP server. It is maintained at <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/\" target=\"_blank\" rel=\"noreferrer noopener\">github.com\/WordPress\/mcp-adapter<\/a>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> <br>&#8211; An older plugin by Automattic (<code>Automattic\/wordpress-mcp<\/code>) is deprecated. Use only the official <code>WordPress\/mcp-adapter<\/code>.<br>&#8211; This plugin does not exist in the WordPress repo so you cannot find it in the &#8220;Add new Plugins&#8221; section of your WordPress dashboard<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Install via WordPress Admin<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download the latest release <code>.zip<\/code> from <a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\">github.com\/WordPress\/mcp-adapter\/releases<\/a><\/li>\n\n\n\n<li>In WP admin go to <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong><\/li>\n\n\n\n<li>Upload the zip and click <strong>Activate<\/strong><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Install via WP-CLI<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>wp plugin install https:\/\/github.com\/WordPress\/mcp-adapter\/releases\/latest\/download\/mcp-adapter.zip --activate<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 \u2014 Run Composer Install<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed the plugin from GitHub (not the plugin directory), it requires Composer dependencies. Navigate to the plugin folder and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer install --no-dev .<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin folder is located at:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-content\/plugins\/mcp-adapter\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you skip this step you will see the error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MCP Adapter: The Composer autoloader was not found. If you installed the plugin\nfrom the GitHub source code, make sure to run `composer install`.<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 \u2014 Flush Permalinks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After activating the plugin, flush rewrite rules so the REST API registers the new MCP routes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Settings \u2192 Permalinks<\/strong><\/li>\n\n\n\n<li>Click <strong>Save Changes<\/strong> (no changes needed \u2014 just saving flushes the rules)<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Verify the MCP route is registered<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/yoursite.com\/wp-json\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for <code>mcp<\/code> in the list of namespaces. You should see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;yoursite.com\/wp-json\/mcp\/mcp-adapter-default-server<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4 \u2014 Generate a WordPress Application Password<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The MCP endpoint uses WordPress Application Passwords for authentication.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Users \u2192 Profile<\/strong> in WP admin<\/li>\n\n\n\n<li>Scroll to <strong>Application Passwords<\/strong><\/li>\n\n\n\n<li>Enter a name (e.g. <code>Claude MCP<\/code>) and click <strong>Add New Application Password<\/strong><\/li>\n\n\n\n<li><strong>Copy the password immediately<\/strong> \u2014 it is only shown once (format: <code>xxxx xxxx xxxx xxxx xxxx xxxx<\/code>)<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5 \u2014 Add the MCP Server to Claude Code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command, replacing the placeholders with your site URL, WordPress username, and application password (remove spaces from the app password before encoding):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, Base64-encode your credentials:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo -n \"your-username:your-app-password-no-spaces\" | base64<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then add the MCP server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>claude mcp add my-wordpress-site https:\/\/yoursite.com\/wp-json\/mcp\/mcp-adapter-default-server --transport http --header \"Authorization: Basic &lt;base64-encoded-credentials&gt;\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On success you will see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Added HTTP MCP server my-wordpress-site with URL: https:\/\/yoursite.com\/wp-json\/mcp\/mcp-adapter-default-server to local config<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Make sure you exit Claude Code and start it again<\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6 \u2014 Enable Core Abilities via MU-Plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, the three built-in core abilities exist but are <strong>not exposed via MCP<\/strong> (<code>mcp.public<\/code> is not set). You need to enable them with a filter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create the following file at <code>wp-content\/mu-plugins\/mcp-ability-bridge.php<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/**\n * Plugin Name: MCP Ability Bridge\n * Description: Marks core WordPress abilities as accessible via MCP.\n *\/\nadd_filter( 'wp_register_ability_args', function( $args, $ability_id ) {\n    $abilities_to_expose = &#91;\n        'core\/get-site-info',\n        'core\/get-environment-info',\n        'core\/get-user-info',\n    ];\n    if ( in_array( $ability_id, $abilities_to_expose, true ) ) {\n        $args&#91;'meta']&#91;'mcp']&#91;'public'] = true;\n    }\n    return $args;\n}, 10, 2 );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">MU-plugins load automatically \u2014 no activation needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, you are only exposing the three abilities above. Do not assume Claude Code can edit your content yet. To expose more abilities, you need to write code or use a trusted plugin that exposes the specific abilities you want available. WPadmin.AI Premium is a simpler paid option if you want WordPress help without manually configuring MCP. Buy Premium, pair your website with a simple token license in your WordPress settings page, and you are done.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7 \u2014 Verify the Connection<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Claude Code, then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/mcp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see your WordPress site listed as a connected MCP server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To confirm abilities are discoverable, ask Claude Code:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">&#8220;Discover available WordPress abilities on my site&#8221;<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">You should get back the three core abilities:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Ability<\/th><th>Description<\/th><\/tr><tr><td><code>core\/get-site-info<\/code><\/td><td>Returns site name, URL, admin email, language, version<\/td><\/tr><tr><td><code>core\/get-user-info<\/code><\/td><td>Returns profile details for the authenticated user<\/td><\/tr><tr><td><code>core\/get-environment-info<\/code><\/td><td>Returns PHP version, DB version, WordPress version, environment type<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Extending with Custom Abilities<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The three core abilities are read-only. To expose additional WordPress functionality (e.g. listing plugins, querying posts), you can register custom abilities using <code>wp_register_ability()<\/code> and add them to the <code>$abilities_to_expose<\/code> array in your mu-plugin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example \u2014 add a custom ability to list inactive plugins:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp_register_ability( 'custom\/get-inactive-plugins', &#91;\n    'label'       =&gt; 'Get Inactive Plugins',\n    'description' =&gt; 'Returns a list of installed but inactive plugins.',\n    'callback'    =&gt; function( $params ) {\n        if ( ! function_exists( 'get_plugins' ) ) {\n            require_once ABSPATH . 'wp-admin\/includes\/plugin.php';\n        }\n        $all_plugins    = get_plugins();\n        $active_plugins = get_option( 'active_plugins', &#91;] );\n        $inactive       = array_filter( $all_plugins, function( $file ) use ( $active_plugins ) {\n            return ! in_array( $file, $active_plugins, true );\n        }, ARRAY_FILTER_USE_KEY );\n        return array_keys( $inactive );\n    },\n    'meta' =&gt; &#91; 'mcp' =&gt; &#91; 'public' =&gt; true ] ],\n] );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, your <a href=\"https:\/\/wpadmin.ai\/ai-website-developer-blog\/wordpress-tutorials\/connect-wordpress-7-0-claude-code-mcp\/\">WordPress 7.0 website is connected to Claude Code<\/a> and you can get things done from the MCP.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Error<\/th><th>Cause<\/th><th>Fix<\/th><\/tr><tr><td><code>rest_no_route<\/code> 404<\/td><td>MCP routes not registered<\/td><td>Flush permalinks (Settings \u2192 Permalinks \u2192 Save)<\/td><\/tr><tr><td><code>rest_forbidden<\/code> 401<\/td><td>Missing or wrong credentials<\/td><td>Check Application Password and Base64 encoding<\/td><\/tr><tr><td><code>Composer autoloader not found<\/code><\/td><td>Composer dependencies missing<\/td><td>Run <code>composer install --no-dev<\/code> in the plugin folder<\/td><\/tr><tr><td><code>abilities: []<\/code> from discover<\/td><td>Abilities not flagged as MCP public<\/td><td>Add the <code>mcp-ability-bridge.php<\/code> mu-plugin from Step 6<\/td><\/tr><tr><td><code>mcp.public!=true<\/code> error<\/td><td>Same as above<\/td><td>Same fix as above<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Looking for a simpler option?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you want AI-assisted WordPress help without manually configuring MCP, application passwords, exposed abilities, and Claude Code, <a href=\"https:\/\/wpadmin.ai\/\">WPadmin.AI Premium<\/a> gives you a simpler option: buy Premium, pair your website with a simple token license in your WordPress settings page, and you are done.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress\/mcp-adapter on GitHub<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/WordPress\/mcp-adapter\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">MCP Adapter Releases<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.wordpress.org\/news\/2026\/02\/from-abilities-to-ai-agents-introducing-the-wordpress-mcp-adapter\/\" target=\"_blank\" rel=\"noreferrer noopener\">Introducing the WordPress MCP Adapter \u2013 WordPress Developer Blog<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_register_ability\/\" target=\"_blank\" rel=\"noreferrer noopener\">wp_register_ability() Function Reference<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/make.wordpress.org\/core\/2026\/05\/14\/wordpress-7-0-field-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress 7.0 Field Guide \u2013 Make WordPress Core<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/make.wordpress.org\/core\/2026\/03\/24\/client-side-abilities-api-in-wordpress-7-0\/\" target=\"_blank\" rel=\"noreferrer noopener\">Client-Side Abilities API in WordPress 7.0 \u2013 Make WordPress Core<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A practical guide to connecting WordPress 7.0 to Claude Code with MCP, application passwords, the MCP Adapter, and exposed WordPress abilities.<\/p>\n","protected":false},"author":1,"featured_media":44,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[15,14,8,18],"class_list":["post-42","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-tutorials","tag-claude-code-wordpress","tag-wordpress-mcp","tag-wordpress-troubleshooting","tag-wpadmin-ai-premium"],"_links":{"self":[{"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":5,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":48,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions\/48"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=\/wp\/v2\/media\/44"}],"wp:attachment":[{"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpadmin.ai\/ai-website-developer-blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}