FatalGuard
Provides read-only MCP access to a WordPress site's PHP error logs and FatalGuard settings, enabling AI clients to inspect logging status, list available log sources, tail logs, group recurring errors, and retrieve recently captured fatal errors.
FatalGuard — PHP error log viewer, fatal error alerts and MCP server for WordPress
FatalGuard is a WordPress plugin. It shows your debug.log and PHP error log in wp-admin,
catches the fatal error behind the "critical error" white screen, sends Telegram alerts with
a one-tap recovery link, and runs its own read-only MCP server, so Claude, Cursor or
VS Code can read your site's errors.
This repository is a read-only mirror of the free plugin, version 1.3.2. Development happens elsewhere; issues and questions go to the support forum.
Install
Install it from wordpress.org, so your site gets automatic updates:
In wp-admin: Plugins → Add New, search for "FatalGuard", Install, Activate.
Or download it from https://wordpress.org/plugins/fatalguard/.
A zip from this repository works too (Plugins → Add New → Upload Plugin). It uses the
same slug and has no Update URI header, so WordPress updates it from wordpress.org.
Related MCP server: LogMCP
Connect an AI client (MCP)
In wp-admin, open FatalGuard → AI (MCP) and press Generate API key. Copy the key: it is shown only once. The same page shows these snippets with your URL and key filled in.
Add the server to your client. Replace
example.comwith your site and paste your key.
Endpoint: POST https://<your-site>/wp-json/fatalguard/v1/mcp (streamable HTTP).
The key goes in the X-FatalGuard-Key header. Some Apache hosts strip
Authorization: Bearer, so use this header.
Claude Code (run in your terminal)
claude mcp add --transport http fatalguard "https://example.com/wp-json/fatalguard/v1/mcp" --header "X-FatalGuard-Key: PASTE-YOUR-API-KEY-HERE"Cursor — mcp.json
{
"mcpServers": {
"fatalguard": {
"type": "http",
"url": "https://example.com/wp-json/fatalguard/v1/mcp",
"headers": {
"X-FatalGuard-Key": "PASTE-YOUR-API-KEY-HERE"
}
}
}
}VS Code — .vscode/mcp.json
{
"servers": {
"fatalguard": {
"type": "http",
"url": "https://example.com/wp-json/fatalguard/v1/mcp",
"headers": {
"X-FatalGuard-Key": "PASTE-YOUR-API-KEY-HERE"
}
}
}
}Claude Desktop — claude_desktop_config.json (via mcp-remote)
{
"mcpServers": {
"fatalguard": {
"command": "npx",
"args": [
"mcp-remote",
"https://example.com/wp-json/fatalguard/v1/mcp",
"--header",
"X-FatalGuard-Key: PASTE-YOUR-API-KEY-HERE"
]
}
}
}Then ask: "What's crashing my site?" or "Which warnings keep coming back?"
Tools
All six are read-only. The AI cannot change anything on your site.
Tool | What it returns |
| Logging status and FatalGuard settings |
| The logs FatalGuard can read, with size |
| The newest lines of one log, secrets redacted |
| Errors grouped with counts and last seen |
| Recently captured fatal errors |
| One fatal error in detail |
The server works while WordPress can still load. For a site that is fully down, use the recovery link from the fatal alert. Revoke the key at any time on the same page.
Try it without a site (Docker)
The repository builds a sandbox: a throwaway WordPress (SQLite, no web server) with FatalGuard active and some demo errors, speaking MCP over stdio.
docker build -t fatalguard-mcp . && docker run -i --rm fatalguard-mcpIt is a demo to see the tools and their answers. Real use is the plugin on your own site, connected as shown above.
License
GPLv2 or later. See LICENSE.txt.
Available Tools
6 toolsget_fatalA
The latest record of one fatal-error group (signature from list_recent_fatals): full message incl. stack trace, file, line, origin, URL, PHP version, and its last occurrences.
Inputs: signature (required).
list_errorsA
Errors of a log grouped by signature, newest first: level, message, file and line, count, first and last seen. Use for "what keeps failing" questions.
Inputs: limit, source.
list_log_sourcesA
List the log sources FatalGuard can read on this site (PHP error log, wp-content/debug.log, PHP ini error_log, etc.) with size and whether they are readable. Use the returned id with tail_log or list_errors.
Inputs: no named parameters.
list_recent_fatalsA
Captured fatal errors (white screens) grouped, newest first: signature, message, file and line, the plugin or theme that caused it, count, first and last seen. Use this to see what is currently crashing the site; pass a signature to get_fatal for details.
Inputs: max.
statusA
Whether PHP error logging and fatal-error capture are on, the WP_DEBUG flags, log sizes, whether alerts are set up, and when the last fatal error happened. Start here.
Inputs: no named parameters.
tail_logA
Return the newest lines of a log source (by id from list_log_sources), oldest first, secrets redacted, optionally only lines containing a text. Use to read raw log context around an error.
Inputs: source (required), q, max.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes: status is an overview, list_log_sources discovers sources, tail_log reads raw lines, and get_fatal drills into one fatal group. The only potential confusion is between list_errors (grouped errors from a log source) and list_recent_fatals (grouped captured fatals), but their descriptions and required inputs make the boundary reasonably clear.
Five of six tools follow a clear verb_noun or list_* pattern (list_log_sources, list_errors, list_recent_fatals, tail_log, get_fatal). The bare noun 'status' is a minor deviation, though it reads naturally as an overview entry point.
Six tools is well-scoped for a read-only fatal-error and log diagnostics server. Each tool serves a distinct step in the workflow (overview, source discovery, raw tail, grouped errors, grouped fatals, fatal detail) with no obvious padding.
The surface covers the core diagnostic lifecycle: status, source discovery, raw log reading, grouped error listing, grouped fatal listing, and fatal detail. Minor gaps exist—there is no detail tool for an individual non-fatal error group and no explicit way to acknowledge or clear errors—but agents can work around these with the existing tools.
Maintenance
Related MCP Connectors
Analytics and debugging for your MCP server — explore usage and sessions, then root-cause errors.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site
Related MCP Servers
AlicenseBqualityFmaintenanceA WordPress plugin that implements the Model Context Protocol to enable AI models and applications to interact with WordPress sites in a structured and secure way.552 npm946ISC- AlicenseAqualityCmaintenanceMCP server — read-only log access for AI assistants. Debug your Linux server with AI, without giving the AI shell access.76MIT
- FlicenseNot gradedqualityDmaintenanceMCP server to start, monitor, search, and detect errors in logs from any project, even those without log files.-
- AlicenseNot gradedqualityDmaintenanceMCP server for collecting and analyzing CLI/web server error logs. Enables watching log files/directories, parsing common error patterns, and querying/analyzing logs through natural language.19 npmMIT