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.
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 in | Needs | Best for | |
|---|---|---|---|
| claude.ai (browser) Recommended | OAuth: one click, then approve on your site | A public HTTPS site | Everyday work on a live site, nothing to install |
| Claude desktop app | OAuth, the same flow as the browser | A public HTTPS site | The same, from the app |
| Claude Code | OAuth, or an application password | The Claude Code command-line tool to run the setup commands, and a paid Claude plan or a Console account | Developers 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.

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.

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.


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.

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.

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.

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.

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.


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.

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.


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.
- Install and sign in to Claude Code as in steps 1 and 2 above.
- In Fabrement → MCP Connection, pick Claude, open the Advanced tab, then Application password, and press Generate application password.
- Connect in one of three ways the screen then offers: a terminal command, a
.mcp.jsonfile, or instructions you give to Claude to set it up. Each one carries the password in an Authorization header.


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 see | What it is |
|---|---|
claude is not recognized | The 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 connector | Normal when a connector comes from a link. Check that the address is your own site. |
| claude.ai cannot reach the site | The 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 connector | The Free Claude plan allows one custom connector. On Team and Enterprise, only an Owner can add one. |
| Connected, but Claude sees no tools | The 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.

Frequently asked questions
Can I connect Claude to WordPress without a plugin?
Partly. WordPress 6.9 added the Abilities API, the standard way for plugins to declare what an AI agent may do, and the official MCP Adapter, a separate WordPress project, turns those abilities into an MCP connection. Out of the box the adapter gives the agent three tools to discover, inspect and run abilities, and abilities stay private until a plugin makes them public. To build blocks, templates or pages, you still need a plugin that provides those operations.
Can I connect Claude to my site on the free Claude plan?
Yes. Custom connectors work on Claude Free, Pro, Max, Team and Enterprise. The Free plan is limited to one custom connector, and on Team and Enterprise only an Owner can add one. Claude Code is different: it needs a paid Claude plan or a Claude Console account.
Why can claude.ai not connect to my local WordPress site?
Claude connects to custom connectors from Anthropic’s cloud, not from your computer, so a site on localhost or a private network is out of its reach. For a local site, use Claude Code, which connects from your own machine: with OAuth when the site has a trusted HTTPS certificate, or with an application password.
Does the OAuth connection share my WordPress password?
No. You sign in on your own site and approve access, and your AI client (ChatGPT, Claude or Codex) receives a token, not your password. The token only works through the Fabrement MCP server on that site: it cannot sign in to wp-admin or call other REST API routes. It renews itself in the background and stays active until you disconnect it in the Connection access card on Fabrement → MCP Connection, or turn OAuth off.
Which AI agents can connect?
ChatGPT, Claude (claude.ai and Claude Code), Codex and Cursor. In Fabrement → MCP Connection you pick your client: ChatGPT, Claude and Codex connect with OAuth, Cursor and any other MCP client with a WordPress application password, and the screen generates the setup to paste. Step by step: ChatGPT and Codex, Claude. Rather not use an MCP client? Take the admin chat route instead: OpenAI, Claude and Gemini work there, inside wp-admin.
Is it safe to give an AI agent access to my site?
Treat the connection like an administrator: whether it uses OAuth or an application password, the agent acts as your administrator user, with write and delete access to content. Connect only clients you trust, work on staging when the change is significant, keep versions so a change can be rolled back, disconnect the agent in the Connection access card when the work is done, and review anything that touches payments, authentication or personal data yourself.
Using another client? See how to connect ChatGPT and Codex to WordPress. For Cursor, see how to connect Cursor to WordPress.
Sources
- Claude Code quickstart and Claude Code MCP documentation (claude mcp add, claude mcp login, scopes)
- Get started with custom connectors, Claude Help Center (plans, where Claude connects from)
- WordPress MCP Adapter and its CLI usage guide
- Abilities API in WordPress 6.9
Checked on 30 September 2026, with Fabrement 1.4.0. If a step has changed, tell us and we will correct it.