wp-diagnostics-mcp
Provides direct diagnostic access to a WordPress installation, including listing plugins, retrieving PHP and WordPress environment info, tailing the debug log, running guarded read-only SQL queries, and inspecting Gravity Forms errors and logging.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
wp-diagnostics-mcp
An MCP server that gives an AI assistant direct diagnostic access to a local WordPress install — plugin, PHP, and environment info, debug-log tailing, a guarded read-only SQL query tool, and a pair of tools built specifically for Gravity Forms support work.
Built against a real Local by Flywheel WordPress site running the Gravity Forms / Gravity PDF stack, as a portfolio project pairing hands-on WordPress support experience with MCP server development.
Tools
Tool | Description |
| List all installed plugins with status and version. |
| PHP version, WordPress version, and WP-CLI environment info. |
| Tail the last N lines of |
| Run a single read-only |
| Recent Gravity Forms entries with notes marked |
| List every plugin registered with Gravity Forms' logging framework and whether logging is enabled for each. |
| Tail the log file for a specific enabled Gravity Forms add-on, by slug. |
Related MCP server: Novamira
Why it looks the way it does
Local by Flywheel doesn't put php or wp on PATH — each site is pinned to its own bundled PHP version, and WP-CLI ships as a single .phar inside the Local.app bundle. wp-config.php also sets DB_HOST to plain localhost, but Local runs each site's MySQL on its own per-site socket rather than the system default, so a bare CLI call fails with a database connection error even though WP-CLI itself is reachable.
server.py centralizes all of that into one run_wp_cli() helper that points the PHP binary, mysqli/pdo_mysql, and the mysql client (for wp db query, which shells out to it directly) at the correct per-site socket. Five of the seven tools are thin wrappers around a specific WP-CLI command. wp_error_log reads debug.log directly, and gf_addon_log asks WP-CLI for the add-on's log path, then reads that file.
Setup
Requires uv and a running Local by Flywheel site.
uv sync
cp local_config.example.py local_config.pyFill in local_config.py with your own site's paths (PHP_BIN, WP_CLI_PHAR, SITE_PATH, DB_SOCKET, MYSQL_BIN_DIR) — see the comments in local_config.example.py for how to find each one. This file is gitignored since these paths are specific to one Local installation and site, not portable as-is.
Register it with an MCP client (e.g. Claude Desktop's claude_desktop_config.json):
{
"mcpServers": {
"wp-diagnostics": {
"command": "uv",
"args": ["--directory", "/path/to/wp-diagnostics-mcp", "run", "server.py"]
}
}
}Scope
Local-only diagnostics for a single WordPress install. wp_db_query is intentionally read-only — it rejects any statement that isn't a single SELECT — since this is meant for inspection, not administration.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Live-checks whether a WordPress site is ready to be safely operated by AI agents.
Manage a WordPress site from your AI assistant: read, search, propose edits, Search Console data.
Manage your WordPress site from ChatGPT or Claude: posts, WooCommerce, SEO, images and upkeep.
Manage WordPress blogs and WooCommerce shops from Claude, ChatGPT, Cursor and other MCP apps.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables MCP-compatible AI assistants to inspect projects, processes, ports, logs, HTTP endpoints, Git state, and development databases for local runtime diagnostics.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants and agents to communicate directly with a WordPress environment, executing PHP code and WP-CLI commands, inspecting and editing theme and plugin files in a sandbox, and managing posts, content, and Gutenberg blocks in real time.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to diagnose broken XAMPP/WAMP localhost stacks by inspecting real machine state — running processes, listening ports, HTTP probes, and Apache/MySQL error logs — to pinpoint port conflicts, startup crashes, unclean-shutdown damage, and zombie processes with plain-English explanations. All diagnostics are read-only, so agents can safely answer questions like why Apache won't start or why localhost refuses to connect instead of guessing.4MIT
- AlicenseBqualityCmaintenanceEnables AI agents to manage a self-hosted WordPress site (posts, WooCommerce orders, Elementor data, diagnostics, options and files) through the WP SSH plugin's HTTPS endpoint without SSH access, with read-only tools by default and write or full capabilities opt-in.2329 npmGPL 2.0