What WPGuard MCP MCP server does
WPGuard MCP MCP server gives an MCP client controlled access to WordPress sites. It can inspect themes, plugins, content types, fields, settings, pages, blocks, files, revisions, and design context before an operator changes anything. The server also supports content and settings mutations, component updates, revision recovery, rendered page checks, and change-packet review.
The main workflow is preview first, then approve an exact change. Page replacement, post content, post meta, option, block, and supported file operations can return a bounded proposal before applying it. Approved writes record prior values or snapshots and read the resulting WordPress state back where the tool supports that behavior.
How it works
Run the server on a workstation or server and connect an MCP client using Streamable HTTP. The endpoint shown in the repository is http://127.0.0.1:8642/mcp, and requests use a bearer token supplied in the Authorization header. Sites are registered before use; registration stores connection details but does not import or modify site content.
Correction records are scoped to a registered site and exact target. A record can require text, scalar values, JSON Pointer values, or an HTML anchor with a specified destination and label. WPGuard MCP checks applicable corrections during supported mutation previews and blocks a write when a check fails or cannot be evaluated. A link check examines HTML structure; it does not verify that the destination works or that a browser displays the link.
For staging workflows, registered staging and production peers can be previewed together. The staging tool applies only to the separately approved staging site, captures rendered evidence, and returns a new production preview. It does not promote changes automatically.
Setup and configuration
The repository requires Python 3.10 or newer. Installation is from source rather than a published package or container image. A typical setup creates a virtual environment, installs the optional browser dependencies, installs Chromium through Playwright, sets WPGUARD_TOKEN_ADMIN, and starts wpguard-mcp.
The token should be retained for client configuration as a bearer credential. The setup guide also covers Windows, Docker builds, the available WordPress connection methods, and a first edit with a reviewable preview. After startup, register each site and then use wp_site_context to inspect its context.
Tools and capabilities
WPGuard MCP MCP server includes tools for:
- Site inventory and configuration through
wp_site_context, wp_recon, wp_schema_recon, and wp_design_context.
- Page discovery, retrieval, comparison, replacement previews, and desktop/mobile render verification.
- Post content, post meta, option, Gutenberg block, and supported file operations.
- Vulnerability findings plus exact plugin or theme updates for SSH-connected sites, with health checks and restoration after failed updates.
- Native revision inspection and approved reversion with resulting-content hash verification.
- Narrow preapproval policies tied to a site, source, verbs, target pattern, and risk limit.
- Correction recording, listing, retirement, history imports, packet queries, and local audit display.
The server also exposes advanced PHP, SQL, CLI, snippet, and access tools. Their permissions and side effects differ from the supported correction-checked mutation tools.
Limitations and notes
Correction coverage is not universal. The documented checks apply to option, post-meta, post-content, full-page, block, and native-revision content writes. Raw PHP, SQL, file edits, new posts, component updates, and changes made outside WPGuard are outside that coverage.
Plugin recognition does not guarantee a complete native integration. Vulnerability results are cached and may be clean, vulnerable, or unknown. Imported history preserves records, hashes, and provenance, but imported acceptance labels are historical reports rather than independently authenticated approvals. Keep private histories out of public repositories and other publishable artifacts.
WPGuard MCP MCP server does not turn a correction into a site-wide rule: each active requirement is tied to its registered site and target. Retiring one preserves its history and retirement reason.