Add the MPP discovery layer to the agentic-payments skill - #109
Conversation
The MPP guide covered Charge and Session mode but never explained how a paying agent finds the API in the first place. Add a Discovery section covering the OpenAPI 3.1 document at /openapi.json, the x-payment-info offers, and the mppx discovery() call that serves it. Also state the authority rule: the discovery document is advisory and the runtime 402 Challenge is authoritative for price, token, network, expiry, and terms. Name MPPScan and the mpp.dev services directory as optional registrations, and note that a listing does not verify any client payment. Route readers there from the SKILL.md decision table.
|
There was a problem hiding this comment.
Pull request overview
Adds MPP discovery guidance so paid APIs can be found by agents.
Changes:
- Documents OpenAPI discovery, authority rules, registries, and pitfalls.
- Links discovery from the skill decision tables.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
skills/agentic-payments/SKILL.md |
Adds discovery navigation. |
skills/agentic-payments/mpp.md |
Adds the discovery guide and examples. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // charge-server.js (additions to the Charge mode server above) | ||
| import { Mppx, discovery } from "mppx/express"; |
There was a problem hiding this comment.
🤖 Automated message from Kaan's Automated Triage Bot.
Agreed, and fixed in bd74373.
The block now says to edit the Charge mode server, not append to it. It also names the failure: a second mppx/express import redeclares Mppx, and a second /data route never runs. The three edits are numbered in the snippet, so the documented offer and the runtime Challenge come from the same handler.
|
|
||
| ## Discovery: let agents find your paid API | ||
|
|
||
| Charge and Session mode answer "how do I charge". Discovery answers "how does a paying agent find me". Without it you ship a working paid API that no agent can locate. |
There was a problem hiding this comment.
🤖 Automated message from Kaan's Automated Triage Bot.
Fixed in bd74373. The line now reads "Charge and Session modes answer one question: how do I charge? Discovery answers a second: how does a paying agent find me?" That drops the quotes and punctuates both as questions.
|
🤖 Automated message from Kaan's Automated Triage Bot. Picked this up — assessing whether I can ship an airtight fix. |
The block read as an append. Pasted that way it redeclares Mppx and registers a second /data route that never runs. Number the three edits instead, and tidy the intro.
|
🤖 Automated message from Kaan's Automated Triage Bot. Merged as I verified the API against the published package, not only the docs page. In
The four content points match One item outside this PR, for you @kaankacar: the install line is |
🤖 Automated message from Kaan's Automated Triage Bot.
Closes #107
The MPP guide taught Charge mode and Session mode. It did not teach discovery. A reader could ship a paid API that no agent can find.
This adds a Discovery section to
mpp.md:GET /openapi.jsonwithx-payment-infooffers. It shows thediscovery()call frommppx/express, wired to the existing Charge mode server.https://mpp.dev/mcp/services.It also adds two discovery pitfalls, updates the
mppx/expressrow in the imports table, and adds a decision-table line inSKILL.md.Verification. I read
https://mpp.dev/advanced/discoveryfor the four points. I checked the API against the published types:mppx@0.6.31, the line@stellar/mpp@0.7.1peer-depends on, exportsdiscovery(app, mppx, config?)frommppx/expressand mountsGET /openapi.json. The Express form needs one explicitroutesentry per paid route. The example and the second pitfall reflect that. Every new link returns 200.The change is markdown under
skills/only. The site build does not read these files, solint,lint:ts, andbuildare unaffected.