Surface OAuth fetch-guard refusals as warnings when discovery falls back

未关闭
#2,846 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by tracing the OAuth discovery flow and the FetchTargetError raised by the destination guard, then find how warnings are presented in the CLI/mcpdo stderr, TUI Auth tab, and web Network/OAuth view. The issue does not name files or tests, so locate those entry points and check existing UI and CLI tests. Done when each surface shows the refusal even if discovery continues through a fallback URL.

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

描述

enhancement v2
Which client?

All / shared core

The problem

When the OAuth destination guard (#2749) refuses a metadata URL the server advertised, the SDK's discovery may fall back to another URL, and the user only sees a later, unrelated-looking failure (for example a Dynamic Client Registration 401 at the server's own origin). The refusal that changed the path is not shown anywhere, which makes misconfigured or hostile metadata hard to diagnose.

Solution you have in mind (optional)

Record each FetchTargetError raised during an OAuth flow and surface it: a warning line on CLI/mcpdo stderr, the TUI Auth tab and the web Network/OAuth view (e.g. "Refused to fetch : link-local or metadata address"), even when the flow continued down another path.

Alternatives or workarounds you have tried

None today; the refusal is only visible by adding logging to the guard.

Already built it locally?

No response

Before you submit
  • I searched existing issues and this is not a duplicate.
  • This is a request for the Inspector itself, not for the MCP specification or an SDK.
主要语言
TypeScript
星标
11.2k
派生
1.6k
平均合并
4 小时 49 分钟
30 天内合并 PR
139

环境准备

从这里开始

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

modelcontextprotocol/inspector 的其他 Issue

查看 modelcontextprotocol/inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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