Skip to content

update MCPClient.connectStdioServer to operate on streams and sinks #204

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

Merged
merged 1 commit into from
Jun 27, 2025

Conversation

jakemac53
Copy link
Contributor

Updated MCPClient.connectStdioServer to take a stdin and stdout stream instead of a binary name and arguments. It no longer spawns processes on its own. This removes the dart:io dependency and allows more flexibility for how processes are spawned (can use package:process or even no process at all).

The migration is pretty easy, just launch your own process and pass in stdin/stdout from that.

@jakemac53 jakemac53 requested a review from gspencergoog June 27, 2025 17:19
@github-actions github-actions bot added type-infra A repository infrastructure change or enhancement package:dart_mcp package:dart_mcp_server labels Jun 27, 2025
Copy link

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

Oh, yes, this is much better.

@jakemac53 jakemac53 merged commit 6b84c96 into main Jun 27, 2025
23 of 24 checks passed
@jakemac53 jakemac53 deleted the client-refactor branch June 27, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:dart_mcp_server package:dart_mcp type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add environment support to client
2 participants