Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_js
Les mainteneurs répondent en général sous 3 jours
@bolinfest y travaille déjà.
Depuis le 15/10/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 4.1k
- Forks
- 680
- Merge moyen
- 3 j 20 h
- PR mergées (30 j)
- 32
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de modelcontextprotocol/rust-sdk
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopePeut-être pris @jstar0 l’a pris il y a 20 jours. Ouvertebug P1 ready for work T-security T-transport
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
modelcontextprotocol/rust-sdk#1330 ·
Les mainteneurs répondent en général sous 3 jours
-
Enterprise-managed auth: ID-JAG `resource` claim should be optionalPeut-être pris @gocamille l’a pris aujourd’hui. Ouvertebug P1 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1404 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
-
Auto discovery timeout rejects a late probe response during legacy initializationPeut-être pris @gocamille l’a pris il y a 1 jour. Ouvertebug P1 ready for work T-service
modelcontextprotocol/rust-sdk#1400 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
-
URL mode elicitation requires elicitationId, which the 2026-07-28 schema removedPeut-être pris @gocamille l’a pris il y a 2 jours. Ouvertebug P1 ready for work T-model
modelcontextprotocol/rust-sdk#1399 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
-
stdio transport: a request over the maximum line length gets no answerPeut-être pris @gocamille l’a pris il y a 2 jours. Ouvertebug P1 ready for work T-transport
modelcontextprotocol/rust-sdk#1395 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de modelcontextprotocol/rust-sdk
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
swc-project/swc-next#1165 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Alive24/shea-symphony#574 ·
-
bug tests Windows
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
[ko] Translate /team into KoreanOuvertedocumentation good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
dev-five-git/devup-ui#879 ·
Les mainteneurs répondent en général sous 11 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
farion1231/cc-switch#9038 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour