modelcontextprotocol / modelcontextprotocol/java-sdk

Add an ability to trace requests

未关闭
#561 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement P3
主要语言
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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,将链接的 Scala LoggingServletTransportProvider 与 Java SDK 当前的 builder 和受保护的 transport 方法进行比较。确定如何通过请求跟踪公开用户选择的输出文件,而不依赖无法访问的构造函数或方法。当用户可以配置文件并查看 MCP server 与 client 之间交换的请求信息时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
observability
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。