Detect client-side JavaScript and network errors on any website — built for AI coding agents.
Web Client Errors MCP is a Model Context Protocol (MCP) server that detects and analyzes client-side errors on websites. It uses Playwright to launch a real browser, navigate to any URL, and capture:
- JavaScript errors — Uncaught exceptions, reference errors, type errors
- Network errors — Failed requests, CORS issues, 4xx/5xx responses
- Console warnings — Potentially problematic console output
- Resource loading failures — Missing assets, failed fetches
Designed specifically for AI coding agents (like CRUSH) to help debug web applications effectively.
When building or debugging web applications, client-side errors are notoriously difficult to catch — they happen in users' browsers, not in your terminal. This tool gives AI agents the ability to:
- Instantly detect errors on any website
- Get detailed error information with stack traces
- Analyze error patterns and get fix suggestions
- Debug production issues without manual browser testing
This project follows the UNIX philosophy:
- Do one thing: Detect client-side web errors
- Do it well: Reliable, accurate, comprehensive detection
- Work together: Integrates seamlessly with CRUSH
- Handle text: Natural language interface through CRUSH
- Adapt: Works on any website, any framework
git clone https://github.com/LarsArtmann/web-client-errors-mcp.git
cd web-client-errors-mcp
bun install
bun run buildAdd to your CRUSH .mcp.json:
{
"mcp": {
"web-client-errors": {
"type": "stdio",
"command": "bun",
"args": ["/path/to/web-client-errors-mcp/dist/core/mcp-server.js"],
"disabled": false
}
}
}# Restart CRUSH, then:
"detect errors on https://example.com"
"analyze error session from previous detection"Detects client-side errors on any website using Playwright browser automation.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | Website URL to scan |
waitTime |
number | No | Milliseconds to wait for errors (default: 5000) |
captureScreenshot |
boolean | No | Take screenshot (default: true) |
includeNetworkErrors |
boolean | No | Include network errors (default: true) |
includeConsoleWarnings |
boolean | No | Include console warnings (default: true) |
interactWithPage |
boolean | No | Scroll/click to trigger lazy errors (default: false) |
Example: "detect errors on https://mysite.com with 10 second wait"
Analyzes collected errors to find patterns and provide fix suggestions.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId |
string | Yes | ID from error detection |
includeSuggestions |
boolean | No | Include AI fix suggestions (default: true) |
severity |
string | No | Filter: error/warning/info/all (default: all) |
Example: "analyze error session abc-123"
Gets detailed information about a specific error including stack trace and context.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
errorId |
string | Yes | Error message or ID to investigate |
includeStackTrace |
boolean | No | Include full stack trace (default: true) |
includeContext |
boolean | No | Include error context and analysis (default: true) |
Example: "get details for TypeError undefined property"
bun install # Install dependencies
bun run build # Compile TypeScript
bun run dev # Watch and rebuild
bun run typecheck # Type checking
bun test # Run tests
bun run lint # Lint code
# Or use just
just build # Build project
just test # Run tests
just check # Full quality check
just ci # CI pipelinesrc/
├── core/
│ └── mcp-server.ts # MCP server implementation
├── services/
│ ├── browser-manager.ts # Playwright browser automation
│ └── error-detection.ts # Error classification & analysis
├── repositories/
│ └── session-store.ts # Session & error storage
├── types/
│ └── domain.ts # Domain types (branded, discriminated)
├── config.ts # Configuration management
└── logger.ts # Structured logging setup
The MCP server exposes these resources for AI agents:
errors://recent— Most recent errors from all sessionserrors://stats— Aggregated error statistics
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ AI Coding │────▶│ MCP Server │────▶│ Playwright │
│ Agent (CRUSH) │ │ (This Project) │ │ Browser │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────────┐
│ Session Store │
│ Error Analysis │
└──────────────────┘
| Document | Description |
|---|---|
| CONTRIBUTING.md | Contribution guidelines |
| docs/BRANCHING-FLOW.md | Branching strategy |
MIT