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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wp-diagnostics-mcpTail the debug log for recent errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 Developer 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. Every tool above is a thin wrapper around a specific WP-CLI command.
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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Live-checks whether a WordPress site is ready to be safely operated by AI agents.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables AI agents to manage WordPress sites with 190+ tools for content management, theme/plugin customization, file system operations, WooCommerce, and complete site control through natural language.10036 npm56MIT
- 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.10036 npmMIT
- FlicenseNot gradedqualityBmaintenanceControls any WordPress site via natural language, offering tools for site health, plugins, posts, SEO, WooCommerce, and more.-