---
title: "Connect Claude Code to WordPress Studio"
description: "Install the WordPress Studio plugin in Claude Code, and Claude Code can create, run, and change your local WordPress sites."
sidebar:
  label: "Claude Code"
---

The plugin adds WordPress Studio’s Model Context Protocol (MCP) server, named `wordpress-studio`, and the WordPress Studio skills to Claude Code. It carries its own WordPress Studio CLI, so you don’t need anything else. In the Claude desktop app, the plugin works in the **Code** tab and in Cowork tasks on your computer, not in regular chats. For regular chats, see [Connect other AI agents to WordPress Studio](/docs/mcp-on-studio/other-agents/).

**Applies to:** Claude Code in the terminal or in the Claude desktop app, on macOS, Windows, or Linux. The steps match WordPress Studio 2.5.0, and the WordPress Studio app is optional. You don’t need a WordPress.com account for local sites. To work on WordPress.com sites, create previews, or publish, log in to WordPress.com when the agent asks.

## Before you start

- Claude Code, installed and signed in.
- To install from the terminal, Node.js 22 or later on your `PATH`. A plugin installed from the WordPress Studio app runs with the app’s own Node.js.

## Install the plugin from WordPress Studio

1.  In WordPress Studio, open **Settings** from the account menu at the bottom of the sidebar, or press ⌘, (Ctrl+, on Windows and Linux).
2.  Select **Agents**.
3.  Next to **Claude Code**, click **Install**. The row shows **Installed** when the plugin is in place.
4.  Start a new Claude Code session, or run `/reload-plugins` in the current one.

A plugin installed this way updates itself when WordPress Studio updates.

## Install the plugin from the terminal

Run these commands in your terminal:

```bash
claude plugin marketplace add Automattic/studio-plugins
claude plugin install wp-studio@studio
```

Then start a new Claude Code session, or run `/reload-plugins` in the current one. The first time the plugin starts, it unpacks its WordPress Studio CLI. This takes a few seconds, or a minute or two on Windows.

To update the plugin later, run:

```bash
claude plugin update wp-studio@studio
```

## Add only the MCP server

If you already have the [WordPress Studio CLI](/docs/cli/) on your `PATH`, you can add the MCP server without the plugin’s skills:

```bash
claude mcp add --scope user wordpress-studio -- studio mcp
```

`--scope user` makes the server available in every project. The agent still gets WordPress Studio’s skills and rules, over the MCP Skills extension when the agent supports it, or through the `studio_instructions` tool.

## Check that Claude Code is connected

1.  In a new Claude Code session, run `/mcp`. The list includes the `wordpress-studio` server.
2.  Ask Claude Code: “List my WordPress Studio sites.” Claude Code calls WordPress Studio’s `site_list` tool, then lists your sites or says you don’t have any yet.

An answer without a WordPress Studio tool call doesn’t confirm the connection. Expand the tool call in the session to check which tool ran.

## Try these prompts

- “Build a WordPress site for my bakery, with a menu page and opening hours.”
- “Start my site Coffee Shop and take a screenshot of its home page.”
- “Install WooCommerce on Coffee Shop and add three sample products.”
- “Run an SEO audit on the home page of Coffee Shop.”
- “Check how fast the home page of Coffee Shop loads.”
- “Create a preview link of Coffee Shop that I can share.”

Replace Coffee Shop with the name of one of your sites. Previews need a WordPress.com login.

## Troubleshooting

### Why does the Agents page say Not installed next to Claude Code?

WordPress Studio didn’t find the `claude` command. It looks in `~/.local/bin`, in `~/.claude/local`, and on the `PATH` of your login shell. Install Claude Code, then open the **Agents** page again, or install the plugin from the terminal.

### Why doesn’t Claude Code see WordPress Studio after I install the plugin?

Claude Code loads plugins when a session starts. Start a new session, or run `/reload-plugins`.

### Why does the WordPress Studio server fail to start?

A plugin installed from the terminal runs with the Node.js on your `PATH`, which must be version 22 or later. Run `node --version` to check it. Update Node.js, or install the plugin from the WordPress Studio app, which uses the app’s own Node.js.

### Why does the plugin work in the Code tab but not in a regular Claude chat?

The plugin works in Claude Code, including the **Code** tab and Cowork tasks in the Claude desktop app. To use WordPress Studio in regular chats, add the MCP server to the Claude desktop app’s configuration. See [Connect other AI agents to WordPress Studio](/docs/mcp-on-studio/other-agents/#claude-desktop).

## Related

- [MCP on WordPress Studio](/docs/mcp-on-studio/)
- [Connect Codex to WordPress Studio](/docs/mcp-on-studio/codex/)
- [Connect Cursor to WordPress Studio](/docs/mcp-on-studio/cursor/)
- [Agent Skills in WordPress Studio](/docs/agent-skills-wordpress-studio/)
- [WordPress Studio CLI](/docs/cli/)
- [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
