Skip to content

Conversation

dimber-cais
Copy link

IntelliJ fails to connect if output is sent to STDERR

@mohanraj-r
Copy link

@benconda This PR would be helpful to have in other IDEs too as some MCP clients bubble-up any transport.stderr to be visible to user in UI which is confusing to the user. Can you please review and approve this.

@@ -32,6 +32,9 @@ const pid = process.pid
// Global debug flag
export let DEBUG = false

// Global no-log flag
export let NO_LOG = false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to rename this to NO_STDERR_LOG (and the corresponding cli arg to --no-stderr-log) to be more explicit and clear.

@@ -71,6 +74,10 @@ export function debugLog(message: string, ...args: any[]) {
}

export function log(str: string, ...rest: unknown[]) {
if(NO_LOG) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this control just the console.error below so that the DEBUG log functionality is preserved?
Actually nm, I notice that debugLog has some console.error as well ..

Suggested change
if(NO_LOG) {
if(!NO_LOG) {
console.error

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benconda But this also brings in a bigger question - wouldn't this result in valid error logs from server being lost? How would the remote server communicate error msgs as per the protocol and how does mcp-remote handle it currently?

dimber-cais and others added 2 commits August 27, 2025 15:26
IntelliJ fails to connect if output is sent to STDERR
Co-authored-by: Benoit Condaminet <[email protected]>
Copy link

pkg-pr-new bot commented Aug 27, 2025

Open in StackBlitz

npx https://pkg.pr.new/mcp-remote@127

commit: 456b072

@geelen
Copy link
Owner

geelen commented Aug 27, 2025

Would love to implement something like this but I have some of the same questions as @mohanraj-r. For now I've just approved the preview run so you should be able to test this with npx https://pkg.pr.new/mcp-remote@127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants