> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainwp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Remote AI Connections on WP Engine

> What to check when AI apps can't reach a MainWP Dashboard hosted on WP Engine.

The Dashboard links here when it detects WP Engine, from the `IS_WPE` or `WPE_APIKEY` constant that WP Engine defines.

On WP Engine, the web server and its page cache are managed for you. Most fixes on this page are requests to WP Engine support rather than settings you change yourself.

## Start with the checks

In **MainWP > AI > MainWP MCP > Connect directly**, click **Run the self-test**, then **Check from the internet**. Note every `fail` and `warn` line. [Troubleshooting](https://docs.mainwp.com/mcp-server/remote/troubleshooting.md) explains each one.

## What to look at

**The well-known addresses.** If the self-test reports "Requests for the well-known addresses don't reach WordPress, so no app can find how to sign in.", ask WP Engine support to pass these two paths to WordPress's `index.php`, keeping the original address:

```text theme={null}
/.well-known/oauth-authorization-server
/.well-known/openid-configuration
```

For a Dashboard in a subdirectory, include the rule the self-test shows. The [nginx rules](https://docs.mainwp.com/mcp-server/remote/troubleshooting.md#nginx-rules) section has both forms.

**The Authorization header.** If the self-test reports "The Authorization header doesn't reach WordPress", ask support to pass the `Authorization` request header to PHP for your site.

**Caching.** The Dashboard marks every remote AI response as not cacheable. If the check from the internet reports "The MCP address didn't answer with a sign-in request (HTTP 401)." while the self-test passes, ask support to exclude these paths from the page cache:

```text theme={null}
/wp-json/mainwp-remote/
/mainwp-oauth/
/.well-known/oauth-authorization-server
/.well-known/openid-configuration
```

With plain permalinks, the MCP address uses `?rest_route=/mainwp-remote/v1/mcp` instead. Mention that form if your site uses it.

## What to send to support

* your Dashboard's address
* the failing lines from the self-test and the check from the internet, word for word
* the rule the self-test shows, if any
* the time you ran the checks, so support can find the requests in the server logs

If the connection still fails, the [local MCP server](https://docs.mainwp.com/mcp-server/clients.md) only needs HTTPS access from your computer and works as a fallback.

For plain permalinks, include requests whose `rest_route` points into `/mainwp-remote/` and requests with a `mainwp_oauth` parameter in any relevant challenge or cache exception. Keep the exception specific to these endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.