1. Overview
A reliable local loop has three pieces: a WordPress instance, an MCP server pointing at it, and a way to reach the server from your AI client of choice. Docker handles the first; the SDK runs the second; Cloudflare Tunnel solves the third.
2. Prerequisites
Node.js 20+
MCP TypeScript SDK + dev tooling.
Docker
WordPress + MariaDB compose stack.
cloudflared
Free public tunnel for stdio/HTTP exposure.
3. Local architecture
Docker boots WordPress at localhost:8080. The MCP server runs as a Node process that calls the REST API of that container. Optionally, Cloudflare Tunnel publishes the MCP server at a stable URL so Claude Desktop can reach it from anywhere.
4. Option 1 — Docker (recommended)
services:
wp:
image: wordpress:latest
ports: ['8080:80']
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wp
WORDPRESS_DB_PASSWORD: wp
WORDPRESS_DB_NAME: wp
db:
image: mariadb:11
environment:
MYSQL_DATABASE: wp
MYSQL_USER: wp
MYSQL_PASSWORD: wp
MYSQL_ROOT_PASSWORD: rootpw docker compose up -d
# WordPress is now at http://localhost:8080
# Visit it once and finish the install wizard. 5. Option 2 — Native (without Docker)
Prefer a native stack? Use Local by Flywheel or any LAMP setup. The MCP server doesn't care how WordPress runs — it only needs a reachable REST endpoint and an application password.
6. Cloudflare Tunnel — expose to the internet
cloudflared tunnel --url http://localhost:8080
# A trycloudflare.com URL prints. Use it as WP_URL in your MCP server.