mcp-stdio-guard
by 1Utkarsh1·★ 57·Score 46
A tool that validates MCP stdio servers by catching stdout pollution and handshake failures before clients encounter them.
Overview
mcp-stdio-guard is a validation utility that ensures MCP stdio servers correctly implement the protocol by running them through a real handshake process and checking for stdout contamination. It detects issues like console.log output, Python print statements, or any other non-JSON-RPC output that would corrupt the stdio stream. The tool performs both runtime checks and optional static scanning of source code to identify problematic stdout usage. With zero runtime dependencies, it's designed to be integrated into CI pipelines to catch protocol violations early.
Try asking AI
After installing, here are 3 things you can ask your AI assistant:
When to choose this
You should choose this tool when developing or maintaining MCP stdio servers to prevent common protocol failures caused by stdout pollution and handshake issues.
When NOT to choose this
Don't use this for servers using non-stdio transports (HTTP/WebSocket), or if you need runtime validation beyond the initial handshake phase.
Comparable tools
Installation
Install from npm:
npm install -g mcp-stdio-guardUsage:
mcp-stdio-guard -- node ./server.js
mcp-stdio-guard --request tools/list -- node ./server.js
mcp-stdio-guard --scan src --fail-on-static -- node ./server.jsTo use in CI:
- run: npx mcp-stdio-guard --scan src --fail-on-static --request tools/list -- node ./server.jsOn Hacker News
Recent discussion from the developer community.
- Story by utkarsh4995 · 2026-05-16
Compare mcp-stdio-guard with
Last updated · Auto-generated from public README + GitHub signals.