Feature request: recognise pay-per-call x402 results from MCP tools (pending payment response)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by reading apps/sim/lib/internal/mcp/execute-tool.ts and tracing the mcp-tool-selector result path to see how result.output reaches the canvas. Identify where a payment_required envelope can be represented without raw passthrough. Done means a parsed challenge exposes price, pay_to, and scheme, requires operator or approved payer approval, and supports payment and retry.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Sim wires external MCP servers into canvas workflows and executes their tools. In execute-tool.ts (apps/sim/lib/internal/mcp/execute-tool.ts), a successful tool call returns { success: true, data: { success: true, output: result.output } } — the MCP server's tool output is passed straight through to the workflow.
A pay-per-call x402 MCP server is a normal MCP server that answers a tool call with a pending-payment result instead of data: it returns HTTP 200 with result content of the form {"status":"payment_required", "payment_challenge": {"price_xno": 0.0001, ...}}. When a Sim workflow calls such a tool through mcp-tool-selector, result.output is that JSON blob, and the canvas shows raw JSON instead of a confirm-and-pay step. This has been verified against a live pay-per-call merchant MCP (Vend API Merchant at extract.paypercall.dev/mcp): initialize returns 200 with correct tools, but tools/call returns 200 whose result content is a payment_required envelope.
This is the one missing client-side behaviour for zero-signup pay-per-call tools to be usable from a Sim workflow — they already work at the MCP protocol level.
Describe the solution you'd like
In the MCP tool-call path, detect a payment_required / x402 payment_challenge result structurally (not as raw JSON passthrough) and:
- surface a per-call confirmable payment step — price,
pay_to, scheme — so the operator can pay and retry from the canvas/UI, and/or - support an optional per-credential "payer" config so admin-added pay-per-call tools settle automatically under approval control.
Security invariant: no money moves unless the challenge parses AND the operator (or a configured, approved payer) approves.
Describe alternatives you've considered
- Keep raw JSON passthrough for paid tools. Works, but a workflow that dumps
payment_challengeJSON to the user is not usable for pay-per-call tools. - Build a separate x402 proxy outside Sim. Adds ops overhead and defeats the purpose of a visual MCP workflow.
- Use a custom extraction tool that pre-encodes the payment. Very platform-specific and doesn't leverage the growing x402 catalogue.
Additional context
A working reference:
- Vend API Merchant MCP manifest: https://extract.paypercall.dev/.well-known/mcp
- x402 settlement manifest: https://extract.paypercall.dev/.well-known/x402
- 9 MCP tools (web extract, link check, geoip, web search, youtube transcript, etc.), single calls ~0.0001 XNO, no signup, no API keys, per-call settlement in Nano (XNO) via nano:mainnet.
- A bare probe returns 402 with the full challenge:
curl -i https://extract.paypercall.dev/api/v1/extract?url=https://example.com
This is a first — Sim had zero x402 / pay-per-call coverage before this issue (GitHub search confirmed).
- 主要言語
- TypeScript
- スター
- 29.8k
- フォーク
- 3.9k
- 平均マージ
- 1時間 44分
- マージ済み PR(30日)
- 841
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simstudioai/sim のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
simstudioai/sim#9831 ·
メンテナーはふだん 1 日以内に返信
-
v2 API rate limits self-hosted installs by IP even with billing disabled対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
simstudioai/sim#8452 ·
メンテナーはふだん 1 日以内に返信
-
Railway template generates invalid ENCRYPTION_KEY (should be 64-char hex string)再び着手できるかも @sahooarnav2007-gif が 15 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
simstudioai/sim#6246 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
simstudioai/sim#1204 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
simstudioai/sim#9734 ·
メンテナーはふだん 1 日以内に返信
simstudioai/sim の issue をすべて見る
似ている issue
-
Bug: Cloudflare Pages static _redirects identity rule causes RSC Flight to reload as HTML対応中かも @Donvero が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Mantitup-Org/vista#210 ·
-
status: waiting for maintainer
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
mui/material-ui#49751 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
diplodoc-platform/transform#1184 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JonasKruckenberg/imagetools#973 ·
メンテナーはふだん 1 日以内に返信