feat: add AgentPay x402 payment demo#96
Open
up2itnow0822 wants to merge 1 commit intoGoogleChromeLabs:mainfrom
Open
feat: add AgentPay x402 payment demo#96up2itnow0822 wants to merge 1 commit intoGoogleChromeLabs:mainfrom
up2itnow0822 wants to merge 1 commit intoGoogleChromeLabs:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Adds a WebMCP demo showcasing x402 micropayments (HTTP 402 Payment Required) through navigator.modelContext on Base chain. Demo features: - Both declarative (toolname/tooldescription HTML attributes) and imperative (navigator.modelContext.registerTool) tool registration patterns - Three tools: fetch_paid_api, check_wallet_balance, get_payment_history - Simulated x402 API server (client-side, no backend required) - Clean UI: wallet status, activity log, payment history, API response - Full error handling and agent-active CSS states Tech: agentpay-mcp v4.0.0, agentwallet-sdk v6.0.4, webmcp-sdk v0.5.7 Protocol: x402 (Patent Pending) | Chain: Base | Non-custodial wallet via NFT Also adds entry to AWESOME_WEBMCP.md under Demos section.
a97a760 to
0930a01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a self-contained WebMCP demo showing an AI agent making x402 micropayments through
navigator.modelContext. When a paid API returns HTTP 402, the AgentPay wallet automatically signs a payment on Base and retries — all inside the browser.What's included
demos/x402-payment/index.html— main demo pagedemos/x402-payment/script.js— WebMCP tool registration + x402 logicdemos/x402-payment/style.css— clean, professional UIdemos/x402-payment/README.md— setup + architecture docsAWESOME_WEBMCP.md— entry added under DemosFeatures
fetch_paid_api,check_wallet_balance,get_payment_history:tool-form-active,:tool-submit-active)Example prompt
Tech
agentpay-mcpagentwallet-sdkwebmcp-sdkx402 Protocol — Patent Pending. Non-custodial smart contract wallet owned via NFT.
CLA
✅ CLA already signed for
up2itnow0822