Conversation
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.
Local MCP servers using stdin/stdout cannot currently use this package's client: a manually constructed stdio descriptor fails during initialization with
transport_unsupported. Add the qualifiedModelContextProtocol.prepare_stdio_client(command)constructor, including a do-block form, and reuse the existing initialize, list/call, handler, and termination APIs.The client owns one local child and its stdin/stdout pipes. It correlates concurrent requests, routes responses independently of user callbacks, keeps stderr separate, bounds frames/queues/request waits, and closes/reaps the child on EOF or failure. Condition notifications remove the polling floor in the new implementation; write-deadline races preserve failure, while complete replies received before EOF remain available. Shutdown can retry completed cleanup failures. Arbitrary blocked callbacks require cooperative release and produce a bounded close timeout.
Protocol selection is explicit:
2025-11-25by default, or2026-07-28discovery and request metadata. Automatic version probing/restart/replay, modern subscriptions, Agentif catalog/schema import, and native subprocess compilation are outside this change. There are no new dependencies or exports. HTTP behavior and the old 16-, 18-, and 19-argument client constructors remain covered;MCPClientgains one optional field, which changes its exact field layout.Validation on macOS arm64:
Co-authored by Codex