Fix RUST_LOG=off requirement for MCP stdio transport#79
Closed
Fix RUST_LOG=off requirement for MCP stdio transport#79
Conversation
…OG=off for stdio Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] RUST_LOG=off is required to stop MCP clients such as VS Code from parsing the logging output
Fix RUST_LOG=off requirement for MCP stdio transport
Aug 4, 2025
Collaborator
|
I think the bigger issue is that why is the parsing failed? If we can fix that we don't have to default the LOG to be OFF, isn't it? |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where MCP clients like VS Code and Gemini CLI would attempt to parse logging output as MCP protocol messages when using stdio transport, causing parsing errors.
Problem
When running
wassette serve --stdio(or the default behavior), logging output was being mixed with MCP protocol JSON messages on stdout/stderr. This caused MCP clients to fail parsing messages like:Previously, users had to manually add
"RUST_LOG": "off"to their MCP client environment configuration as a workaround.Solution
The fix moves logging initialization after CLI parsing to detect the transport mode and automatically:
RUST_LOG=offfor stdio transport (both default and explicit--stdio)--http)Verification
Before fix:
wassette serve --stdio # Mixed log + JSON outputAfter fix:
This ensures MCP clients receive clean JSON protocol messages without parsing interference, while maintaining full debugging capabilities when needed.
Fixes #73.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.