Skip to content

Configure hosted stdio servers to log to stderr#173

Merged
stephentoub merged 4 commits intomodelcontextprotocol:mainfrom
halter73:log-stderr
Apr 1, 2025
Merged

Configure hosted stdio servers to log to stderr#173
stephentoub merged 4 commits intomodelcontextprotocol:mainfrom
halter73:log-stderr

Conversation

@halter73
Copy link
Copy Markdown
Contributor

No description provided.

@stephentoub
Copy link
Copy Markdown
Contributor

Have you tested how this behaves with various tools as clients?

What's the experience going to be like with our client, that does this:

process.ErrorDataReceived += (sender, args) => logger.TransportError(endpointName, args.Data ?? "(no data)");

?

@halter73
Copy link
Copy Markdown
Contributor Author

halter73 commented Mar 31, 2025

It works well with the server inspector. I think we should update ErrorDataReceived event to emit a new info-level log and give it a new message specific to to our client receiving stderr output. I can do that in this PR.

Comment thread samples/QuickstartClient/Program.cs
@stephentoub stephentoub merged commit 8dc1f5d into modelcontextprotocol:main Apr 1, 2025
8 checks passed
@halter73 halter73 mentioned this pull request Apr 2, 2025
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.

2 participants