browser-tools-mcp icon indicating copy to clipboard operation
browser-tools-mcp copied to clipboard

Keep MCP stdio logs off stdout

Open mirageN1349 opened this issue 6 months ago • 0 comments

Summary

  • route diagnostic MCP server logs to stderr instead of stdout
  • install the stdout JSON-RPC guard before startup discovery runs
  • keep stdout reserved for MCP JSON-RPC messages

Verification

  • npm run build
  • started dist/mcp-server.js over stdio and sent an initialize request; stdout contained only the JSON-RPC response while discovery logs were written to stderr

mirageN1349 avatar May 29 '26 09:05 mirageN1349