Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_js
I maintainer di solito rispondono entro 3 giorni
@bolinfest ci sta già lavorando.
Dal 15/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 4k
- Fork
- 662
- Merge medio
- 3g 23h
- PR unite (30g)
- 34
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusForse già presa @aton-of-data l’ha presa 4 giorni fa. Apertabug P2 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/rust-sdk#1339 ·
I maintainer di solito rispondono entro 3 giorni
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeForse già presa @jstar0 l’ha presa 7 giorni fa. Apertabug P1 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
modelcontextprotocol/rust-sdk#1330 ·
I maintainer di solito rispondono entro 3 giorni
-
P3 question Stale T-documentation T-enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
modelcontextprotocol/rust-sdk#1155 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Client never answers a server `ping` sent during the `initialize` handshakeForse già presa @bolinfest l’ha presa 1 giorno fa. Apertabug P1 ready for work T-service
modelcontextprotocol/rust-sdk#1362 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
streamable-http client: an error response to `initialize` is lost or ignored (SSE, session re-init)Forse già presa @bolinfest l’ha presa 1 giorno fa. Apertabug P1 ready for work T-transport
modelcontextprotocol/rust-sdk#1360 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di modelcontextprotocol/rust-sdk
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
dependencies effort:low flow:chore rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
jaroslawherod/micold-ai-ide#875 ·
I maintainer di solito rispondono entro 1 giorno
-
priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
storytold/photocraft#6286 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Four problem loader browser tests fail on WindowsForse già presa @Patriciaath999 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Kazakh (kk_KZ) and Georgian (ka_GE) system locales get English instead of the shipped translationsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno