商业产业 Product Hunt 2026-07-27T16:12 正文 ok 224 words

MCP-Billing

英文标题:MCP-Billing

MCP-Billing 为 MCP 服务器提供 OAuth 2.1 与基于用量的 Stripe 计费能力。项目方确认,当前回环重定向 URI 校验应支持 RFC 8252 规定的动态端口,而非进行精确字符串匹配,并将这一修复列入 OAuth 开发待办的最高优先级。授权同意页面本身不会超时,但用户点击“Allow”后签发的一次性授权码仅有 60 秒有效期。作者也承认,目前缺少在用户不在键盘前时通知、唤醒或引导客户端完成审批的端到端交互机制,真实 Claude Desktop 环境的测试对此类问题尤为重要。
打开原文相关 2.7 · 机会 1
media862 B media7.1 KB media11.1 KB media6.0 KB media15.6 KB media6.5 KB media658 B media648 B media782 B media609 B media1020 B media1.5 KB

中文

@abdullah_javaid3,这个背景说明非常精彩,感谢你的确认。

关于回环验证:你完全正确。应将 redirect_uri 检查扩展为验证 RFC 8252 标准的动态端口,而不是进行精确字符串匹配;这是一个针对性很强的修复(调整 URI 正则表达式 / 端口验证器),我会直接将其放到 OAuth 待办事项的最优先位置。

关于摩擦点:为了完全说明当前行为,授权同意页面在保持打开状态时实际上不会超时。请求参数保存在表单输入中,点击“Allow”时会针对 Postgres 重新进行实时验证,并具备 TOCTOU 防护。60 秒 TTL 仅在你点击 “Allow” 之后才开始计算,此时会签发一次性授权码,供客户端交换使用。

因此,虽然超时机制不会把用户从页面上赶走,但你准确指出了真正的 UX 缺口:当用户恰好不在键盘前时,完全没有面向客户端与服务器的协同机制。没有推送通知,没有通过深度链接轮询来唤醒客户端,什么都没有。这个模板处理了认证原语,但没有处理“在需要批准时通知用户”的 UX。

你关于需要针对真实 Claude Desktop 实例进行端到端测试的看法也完全正确。无头模拟测试套件可以验证协议规范,但会完全遗漏这类现实世界中的人工介入摩擦。非常感谢你如此细致地拆解这个问题!

English / 原文

@abdullah_javaid3 that's brilliant context, thanks a lot for confirming.

on the loopback validation: you're 100% right. expanding the redirect_uri check to validate standard RFC 8252 dynamic ports instead of exact string matching is a surgical fix (adjusting the URI regex / port validator), and i'm adding that directly to the top of the OAuth backlog.

on the friction point: to be totally clear on how it behaves right now, the consent screen itself actually doesn't time out while sitting open. the request parameters live in the form inputs, and clicking "Allow" re-validates them fresh against Postgres with TOCTOU protection. the 60-second TTL only starts after you click "Allow", which is when the single-use authorization code gets issued for the client to exchange.

so while a timeout isn't kicking the user off the page, you nailed the real UX gap: there's zero client-server orchestration built for when the human isn't sitting at the keyboard at that exact moment. no push notification, no deep-linking polling to wake up the client, nothing. the boilerplate handles the auth primitives, but not the "notify the user when it's time to approve" UX.

and you're completely right about the end-to-end testing against a real Claude Desktop instance. headless mock suites verify the protocol specs, but they completely miss this kind of real-world human-in-the-loop friction. really appreciate you breaking this down!