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: WordPress MCP Server
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.
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 WordPress blogs and WooCommerce shops from Claude, ChatGPT, Cursor and other MCP apps.
Manage your WordPress site from your AI assistant: posts, pages, media, comments and WooCommerce.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables creating, customizing, managing, and sharing local WordPress sites through natural language, leveraging WP-CLI and AI integration.67MIT
- AlicenseCqualityDmaintenanceEnables AI to manage WordPress sites with 190+ tools for complete control over content, themes, plugins, files, and more.10015 npmMIT
- 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