Mcp

io.github.P2Fluxv0.3.1更新於 Oct 2, 2026

Let your AI assistant pay for web content in USDC (x402) within a budget you set.

已驗證Streamable HTTP可網頁執行Web Search & ScrapingFinance

概覽

AI 產生的概覽

讓 AI 助理在你設定的額度內,用 USDC 小額付款以閱讀付費網頁內容。

功能
在你自己的電腦上為助理提供一個小額加密錢包,讓它能向要求 HTTP 402 付款(x402 標準)的網站支付 Base 網路上的 USDC。它會在簽名前依你的額度核對價格,在本機保存消費紀錄,並可在某網站預存餘額或重複使用訂閱存取權杖。給 ChatGPT 與 claude.ai 的遠端版本不保存錢包,而是給你一個連結,由你在自己的瀏覽器錢包中逐筆確認付款。
適用情境
當你希望助理取得按頁或按週期計費的文章、資料或訂閱內容,且願意讓它在預算內自動小額付款時,值得加入。對免費或公開可存取的頁面則不需要。
執行需求
本機使用透過 npx @p2flux/mcp(Node.js)或 Claude Desktop 擴充套件執行,需要一個在 Base 上有餘額的錢包或 Base Sepolia 測試幣。設定透過環境變數:P2FLUX_NETWORK、P2FLUX_MAX_PER_PAYMENT、P2FLUX_MAX_PER_DAY、P2FLUX_MAX_PREPAID、P2FLUX_MCP_DIR。遠端伺服器需要 P2FLUX_PUBLIC_URL、P2FLUX_REMOTE_SECRET 以及瀏覽器錢包擴充套件;不需登入。
安裝前請注意
當 P2FLUX_NETWORK 設為 live 時會花費真實 USDC,建議先用測試網路並保持小額。錢包私鑰存放在本機檔案中,電腦遺失則錢包遺失。超出額度的付款需要你在助理無法回應的對話框中確認。遠端伺服器不保存錢包,但要求你在瀏覽器錢包中逐筆批准付款,存取權杖由 P2FLUX_REMOTE_SECRET 加密保護。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://agent.p2flux.com/mcp"
    }
  }
}

README

P2Flux MCP — let your AI assistant pay for web content

Some websites ask AI assistants to pay a few cents to read an article or use their data. This gives your assistant a small wallet on your own computer and lets it pay those sites for you — never more than the limits you set. P2Flux never holds your money or your key.

Claude Desktop (no technical knowledge needed)

  1. Download p2flux.mcpb and double-click it. Claude Desktop asks you to install it.
  2. In the form, leave Money on test the first time, and set your limits (default: 0.50 USDC per page, 5 USDC per day).
  3. Ask Claude: "Set up my P2Flux wallet." Claude shows the wallet's address and how to add money.
    • Test: free test money from https://faucet.circle.com (choose Base Sepolia).
    • Real money: in the Coinbase app choose Send → USDC → Base network and paste the address. Send a small amount. Treat it like cash in a pocket.
  4. Use it: "Find articles about soup recipes I can buy", "Read this page: https://…", "How much have I spent?"

If the computer is lost, the wallet on it is lost. Keep small amounts.

Claude Code, Cursor and other MCP clients

bash
claude mcp add p2flux -e P2FLUX_NETWORK=test -- npx -y @p2flux/mcp
VariableDefaultMeaning
P2FLUX_NETWORKtesttest = Base Sepolia, live = Base with real USDC
P2FLUX_MAX_PER_PAYMENT0.50most for one page
P2FLUX_MAX_PER_DAY5most in 24 hours
P2FLUX_MAX_PREPAID1most to put aside at one site; 0 = pay every page on its own
P2FLUX_MCP_DIR~/.p2flux-mcpwhere the wallet and the spending log are kept

What it does, and does not

  • Pays pages that ask with HTTP 402 (the x402 standard) in USDC on Base. Nothing else.
  • Checks the price against your limits before signing, and signs exactly that price. A site that changes the price between the check and the payment gets nothing.
  • Keeps a spending log on your computer; the daily limit survives restarts.
  • Money put aside at a site and not used comes back when you ask ("take my unused balance at that site back") once 0.10 USDC of it was used or after a day without use, and on its own after a week without use when it is 0.50 USDC or more.
  • Your limits are a budget: inside it (default 0.50 USDC per payment, 5 USDC a day) payments go through on their own. Above it, your app asks YOU in a dialog - the assistant cannot answer it - with the amount, the site and what the site says it sells; nothing is paid unless you confirm, and never more than P2FLUX_MAX_CONFIRMED (default 1000 USDC). Apps that cannot show such a dialog refuse the payment instead.
  • Some sites sell a period instead of one page - for example a tipster's subscription for 30 days, at the price people pay for it. The site answers with an access token, which is kept on your computer for that site only and sent back to it, so later pages there are read without paying until it expires. check_price shows what the site says a payment buys.
  • The key is in one file only you can read. It is never sent anywhere, and no tool can reveal it - so nothing an assistant reads on the web can talk it into giving the key away. To move the wallet elsewhere, run npx -p @p2flux/mcp p2flux-mcp export-key in a terminal yourself.
  • ChatGPT and the claude.ai website cannot run a program on your computer. For them there is the remote server below: no wallet is kept anywhere; you approve each payment in your own browser wallet.

Development

bash
npm install && npm test          # unit testsnpm run buildnode test/live.mjs               # live on Base Sepolia (see the file)npx @anthropic-ai/mcpb pack . p2flux.mcpb

ChatGPT and claude.ai (remote server)

p2flux-mcp-remote is the same idea for assistants that only connect to servers on the internet. It holds no wallet, no balance and no history, and needs no login. Tools: find_paid_content, check_price, request_paid_page, get_paid_page.

  1. The assistant asks for a paid page. It gets a link, and shows it to you.
  2. You open the link. The page shows the amount, the page and the seller's address. You approve in your own wallet (Coinbase Wallet, MetaMask…): one signature for exactly that amount, no network fee.
  3. The page is paid and fetched at once; the assistant reads it.

Only sites paid through P2Flux can be paid, only in USDC on Base, and never more than P2FLUX_REMOTE_MAX_PRICE (default 1000 USDC). Above P2FLUX_REMOTE_CONFIRM_ABOVE (default 5 USDC) - a subscription, say - the person is asked twice: the assistant must first ask them and pass their budget as max_price, and the approval page shows the amount and what the site says it sells, with a box to tick before the wallet opens. P2FLUX_REMOTE_SECRET (32+ characters) seals access tokens to their site across restarts. The server reads only public https websites.

bash
P2FLUX_PUBLIC_URL=https://agent.example.com P2FLUX_NETWORK=test PORT=8787 npx -p @p2flux/mcp p2flux-mcp-remote

Put it behind https (nginx) with P2FLUX_TRUST_PROXY=1, then add https://agent.example.com/mcp as a custom connector in claude.ai or ChatGPT (developer mode), authentication: none.

Limits today: a browser wallet extension is needed (no WalletConnect / phone wallets yet); one approval per page (no prepaid balance).

來源:README.md,提交 eb3efd7

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.3.1最新Oct 2, 2026