---
title: AI MCP server
description: Connect AI agents to your WordPress sites through the Model Context Protocol (MCP).
url: https://developers.wpengine.com/docs/ai/api/mcp/
image: https://developers.wpengine.com/og/docs/ai/api/mcp.png
---

# AI MCP server

The WP Engine AI [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server connects AI agents to your WP Engine accounts and WordPress sites. Examples of these agents include Claude Code and Claude Desktop. Through the server, an agent can find and run WordPress abilities, search site content, and manage hosting on your behalf.

> **Beta**
>
> The MCP server is in beta. WP Engine may change endpoints, tools, and authentication before general availability.

[Connect Claude Code](https://developers.wpengine.com/docs/ai/api/mcp/how-to/configure-claude-code/)Register the server with one command, sign in, connect your WordPress account, and run your first ability.

[Connect Claude Desktop](https://developers.wpengine.com/docs/ai/api/mcp/how-to/configure-claude-desktop/)Add a custom connector and sign in.

## What you can do

- **List your WordPress sites** — see all sites registered to your WP Engine account
- **Search abilities** — find WordPress operations by keyword across all your sites
- **Run abilities** — run WordPress actions from your AI agent, such as creating posts or managing plugins
- **Manage content** — create, update, and delete posts and pages
- **Search site content** — search a site’s knowledge base and read the documents it cites
- **Manage hosting** — manage backups, domains, Secure Sockets Layer (SSL), caching, installs, and staging with the `wpe_*` tools
- **Work on an environment** — run shell commands and read, write, or edit files directly on a live WP Engine environment

## How it works

1. **You configure** your MCP client with the server URL, then sign in with your WP Engine account
2. **Your client connects** to the MCP server when you start a session
3. **You ask your client** to perform a WordPress operation in natural language
4. **Your client calls the MCP server** with the appropriate tool (`list_accounts`, `list_account_sites`, `search_abilities`, `run_site_ability`)
5. **The server verifies** your identity, checks permissions, and runs the ability on your WordPress site
6. **Your client returns** the result to you

Your MCP client turns each request into tool calls. The server authorizes every call as the signed-in user and runs it against your account or site.

## Explore the available tools

| Tool                            | Needs                        | Purpose                                                           |
| ------------------------------- | ---------------------------- | ----------------------------------------------------------------- |
| `list_accounts`                 | Sign-in only                 | List your accounts that have AI turned on and a connected site    |
| `list_account_sites`            | Site connection              | List active sites by default, or filter by registration status    |
| `search_abilities`              | WordPress account connection | Find abilities by keyword                                         |
| `list_site_abilities`           | WordPress account connection | List all abilities for a site                                     |
| `run_site_ability`              | WordPress account connection | Run a WordPress ability                                           |
| `get_site_knowledge_base`       | Site connection              | Get a site’s knowledge base identity and searchable filter values |
| `search_knowledge_base`         | Site connection              | Search a site’s knowledge base for content that grounds an answer |
| `fetch_knowledge_base_document` | Site connection              | Fetch one full document from a site’s knowledge base by ID        |
| `list_knowledge_base_documents` | Site connection              | List every matching document in a site’s knowledge base           |
| `wpe_*` hosting tools           | Sign-in only                 | Manage sites, installs, domains, backups, SSL, and caching        |
| `environment_*` tools           | Sign-in only                 | Run commands and edit files directly on a live environment        |

A tool that needs an account takes an `account_id`. Take it from `list_accounts`, or from `wpe_list_accounts` for the hosting tools.

> **Environment tools change your live site**
>
> The `environment_*` tools run shell commands and write or edit files on any live WP Engine environment you have full access to. A change takes effect as soon as the tool runs. The server doesn’t ask you to confirm it; your MCP client’s approval prompt is the only check.
>
> Read each command or file change before you approve it. Don’t approve these tools permanently, and take a backup before a significant change. `environment_file_read` only reads.

Each tool publishes its input schema. Retrieve the current schemas with `tools/list`, or browse them in [MCP Inspector](https://github.com/modelcontextprotocol/inspector).

## Try example requests

### List your sites

Terminal window

```bash
claude "Use the wpengine MCP server to list all my active WordPress sites"
```

Claude Code calls `list_account_sites` and returns a summary similar to this:

```text
You have 3 sites:
1. example.com - Active, WordPress account connected
2. staging.example.com - Active, needs a WordPress account connection
3. dev.example.com - Active, WordPress account connected
```

### Create a post

Terminal window

```bash
claude "Use the wpengine MCP server to create a draft post on example.com titled 'Hello from Claude' with the content 'This was created via MCP.'"
```

Claude Code then does the following:

1. Searches for the site’s **Create Post** ability (`wp-engine-ai/create-posts`)
2. Runs it with your input
3. Returns the new post ID and admin link

### Search abilities

Terminal window

```bash
claude "Use the wpengine MCP server to find WordPress abilities for managing comments"
```

Claude Code searches across your connected sites and returns the matching abilities.

## Choose an MCP client

Any MCP client that supports the Streamable HTTP transport and MCP OAuth can connect. WP Engine tests the following clients:

| Client             | Client docs                                                                                                                               | Setup guide                                                                                                |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Claude Code**    | [MCP in Claude Code](https://code.claude.com/docs/en/mcp)                                                                                 | [Connect Claude Code](https://developers.wpengine.com/docs/ai/api/mcp/how-to/configure-claude-code/)       |
| **Claude Desktop** | [Custom connectors using remote MCP](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) | [Connect Claude Desktop](https://developers.wpengine.com/docs/ai/api/mcp/how-to/configure-claude-desktop/) |
| **MCP Inspector**  | [Inspector](https://github.com/modelcontextprotocol/inspector)                                                                            | —                                                                                                          |

### Connect another client

To connect a client that isn’t listed, configure it with these settings:

| Setting            | Value                                                                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Endpoint**       | `https://api.ai.wpengine.com/v1/mcp`                                                                                                                                 |
| **Transport**      | Streamable HTTP with JSON-RPC 2.0. The server is stateless and accepts `POST` requests only. It doesn’t keep MCP sessions or open a server-to-client stream.         |
| **Authentication** | MCP OAuth. The server’s `401` response identifies the authorization server. After sign-in, the client sends `Authorization: Bearer <access_token>` on every request. |

All other behavior follows the [MCP specification](https://modelcontextprotocol.io/specification).

The server doesn’t support API keys. A client configured with an API key can connect, but every tool call returns `forbidden`. To use the server, a client must support MCP OAuth. See [Authentication](https://developers.wpengine.com/docs/ai/api/authentication/#authenticate-mcp-clients-with-oauth).

## Use one server entry for every site

A connection belongs to the WP Engine user who signed in, not to a single site or account. You configure the server once, however many sites or accounts you have.

Each site-scoped tool takes an `account_id` and a `site_id`, and each call is independent. An agent can work on several of your sites in the same conversation. It doesn’t need to reconnect or select a site first.

---

[Authentication](https://developers.wpengine.com/docs/ai/api/authentication/#authenticate-mcp-clients-with-oauth)MCP clients authenticate a user with OAuth, so every call runs as the user who authenticated.

[Site and WordPress account connections](https://developers.wpengine.com/docs/ai/api/site-and-account-connections/)The two connections a site needs, and which tools require each one.

[Troubleshooting](https://developers.wpengine.com/docs/ai/api/mcp/troubleshooting/)How tools report errors, what each error code means, and how to resolve common failures.

[Rate limits](https://developers.wpengine.com/docs/ai/api/mcp/troubleshooting/#fix-rate_limited-errors)Read tools and ability execution have separate per-minute limits.

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
