How to Connect Claude to WordPress to Build and Run Your Site
Updated 07.10.2026

How to Connect Claude to WordPress to Build and Run Your Site

With Fabrement, Claude does more than answer questions about WordPress: it builds and runs the site. It creates custom Gutenberg blocks, adds custom fields and site-wide settings, turns Figma frames into WordPress pages, sets up SEO with Yoast and translates the site with WPML. After launch, you manage all of it from the chat, without opening wp-admin. Anything beyond that, you can add yourself: what the agent builds is ordinary WordPress code you own, like a custom theme made for your site. To get there, you connect Claude to the site over MCP.

WordPress 6.9 added the Abilities API: a standard way for a plugin to declare what an AI agent may do on a site. The official MCP Adapter, a separate WordPress project, turns those abilities into an MCP connection that Claude can use. Together they are a common doorway, not a finished product: every plugin that connects an agent follows the same logic, an MCP server on your site that you reach as a WordPress user, but each one has its own setup screen, so the exact steps differ.

This guide shows the steps for Fabrement, in all three places you can use Claude: claude.ai in the browser, the Claude desktop app, and Claude Code, in the terminal or your code editor. It ends with the route that uses no Fabrement at all, the official adapter, and what that route gives you.

Five ways in one 7-minute video, each tested with a real change on a live site.

Key takeaways

  • Three ways in: claude.ai and the desktop app connect with one click and a sign-in on your site (OAuth). Claude Code connects with two terminal commands or a .mcp.json file.
  • Your password stays on your site. With OAuth you approve access on your own WordPress site, and Claude receives a token that only works through the Fabrement MCP server.
  • Local sites need Claude Code. claude.ai and the desktop app reach your site from Anthropic’s cloud, so a site on localhost is out of their reach. Claude Code connects from your machine: with OAuth when the local site has a trusted HTTPS certificate, or with an application password.
  • The free Claude plan works for claude.ai and the desktop app, limited to one custom connector. Claude Code needs a paid plan or a Console account.
  • Without a plugin, the official MCP Adapter gives the agent three generic tools and whatever abilities other plugins make public. Building blocks and pages needs a plugin that provides those operations.

Which way should you use?

How it signs inNeedsBest for
claude.ai (browser) RecommendedOAuth: one click, then approve on your siteA public HTTPS siteEveryday work on a live site, nothing to install
Claude desktop appOAuth, the same flow as the browserA public HTTPS siteThe same, from the app
Claude CodeOAuth, or an application passwordThe Claude Code command-line tool to run the setup commands, and a paid Claude plan or a Console accountDevelopers comfortable with a terminal who work in VS Code, Cursor, JetBrains or the terminal; long build sessions and local sites

Before you start

  • WordPress 6.9 or newer, PHP 8.0 or newer, and an administrator account.
  • Fabrement installed and the site signed in to the Fabrement service: block code is checked and stored there, so nothing can be saved until the site is signed in.
  • For claude.ai and the desktop app, the site must be reachable on the internet over HTTPS.

Every connection detail below comes from Fabrement → MCP Connection in wp-admin, on the Claude card. Copy it from there rather than typing it: the server name and address are specific to your site.

1. Connect claude.ai

Step 1: Press Connect to Claude

In Fabrement → MCP Connection, pick Claude and, on the Recommended tab, press Connect to Claude (1-click). claude.ai opens in a new tab. If its form opens empty, paste the Server name and MCP server URL shown under the button.

Fabrement MCP Connection screen, Claude card on the Recommended tab, with the Connect to Claude (1-click) button and the server name and MCP server URL

Step 2: Check the connector and continue

claude.ai shows Add custom connector with the name and your site’s MCP address already filled in. The red note appears because the connector came from a link, which is how this button works. Check that the address is your own site, then press Continue.

Claude.ai Add custom connector dialog prefilled with the connector name and the site MCP URL

Step 3: Keep the detected settings and add it

In the next window, leave the options Claude detected as they are: Sign in now for authentication, and Use Claude’s published identity for the OAuth client. Press Add.

Claude connector authentication option Sign in now, detected
Claude connector OAuth client option Use Claude published identity, detected

Step 4: Approve access on your site

Your WordPress site opens an authorization page. It says exactly what Claude gets: full access through the Fabrement MCP server, acting with your administrator permissions. The token cannot sign in to wp-admin or call other REST API routes, your WordPress password is not shared, and you can disconnect it any time in the Connection access card on Fabrement → MCP Connection. Press Allow access.

WordPress site authorization page for Claude showing Full Fabrement MCP access and the Allow access button

Step 5: Choose tool permissions

Claude then asks how to handle permissions for the tools. Allowing all keeps the work flowing. Publishing and moving pages to the trash still come back to you, because Fabrement’s operations for those tell the agent to ask you in the chat first. If you want Claude itself to stop and ask, set the delete and status tools to need approval instead.

Step 6: Check the connection

Open a new chat, switch the connector on in the chat’s connectors menu if it is off, and ask: Do you have an MCP connection to your-site.com? List the blocks on it. If Claude answers with your real blocks, you are connected.

2. Connect the Claude desktop app

If you already connected on claude.ai, there is nothing to do: the connector is saved to your Claude account, so it is already in the desktop and mobile apps. To add it from the desktop app instead, open Customize, then Connectors, press Add and choose Add custom connector.

Claude desktop app connectors screen with Add custom connector

Copy the Server name and the MCP server URL from the Claude card in Fabrement → MCP Connection into the form, and add it. From here the flow is the same as in the browser: approve access on your site, choose tool permissions, then check the connection in a new chat. Connectors belong to your Claude account, so one you added on claude.ai may already be listed in the app.

Fabrement MCP Connection: the server name and MCP server URL to copy

3. Connect Claude Code

Claude Code is Anthropic’s coding agent. It runs in a terminal, as an extension in VS Code, Cursor or JetBrains, and in the Code tab of the Claude desktop app, and it connects to your site from your own machine. Fabrement’s setup commands run in a terminal, so install the command-line version first; the server you add there is also available in the other Claude Code surfaces, since they share MCP servers. It is the route for developers comfortable with a terminal, for long build sessions, and for local sites.

Step 1: Install Claude Code

Run the installer for your system, from Anthropic’s Claude Code quickstart. On macOS, Linux or WSL:

curl -fsSL https://claude.ai/install.sh | bash

In Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

Then close the terminal, open a new one, and run claude --version. If Windows answers that claude is not recognized, the install folder is not on your PATH yet: Anthropic’s installation troubleshooting page shows the fix. Homebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) work too, but they do not update themselves.

Windows terminal error: claude is not recognized as an internal or external command

Step 2: Sign in to Claude

Run claude, pick your display preferences, and sign in with your Claude account in the browser window that opens. When Claude Code asks, confirm that you trust the folder you started it in.

Claude Code asking to connect to your Claude account, with the Authorize button
Claude Code security prompt: Yes, I trust this folder

Step 3: Add your site

In Fabrement → MCP Connection, pick Claude and open the Advanced tab. Under Claude Code (OAuth) there are two ways to add your site; pick one. Both work in the terminal and in your code editor, and since Claude Code connects from your computer, both also reach a local site with a trusted HTTPS certificate.

Fabrement MCP Connection, Claude card, Advanced tab: Claude Code (OAuth) with the two terminal commands and the .mcp.json option

In a terminal. Run both commands one by one, then approve access in the browser, exactly as in step 4 of the browser route. The site is added to Claude Code for every project (--scope user).

They have this shape, with your own name and address filled in:

claude mcp add --transport http --scope user fabrement-your-site "https://your-site.com/wp-json/fabrement/v1/mcp"
claude mcp login fabrement-your-site

Or with a .mcp.json file. Save the JSON shown on the screen as .mcp.json in the root of a project folder. Claude Code then connects to this site only in that folder. The file holds no password, so it can be committed and shared with your team; each person signs in once with /mcp in Claude Code.

If the sign-in page does not open

Start claude, type /mcp, select your Fabrement server and choose Authenticate. Your site opens the same approval page. When it is connected, the list shows the server with its tools.

Claude Code /mcp server menu with Authenticate, Reconnect and Disable
Claude Code /mcp list showing the Fabrement server connected, with its tools

4. Connect without OAuth: local sites and servers

claude.ai and the desktop app reach your site from Anthropic’s cloud, so a site on localhost or a private network is out of their reach. Claude Code connects from your own computer, and its OAuth connection works with a local site that has a trusted HTTPS certificate. Use an application password when OAuth is not an option: the site has no HTTPS (for example a local http:// site), OAuth is turned off, or the agent runs where no browser can open to approve access, such as a server.

  1. Install and sign in to Claude Code as in steps 1 and 2 above.
  2. In Fabrement → MCP Connection, pick Claude, open the Advanced tab, then Application password, and press Generate application password.
  3. Connect in one of three ways the screen then offers: a terminal command, a .mcp.json file, or instructions you give to Claude to set it up. Each one carries the password in an Authorization header.
Fabrement MCP Connection, Claude card, Advanced tab: the Application password section with the Generate application password button
Fabrement MCP Connection, application password: a terminal command, a .mcp.json file and setup instructions for Claude, with the password hidden

The password is shown once and works until you revoke it. All three ways carry it: the command, the .mcp.json file and the setup instructions. Treat it like an administrator password: never paste it into a screenshot, a chat or a shared document, do not commit the .mcp.json file to Git, and disconnect it in the Connection access card when the work is done.

5. Without Fabrement: the official MCP Adapter

If you only want Claude to reach what WordPress and your other plugins already expose, the official MCP Adapter does that. Install it from the project’s GitHub releases, create an application password under Users, then Profile, and connect Claude Code in one of two ways.

On a local site, straight through WP-CLI:

claude mcp add --transport stdio wordpress -- wp --path=/path/to/your/site mcp-adapter serve --server=mcp-adapter-default-server --user=admin

On a remote site, through the small proxy the adapter’s documentation recommends:

claude mcp add --transport stdio \
  --env WP_API_URL=https://your-site.com/wp-json/mcp/mcp-adapter-default-server \
  --env WP_API_USERNAME=your-username \
  --env WP_API_PASSWORD="your application password" \
  wordpress -- npx -y @automattic/mcp-wordpress-remote@latest

What you get: three tools that discover, inspect and run abilities, and only the abilities that core and your plugins register and make public, since abilities are private by default. That is the right foundation for a developer exposing their own plugin to agents. It does not build blocks, templates or pages by itself; that takes a plugin that provides those operations. The two are compared in WordPress MCP Adapter vs Fabrement.

When it does not work

What you seeWhat it is
claude is not recognizedThe install folder is not on your PATH. Open a new terminal; if it persists, follow Anthropic’s installation troubleshooting page.
A red warning in Add custom connectorNormal when a connector comes from a link. Check that the address is your own site.
claude.ai cannot reach the siteThe site is local, not on HTTPS, or blocked by a firewall. For a local site, use Claude Code, as in section 4.
You cannot add a second connectorThe Free Claude plan allows one custom connector. On Team and Enterprise, only an Owner can add one.
Connected, but Claude sees no toolsThe chat started before you connected. Open a new chat, or in Claude Code check /mcp.
401, or «incorrect password»The command was cut off when copied, or the password was revoked. Generate a fresh one.

Revoking access

OAuth access and application passwords both stay active until you revoke them. The Connection access card on Fabrement → MCP Connection lists every connection to the site, whichever client set it up, with when it was created and last used. Press Disconnect next to one to revoke it, and remove the connector in Claude too. Switching OAuth off at the top disconnects every OAuth client at once and leaves application passwords as they are. Revoking disconnects the agent immediately.

Fabrement Connection access card listing OAuth and application password connections, each with a Disconnect button, and the OAuth switch
FAQ

Frequently asked questions

Using another client? See how to connect ChatGPT and Codex to WordPress. For Cursor, see how to connect Cursor to WordPress.

Sources

Checked on 30 September 2026, with Fabrement 1.4.0. If a step has changed, tell us and we will correct it.

Start building custom Gutenberg sections with AI

Install the plugin in under a minute. Generate your first sections free. Connect your own API key when you're ready to scale.

NO CREDIT CARD · FREE TIER INCLUDED · WORKS WITH EXISTING SITES