Proposal: export urlElicitationMiddleware
维护者通常 1 天内回复
评估
调研方向
Start in mcp/client.go and read urlElicitationMiddleware, including its TODO about exporting it. Compare the proposed exported middleware, a ClientOptions option, and the alternative decoding helper before settling the public API. Done means clients can handle -32042 elicitations without decoding the error data themselves.
由索引模型根据 Issue 内容生成。
描述
Checklist
- I searched the existing issues, and this has not been reported before.
- This is a real problem that I ran into myself, using the latest release of the SDK.
- I ran into it in a production system, not in a toy example, a benchmark, or an automated or AI-driven scan of the code.
- I (a human) examined the relevant SDK code, and wrote or reviewed every line of this report. It is not unreviewed AI output.
- This report is brief and concise, and sticks to the facts needed to understand the problem.
What problem are you trying to solve?
Our client handles URL mode elicitations in its ElicitationHandler. On 2026-07-28 the input requests of a tool result reach that handler. On 2025-11-25 a -32042 error does not: CallTool returns the *jsonrpc.Error, so we decode its elicitations data ourselves to get the same ElicitParams.
urlElicitationMiddleware in mcp/client.go already turns -32042 into handler calls, but it is unexported (see its TODO(rfindley) about exporting it). It returns a handler error wrapped, so it also works for a client that can't wait in-process: our handler returns an error carrying the URL and we pause the task for a person.
Where did you hit this?
kagent's Go ADK agent runtime relays an MCP server's URL elicitation to the person as an A2A input-required task (kagent-dev/kagent#3500).
What would help?
Export the middleware, e.g. func URLElicitationMiddleware() Middleware, or an option on ClientOptions that installs it. A smaller alternative: an exported helper that decodes -32042 data into []*ElicitParams, the inverse of URLElicitationRequiredError.
AI assistance: used to check the SDK code paths and draft this report.
- 主要语言
- Go
- 星标
- 5.3k
- 派生
- 607
- 平均合并
- 1 天 15 分钟
- 30 天内合并 PR
- 76
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/go-sdk 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/go-sdk#1512 · 1 条评论 ·
维护者通常 1 天内回复
-
Expose generic `SendNotification` on `ServerSession` for custom protocol extensions可能重新可做 关联的 PR 已关闭且未合并。 未关闭needs investigation
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/go-sdk#745 · 13 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 62/100
modelcontextprotocol/go-sdk#1506 · 2 条评论 ·
维护者通常 1 天内回复
-
mcp: closing a session right after a cancelled call drops notifications/cancelled, so the server handler keeps running可能已有人在做 @vshalpnjabi 于 2 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
modelcontextprotocol/go-sdk#1505 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp: list_changed can only be broadcast; a server cannot notify one session (2026-07-28 subscriptions/listen)可能已有人在做 @nahapetyan-serob 于 2 天前认领。 未关闭
难度 4/5 1-2 天 新手友好度 32/100
modelcontextprotocol/go-sdk#1480 · 1 条评论 · 已指派 2 人 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/go-sdk 的全部 Issue
相似的 Issue
-
govulncheck reports 7 reachable vulnerabilities in dependencies可能已有人在做 @dwisiswant0 今天认领。 未关闭Type: Bug
难度 2/5 1-3 小时 新手友好度 76/100
projectdiscovery/rawhttp#558 ·
-
govulncheck reports 8 vulnerabilities in called code可能已有人在做 @dwisiswant0 今天认领。 未关闭Type: Bug
难度 2/5 1-3 小时 新手友好度 73/100
projectdiscovery/vulnx#517 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
-
Type: Bug
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 77/100
rubys/roundhouse#1946 ·