Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_js
メンテナーはふだん 2 日以内に返信
@bolinfest がすでに取り組んでいます。
2026年10月15日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
I ran rmcp's tests on Windows (CI only runs Linux). Two tests fail there. Both problems are in the tests; the SDK code behaves correctly.
-
transport::auth::tests::default_http_client_preserves_connection_failure_cause(lib,--all-features) checks for the English textconnection refused. Windows describes a refused connection differently, so the assertion fails although the error chain is correct:unexpected discovery error: Metadata error: OAuth metadata discovery failed for http://127.0.0.1:34350/mcp Caused by: error sending request for url (http://127.0.0.1:34350/mcp) Caused by: client error (Connect) Caused by: tcp connect error Caused by: No connection could be made because the target machine actively refused it. (os error 10061) -
All three
test_with_jstests (no-localfeature set) fail withError: program not found.install_js_dependenciesrunsCommand::new("npm"), but on Windows npm is the shimnpm.cmd, andCommanddoesn't resolve a bare name to a.cmdfile. (nodeisnode.exe, so the other spawns work.)
To Reproduce
On Windows 11 with rustc 1.96 (the version rust-toolchain.toml pins), Node 24 and uv:
cargo test -p rmcp --all-features --lib default_http_client_preserves_connection_failure_causecargo test -p rmcp --features "<all rmcp features except local, as in CI>" --test test_with_js
Expected behavior
Both pass, as they do on Linux.
Proposed fix (test-only, 8 lines added, 3 removed)
- auth test: before the request, connect to the same dropped address with
std::net::TcpStream::connect(addr), and assert that the reason contains that error'sto_string(). That way the test expects whatever text the OS uses, instead of a hard-coded English phrase. test_with_js:let npm = if cfg!(windows) { "npm.cmd" } else { "npm" };. Another option is to dogfoodrmcp::transport::which_command("npm"), but thenwhich-commandhas to be added to the test'srequired-features.
Patch: https://github.com/modelcontextprotocol/rust-sdk/compare/main...RafalOfficial:rust-sdk:fix/windows-test-portability. With it, both tests pass on Windows. These all pass unchanged on Windows: the other 606 lib tests, test_with_python, test_stdio_response_concurrency, test_close_connection and test_async_rw_max_line_length. The patch is formatted with cargo +nightly fmt. If you're happy with this, I can open the PR. If you don't want Windows-only test fixes while CI is Linux-only, just close this.
Additional context
Main at 8d226f4. This report and the proposed patch were written with Claude Code (AI-assisted). I ran the commands above on a real Windows machine.
- 主要言語
- Rust
- スター
- 4k
- フォーク
- 662
- 平均マージ
- 3日 20時間
- マージ済み PR(30日)
- 30
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/rust-sdk のほかの issue
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP status対応中かも @aton-of-data が 5 日前に担当しました。 オープンbug P2 ready for work T-security T-transport
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/rust-sdk#1339 ·
メンテナーはふだん 2 日以内に返信
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scope対応中かも @jstar0 が 8 日前に担当しました。 オープンbug P1 ready for work T-security T-transport
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
modelcontextprotocol/rust-sdk#1330 ·
メンテナーはふだん 2 日以内に返信
-
P3 question Stale T-documentation T-enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
modelcontextprotocol/rust-sdk#1155 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Expose OAuth discovery and registration results for application-owned flows対応中かも @connor4312 が今日担当しました。 オープンenhancement P2 ready for work T-security
modelcontextprotocol/rust-sdk#1371 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Client never answers a server `ping` sent during the `initialize` handshake対応中かも @bolinfest が 2 日前に担当しました。 オープンbug P1 ready for work T-service
modelcontextprotocol/rust-sdk#1362 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
modelcontextprotocol/rust-sdk の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
shep-pm/shep-kelpie#980 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend rt sev-3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
C-bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersオープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
dbt-labs/dbt#16784 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:cli bug good first issue priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信