modelcontextprotocol / modelcontextprotocol/java-sdk
Add an ability to trace requests
還沒有人認領這個 Issue。
- 主要語言
- Java
- 星號
- 3.7k
- 分支
- 1.1k
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 9
描述
Expected Behavior
User can specify a file to dump information about all requests being sent between MCP server and the client
Current Behavior
I don't think there is a way to do it currently.
Context
We created a LoggingServletTransportProvider which does that, but with the new changes that no longer compiles since there is no public constructor. Using the builder and then composing is also not possible because the methods are protected.
We could upstream the LoggingServletTransportProvider or something along these lines if it makes sense.
This is very useful for debugging potential issues with MCP servers especially when users turn on automatic accept.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,將連結的 Scala LoggingServletTransportProvider 與 Java SDK 目前的 builder 和受保護的 transport 方法進行比較。確定如何透過請求追蹤公開使用者選取的輸出檔案,而不依賴無法存取的建構子或方法。當使用者可以設定檔案,並查看 MCP server 與 client 之間交換的請求資訊時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- observability
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100