web-debug-mcp
An evidence-first, local MCP debugger for web applications.
web-debug-mcp gives Codex and other MCP clients one bounded workflow for reproducing a web issue, inspecting browser and framework runtime state, collecting redacted evidence, and verifying the same flow after a fix. It covers the browser, frontend runtime, dev server, and replay timeline through one small MCP surface.
Release 0.13.0 adds compact verification with retained evidence resources, typed geometry/numeric/network checks, observable completion, safer API guidance and project logs, and grounded framework recovery. It preserves original-source diagnostics, native Safari console collection, interactive UI capture and direct WebMCP; the MCP catalog remains 13 tools.
Release 0.10.0 introduced selective capture and freshness states, tighter browser-routing guidance, stronger evaluation evidence, and Google Antigravity plugin compatibility.
Release 0.8.0 introduced identity-safe MCP startup recovery, bounded stale registry/sidecar reconciliation, schema-versioned doctor binding diagnostics, and a fail-closed Web Debug Gate 0 that never substitutes another browser runner when the requested MCP binding is unavailable.
Install as an MCP server
The core package is a standalone MCP server. The repository also includes an optional Web Debug plugin for Codex and ChatGPT: the MCP server provides callable debugging tools, while the bundled skill provides workflow guidance. Claude Code and other MCP clients can continue using the standalone server.
The published npm package runs locally over stdio and does not require a hosted service.
Codex CLI, desktop app, and IDE extension
From a terminal:
codex mcp add web-debug-mcp -- npx -y [email protected]
codex mcp list
The Codex desktop app and IDE extension share the same MCP configuration. You can also open Settings → MCP servers → Add server, choose STDIO, use npx as the command, and add these arguments:
-y [email protected]
For a project-scoped Codex configuration, add this to ~/.codex/config.toml or a trusted project .codex/config.toml:
[mcp_servers.web_debug_mcp]
command = "npx"
args = ["-y", "[email protected]"]
startup_timeout_sec = 20
tool_timeout_sec = 150
# Optional strict host policy: fail startup if this server cannot initialize.
required = true
Verify the connection with codex mcp list. In the Codex TUI, /mcp shows the active server.
MCP startup and binding recovery
A request for live Web Debug execution is fail-closed: the bundled web_project_detect call is Gate 0. A doctor pass, a process visible in a terminal, or a loaded skill does not prove that the current Codex task has the Web Debug tool namespace. If Gate 0 is unavailable, report MCP_CLIENT_BINDING_UNAVAILABLE (or MCP_SERVER_STARTUP_UNAVAILABLE when the server reports a startup failure) and stop that browser route; continue independent authorized source work. Do not substitute Playwright, Puppeteer, raw CDP, a direct MCP SDK client, a naked npx web-debug-mcp process, or web-debug-mcp cleanup.
The plugin-bundled .mcp.json intentionally contains only the supported launch command and timeouts. Codex currently documents required = true for a direct [mcp_servers.<name>] entry in config.toml, not for a plugin manifest field. To apply the strict policy, configure the direct server entry above and disable the duplicate plugin-provided server in the user plugin policy:
[plugins."web-debug@web-debug".mcp_servers.web-debug-mcp]
enabled = false
If the server is missing from the current task after a repair, use Codex Settings → MCP servers → Restart (or restart the IDE extension), then retry Gate 0. A new task/session is the supported recovery when the current task does not refresh its tool binding. Codex CLI 0.152.0 or newer is the supported host baseline; 0.151.0 adds optional-MCP discovery grace, while older hosts are candidate-only for this recovery contract. See the Codex MCP configuration and Codex changelog.
Use Web Debug as a plugin
This is the recommended single-install path for Codex and Claude Code. Installing Web Debug installs both workflow skills and the web-debug-mcp MCP server connection. It is not a skill-only package, and no separate MCP setup is required.
The same plugin package supports both Codex and Claude Code. Codex reads the Codex plugin manifest, Claude Code reads the Claude Code plugin manifest, and both use the same workflow skills and MCP configuration.
The plugin contains five pieces: