[Agents] Improve MPP payment guides - #32185
Conversation
2dc338a to
41a7db0
Compare
Review
👉 Fix in your agent 👈Fix the following review findings in PR #32185 (https://github.com/cloudflare/cloudflare-docs/pull/32185).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Code Review
### Warnings (1)
#### CR-af85e4f33f7b · Incorrect HTTP header semantics
- **File:** `src/content/docs/agents/tools/payments/index.mdx` line 39
- **Issue:** Line 39 states MPP 'adds the `WWW-Authenticate: Payment` and `Authorization: Payment` headers to HTTP `402` responses.' `Authorization` is an HTTP request header sent by the client on the retried request; it is not returned by the server in a 402 response.
- **Fix:** Correct the description: say `WWW-Authenticate: Payment` is added to the 402 response, and the client retries the request with an `Authorization: Payment` header.
### Suggestions (1)
#### CR-3b00ba364097 · Deprecated API used in new guide
- **File:** `src/content/docs/agents/tools/payments/mpp/accept-payments.mdx` line 137
- **Issue:** The MCP example builds a new server around McpAgent (`agents/mcp`), but the repository's McpAgent API reference states the class is deprecated and feature-frozen, and recommends migrating to `createMcpHandler` instead.
- **Fix:** Either migrate the MCP example to `createMcpHandler` or add a notice that `McpAgent` is deprecated and link to the migration guidance.
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
Suggestions (1)
ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
|
/bonk please review |
There was a problem hiding this comment.
This is a clear, well-structured restructure. The new how-to guides fill meaningful gaps in the MPP docs.
I agree with the three warnings from the bot review (bold link text, unhandled MCP OAuth state, and unvalidated connection lookup) and have two additional minor style notes below.
Please address the bot findings before merging.
|
Review submitted successfully at cloudflare/cloudflare-docs/pull/32185. Summary of findings:
|
3c237bf to
f07cb78
Compare
be285b7 to
0566dd2
Compare
|
/bonk rebase branch off production |
|
Rebased successfully — the
The branch previously contained 11 extra commits that were already in production due to a shallow clone during the first rebase attempt. After fetching the full |
|
/rebase |
Head branch was pushed to by a user without write access
0566dd2 to
5360e27
Compare
|
rebased! |
|
i think still waiting on a 👍 |
Head branch was pushed to by a user without write access
5360e27 to
b6a0f24
Compare
Summary
Restructures the Machine Payments Protocol (MPP) documentation around Cloudflare tasks while keeping the protocol overview close to the original page.
mpp-proxyis referenced.McpAgenttool.mppx.The implementation pages remain
how-tocontent. The examples use imperative steps, Cloudflare components, root-relative internal links, TOML Wrangler configuration, and scoped automatic-payment policies.Depends on cloudflare/mpp-proxy#30, which restores the proxy's advertised charge-only flow.
payments/mpp.mdxpayments/mpp/index.mdxpayments/mpp/accept-payments.mdxpayments/mpp/pay-from-agents-sdk.mdxRedirects preserve the existing MPP URLs.
Validation
402 Payment RequiredandWWW-Authenticate: Payment.Payment-Receipt.McpAgenttools from an Agent; the paid call completed a nonzero testnet payment and returned an MPP Receipt.mpp-proxyreturns200from/__mpp/healthand a charge challenge from unpaid/__mpp/protected.pnpm run checkpnpm run format:core:checkpnpm exec tsm bin/validate-redirects.tsRUN_LINK_CHECK=true pnpm run build(8,695 pages; all internal links valid)Documentation checklist