Start with the checks
In MainWP > AI > MainWP MCP > Connect directly, click Run the self-test, then Check from the internet. Troubleshooting explains each line. The self-test only sees your server; the check from the internet goes through the Sucuri firewall like a real app.If your site uses the Sucuri firewall
Blocked or challenged requests. If the check from the internet reports “Something in front of WordPress blocks the well-known address: an error page, a server error or a challenge page.” or “The MCP address didn’t answer with a sign-in request (HTTP 401).”, look at the firewall’s audit log for requests to these paths, and allowlist them in the firewall’s settings:/?rest_route=/mainwp-remote/v1/mcp.
Caching. The Dashboard marks every remote AI response as not cacheable. If the firewall still caches them, exclude the paths above and /mainwp-oauth/ from its cache.
HTTPS. The firewall handles HTTPS in front of your server. If the self-test reports “Requests reach WordPress as http://; see the reverse proxy guide.”, see HTTPS as WordPress sees it. Use that fix only when all traffic reaches the server through the firewall.
The Sucuri plugin
If you applied the plugin’s hardening rules, check that they don’t block/.well-known/ paths or the Authorization header. The self-test lines for the well-known addresses and the Authorization header show whether they do.
Keep the firewall on. MainWP still enforces its own sign-in, permission, and approval checks. Limit exceptions to the requests actually blocked.
If the connection still fails, the local MCP server 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.