Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_js
Mantenedores costumam responder em até 2 dias
@bolinfest já está trabalhando nisso.
Desde 15/10/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 4k
- Forks
- 662
- Merge médio
- 3d 20h
- PRs com merge (30d)
- 30
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusTalvez já em andamento @aton-of-data assumiu há 5 dias. Abertabug P2 ready for work T-security T-transport
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
modelcontextprotocol/rust-sdk#1339 ·
Mantenedores costumam responder em até 2 dias
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeTalvez já em andamento @jstar0 assumiu há 7 dias. Abertabug P1 ready for work T-security T-transport
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
modelcontextprotocol/rust-sdk#1330 ·
Mantenedores costumam responder em até 2 dias
-
P3 question Stale T-documentation T-enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
modelcontextprotocol/rust-sdk#1155 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Expose OAuth discovery and registration results for application-owned flowsTalvez já em andamento @connor4312 assumiu hoje. Abertaenhancement P2 ready for work T-security
modelcontextprotocol/rust-sdk#1371 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
Client never answers a server `ping` sent during the `initialize` handshakeTalvez já em andamento @bolinfest assumiu há 1 dia. Abertabug P1 ready for work T-service
modelcontextprotocol/rust-sdk#1362 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 2 dias
Todas as issues de modelcontextprotocol/rust-sdk
Issues semelhantes
-
type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
stackabletech/operator-rs#1301 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
jmcnamara/rust_xlsxwriter#205 · 4 comentários ·
-
agent:triaged bug bughunt pm:pipenv priority:p1
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
SocketDev/socket-patch#1608 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
adorsys/status-list-server#698 ·
Mantenedores costumam responder em até 2 dias
-
Expose the dot grid colourAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
nannou-org/egui_graph#92 ·
Mantenedores costumam responder em até 1 dia