MCP Ward
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.
MCP Ward — Protocol Autopsy
Catch, explain, and replay broken Model Context Protocol (MCP) connections before they derail Kiro autonomous agents.
What MCP Ward Does
Autonomous Kiro agents rely heavily on external tool servers communicating via the Model Context Protocol (MCP). When an MCP server connection breaks—due to an expired bearer token, malformed JSON Schema in tools/list, transport timeouts, or protocol version mismatches—agents frequently stall, crash, or enter infinite recovery loops without actionable root-cause diagnostics.
MCP Ward is a pre-execution diagnostic workstation and runtime tool server designed for agent developers:
Pre-flight Configuration Validator: Ingests, validates, and redacts
.kiro/settings/mcp.jsonclient configurations against official MCP specifications before agent boot.Live Protocol Autopsy: Streams real-time handshake and capability telemetry over Server-Sent Events (SSE). It differentiates root causes from downstream symptoms (e.g. isolating an initial HTTP 403 Forbidden from a secondary HTTP 405 Method Not Allowed triggered by client fallback).
Dual-Transport Client Engine: Implements the modern MCP Streamable HTTP transport with chunked transfer parsing and strictly qualified fallback to legacy HTTP+SSE.
Deterministic Replay Lab: Replays recorded failure scenarios to test agent resilience, benchmark recovery logic, and reproduce edge cases offline.
Local Kiro MCP Tool Server: Directly callable by Kiro agents via stdio (
ward.validate_config,ward.probe_remote_server,ward.replay_scenario).Local Forensic Ledger: Persists investigation traces and telemetry in local browser IndexedDB with zero cloud storage dependencies.
Related MCP server: Keel
Design System: The Diagnostic Oscilloscope
Crafted using the official UNSLOP methodology (Damir Sokolovsky), MCP Ward rejects generic AI dashboard tropes—no purple neon gradients, no pulsing decorative blobs, no emoji badges, and no shouting uppercase text.
World: A precision hardware packet inspection and oscilloscope rack in a dark laboratory.
Palette: Deep carbon slate surfaces (
#111114,#18171E), quiet hairline boundaries (#201F29), and a restrained focal violet accent (#8B5CF6).Typography: Space Grotesk (structured headings), IBM Plex Sans (high-legibility body), and IBM Plex Mono (tabular figures and byte-level protocol payloads).
Signature Moment: Chronological causal linking connecting root-cause triggers directly to downstream symptoms in the Protocol Timeline.
System Architecture
[ Kiro Agent IDE / Browser Workbench ]
│
│ REST / Server-Sent Events (SSE) / stdio
▼
[ Next.js 15 App Router (/api/diagnostics/*) ]
│
▼
[ Diagnostics Adapter Dispatcher ]
├── MockDiagnosticsAdapter (Deterministic Offline Fixtures)
├── LiveDiagnosticsAdapter (Sandboxed TLS & Socket Pinning)
└── ReplayDiagnosticsAdapter (Monotonic Sequence Playback)
│
▼
[ Protocol Engine & Security Perimeter ]
├── DNS Pre-Resolution & Socket Pinning (dns/promises.lookup)
├── SSRF Guard (Rejects loopback, RFC 1918, link-local, AWS/GCP metadata)
├── Bounded Streaming Fetch (1 MB response ceiling chunk-by-chunk)
├── Dual MCP Transport (Streamable HTTP + qualified legacy SSE)
├── Dynamic Version Negotiator (@modelcontextprotocol/sdk dynamic types)
└── Secret Redactor (Sanitizes Authorization, cookies, and tokens)
│
▼
[ Forensic Storage Ledger (Browser IndexedDB + In-Memory Fallback) ]Zero-Paid Services Guarantee
MCP Ward is 100% self-contained and cost-free:
Zero Paid Databases: Persists runs locally in browser IndexedDB with in-memory fallbacks.
Zero Paid LLM APIs: Deterministic rules engine and evidence correlator run fully locally without external commercial LLM API dependencies.
Zero Paid Hosting: Runs locally via
npm run devor deploys on free-tier platforms.
Quickstart & Installation
1. Prerequisites
Node.js >= 20.0.0
npm >= 10.0.0
2. Clone and Install
git clone https://github.com/your-username/mcp-ward.git
cd mcp-ward
npm install3. Environment Setup
cp .env.example .env.localKey parameters:
DATA_MODE=mock: Operates in mock (default), live (live), or replay (replay) mode.MCP_PROBE_TIMEOUT_MS=8000: SLA probe timeout in milliseconds.MCP_MAX_RESPONSE_BYTES=1048576: 1 MB response body buffer ceiling.MCP_ALLOW_PRIVATE_TARGETS=false: Production SSRF perimeter lock.
4. Seed Scenario Catalog
npm run seed5. Start Development Server
npm run devOpen http://localhost:3000 to launch the MCP Ward Forensic Workbench.
Kiro IDE Integration
MCP Ward runs as an active Model Context Protocol server inside Kiro IDE.
Configuration (.kiro/settings/mcp.json)
{
"mcpServers": {
"mcp-ward": {
"command": "npx",
"args": ["tsx", "src/mcp-server/index.ts"],
"env": {
"DATA_MODE": "mock",
"MCP_PROBE_TIMEOUT_MS": "8000",
"MCP_MAX_RESPONSE_BYTES": "1048576",
"MCP_ALLOW_PRIVATE_TARGETS": "false"
}
}
}
}Available Kiro MCP Tools
ward.validate_config: Ingests and validates client configuration schemas, redacting sensitive authorization keys.ward.probe_remote_server: Initiates a sandboxed, TLS-verified diagnostic handshake against an HTTPS MCP endpoint.ward.replay_scenario: Executes deterministic autopsy replay on recorded failure traces.
To run the MCP server standalone over stdio:
npm run mcp:serveSecurity Architecture
Security Guard | Mechanism | Verification |
DNS Pinning | Pre-resolves all IPv4/IPv6 addresses via | Tested in |
SSRF Prevention | Fails closed on loopback ( | Tested in |
Streaming Ceiling | Rejects | Tested in |
Redirect Rejection | Rejects HTTP 301, 302, 303, 307, 308 redirects to eliminate redirect-based SSRF. | Tested in |
Hosted Stdio Block | Rejects | Tested in |
Credential Scrubbing | Automatic redaction of Authorization headers, API keys, cookies, and tokens in URLs before emission to logs or storage. | Tested in |
Scenario Catalog & Replay Lab
MCP Ward includes 6 pre-recorded canonical failure scenarios:
Scenario A (
auth-failure-403-405) [Signature Cascade]: Remote gateway rejects an expired Bearer token with HTTP 403 Forbidden. Client fallback logic attempts POST to SSE stream, resulting in downstream HTTP 405 Method Not Allowed. MCP Ward isolates 403 as root cause.Scenario F (
auth-failure-401): Target server rejects credentials with HTTP 401 Unauthorized during SSE handshake.Scenario B (
transport-timeout-8s): Remote server hangs during SSE announcement, breaching 8000ms SLA.Scenario C (
protocol-mismatch-version): Server responds with deprecated MCP protocol version (2023-01-01).Scenario D (
healthy-baseline): Fully compliant reference server negotiating MCP2024-11-05and exposing 4 validated tool schemas.Scenario E (
schema-invalid-tools): Target exposes tool definitions missing JSON Schema object properties.
Automated Smoke Verification Suite
Run the full project quality gate:
npm run smokeThe smoke runner executes 14 synchronous steps (499 automated assertions):
TypeScript Static Typecheck (
strict: true)Deterministic Fixture Seed (
scripts/seed.ts)Config Validator Acceptance Tests (62 assertions)
Diagnosis Engine Tests (86 assertions)
Replay State Synchronization Tests (5 assertions)
Security Perimeter & Redaction Tests (42 assertions)
Adapter & Storage Integration Tests (14 assertions)
Live Security, DNS Pinning & Socket Handshake Tests (97 assertions)
Pinned Fetch & 1 MB Streaming Guard Tests (67 assertions)
MCP Dual Transport & Qualified Fallback Tests (24 assertions)
Live Diagnostics Engine & SSRF Policy Tests (51 assertions)
Local MCP Stdio Server Integration Tests (18 assertions)
SSE Route Handlers Integration Tests (33 assertions)
Next.js Production Build (
next build)
License
This project is licensed under the MIT License — see the LICENSE file for details.
The UNSLOP design skill installed in .agents/skills/unslop/ is licensed under CC BY 4.0 by Damir Sokolovsky (@heydamir, heydamir.design/unslop).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for A2A failure replay MCP, structured receipts, audit logs, and reviewer-ready evidence.
Network, domain and website diagnostics for AI clients via MCP.
MCP compatibility and transport verification server.
MCP compatibility and transport verification server.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to programmatically inspect, test, and validate other MCP servers by exposing MCP Workbench capabilities as structured tools. It supports automated test spec generation, execution, and detailed failure analysis to ensure server reliability.49 npmApache 2.0
- AlicenseAqualityCmaintenanceNetwork diagnostics — ping, traceroute, DNS lookup, port scanning, and connectivity testing via MCP.14MIT
- AlicenseAqualityCmaintenanceAn MCP server that unpacks and structures Playwright trace.zip archives so AI agents can perform root-cause analysis on CI failures, with 16 focused tools for inspection, DOM/UI analysis, root-cause analysis, and performance analysis.1960 npm1MIT
- AlicenseAqualityBmaintenanceMCP server for on-demand network diagnostics, providing DNS lookups with DNSSEC checks, ping, traceroute, TCP port checks, HTTP checks, TLS certificate inspection, WHOIS, and ASN lookups.12155 PyPIMIT