Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

stdio transport: a request over the maximum line length gets no answer

未關閉
#1,395 1 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 3 天內回覆

@gocamille 已經在處理了。

開始於 2026年10月26日。

評估

這個 Issue 還沒有評估資料。

描述

bug P1 ready for work T-transport

Since #1049 (rmcp 3.6.0) AsyncRwTransport drops a line that is longer than the maximum line length (16 MiB by default). It only writes a log entry. When that line is a request, the peer never gets an answer and waits until its own timeout. From the client side this looks like a server that hangs.

I found this while writing an MCP server that takes large inline files. A tools/call with a large base64 file in the arguments is enough.

To reproduce:

  1. Start any stdio server built on rmcp 3.7.0.
  2. Send initialize and notifications/initialized.
  3. Send one tools/call request whose line is larger than 16 MiB, for example with a 17 MiB string in arguments.
  4. The server logs "Incoming message exceeded the maximum line length, discarding it". The client gets nothing for this id.

Expected: an error answer for the request id, like the -32600 Invalid Request answer rmcp already sends for valid JSON with the wrong shape.

Lines without an id, responses and input that is not JSON should stay unanswered, so this does not bring back the error storm from #938.

I have a fix ready that builds on #1370. I can open it after that PR is merged.

主要語言
Rust
星號
4.1k
分支
680
平均合併
3 天 20 小時
30 天內合併 PR
32

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

modelcontextprotocol/rust-sdk 的其他 Issue

查看 modelcontextprotocol/rust-sdk 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。