MCP Catalogs
Homemcp-stdio-guard screenshot

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.

developer-toolsmonitoringops-infra
0
Forks
1
Open issues
this month
Last commit
2d ago
Indexed

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:

you:Validating MCP stdio servers in CI/CD pipelines before release
you:Debugging protocol issues in MCP server implementations
you:Preventing stdout pollution from breaking client connections

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

mcp@modelcontextprotocol/sdkserver-test-harness

Installation

Install from npm:

npm install -g mcp-stdio-guard

Usage:

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.js

To use in CI:

- run: npx mcp-stdio-guard --scan src --fail-on-static --request tools/list -- node ./server.js

On Hacker News

Recent discussion from the developer community.

Compare mcp-stdio-guard with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.