Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: make stderr of server subprocess configurable #191

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sheffler
Copy link
Contributor

@sheffler sheffler commented Feb 5, 2025

This enhancement allows the creator of the stdio_client to pass a stream other than sys.stderr to become the stderr output.

Motivation and Context

This change allows a client to implement something similar to that of Claude Desktop where the error log stream goes to a specific named output destination if desired. (e.g. "mcp-server-XServer.log") Without this, all subprocess servers can only write to the same stderr stream.

If there is a way to achieve the same effect without a code change that would be very acceptable, but I could not determine a way to do that.

How Has This Been Tested?

This has been tested in a fork of "oterm", a terminal-based client, with ollama. Without this modification log and error messages from servers are written to the screen.

Breaking Changes

There should be no change to existing code.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • [ x] I have read the MCP Documentation
  • [x ] My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

I regret I do not have a self-contained test to submit, yet.

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.

1 participant