Connect Grok Build to WordPress Studio

Install the WordPress Studio plugin in Grok Build, and Grok Build can create, run, and change your local WordPress sites from your terminal.

On this page

The plugin adds WordPress Studio’s Model Context Protocol (MCP) server, named wordpress-studio, and the WordPress Studio skills to Grok Build. Installed from the terminal, the plugin downloads its WordPress Studio CLI from the WordPress Studio release on GitHub the first time it starts, and checks the download against a SHA-256 checksum.

Applies to: Grok Build on macOS, Windows, or Linux. The steps match WordPress Studio 2.5.0, and the WordPress Studio app is optional. Grok Bot doesn’t offer the plugin, because Grok Bot runs in the cloud and WordPress Studio works with sites on your computer. 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

  • Grok Build, 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 Grok Build, click Install. The row shows Installed when the plugin is in place.
  4. Start a new Grok Build session.

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

Install the plugin from the terminal

Run this command in your terminal:

grok plugin install Automattic/studio-plugins@claude-directory --trust

Then start a new Grok Build session. The command installs the plugin from the claude-directory branch, which downloads the WordPress Studio CLI instead of carrying it.

To update the plugin later, run:

grok plugin update wp-studio

Check that Grok Build is connected

  1. Start a new Grok Build session.
  2. Ask: “List my WordPress Studio sites.” Grok Build 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. Check the session’s tool calls to see 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.”
  • “Bring my website at https://example.com into a new local WordPress site.”
  • “Create a preview link of Coffee Shop that I can share.”

Replace Coffee Shop and the address with your own. Previews need a WordPress.com login.

Troubleshooting

Why does the Agents page say Not installed next to Grok Build?

WordPress Studio didn’t find the grok command. It looks in ~/.grok/bin, then on the PATH of your login shell. Install Grok Build, then open the Agents page again, or install the plugin from the terminal.

Why doesn’t Grok Build see WordPress Studio after I install the plugin?

Grok Build loads plugins when a session starts. Start a new session.

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. The first start also needs to reach GitHub to download the WordPress Studio CLI. Update Node.js, check your connection, and start a new session, or install the plugin from the WordPress Studio app, which uses the app’s own Node.js and WordPress Studio CLI.

Why can’t I add the plugin to Grok Bot?

Grok Bot runs in the cloud, and the WordPress Studio plugin works with sites on your computer. Use Grok Build on the computer where your sites are.

Edit this page on GitHub Updated