PFlux DOCS
GitHub Integration enquiries Create a payment link
PAYMENTS/ASSISTANT WALLET

Assistant wallet (MCP)

Let your AI assistant pay for web content, within limits you set. The wallet stays on your computer.

PACKAGE@p2flux/mcp
VERSION0.3.1
RUNSOn your computer
WALLETYours, local
PAYSx402 · USDC on Base

What it is

A small program that gives your AI assistant a wallet for paid web content. Some sites ask AI assistants to pay a few cents to read a page; with this, the assistant can find such sites, see the price and pay — never more than the limits you set. The wallet and its key stay on your computer. P2Flux never holds either.

Claude Desktop

  • Download p2flux.mcpb and double-click it. Claude Desktop installs it.
  • In the form, leave Money on test the first time and set your limits.
  • Ask Claude: “Set up my P2Flux wallet.” It shows the wallet address and how to add money.
  • Then: “Find articles about … I can buy”, “Read this page: https://…”, “How much have I spent?”
MONEY

Test mode uses free test USDC from Circle’s faucet (Base Sepolia). For real money, send USDC on the Base network to the wallet address — a small amount. If the computer is lost, the wallet on it is lost.

Other MCP clients

Claude Code, test money
claude mcp add p2flux -e P2FLUX_NETWORK=test -- npx -y @p2flux/mcp
Claude Code, real USDC
claude mcp add p2flux -e P2FLUX_NETWORK=live -- npx -y @p2flux/mcp

Other clients run npx -y @p2flux/mcp with the same variables. The package is @p2flux/mcp on npm and io.github.P2Flux/mcp in the official MCP Registry; the source is on GitHub.

VariableDefaultMeaning
P2FLUX_NETWORKtestlive = Base with real USDC; anything else is test (Base Sepolia)
P2FLUX_MAX_PER_PAYMENT0.50Budget for one page, USDC, up to 100
P2FLUX_MAX_PER_DAY5Budget for 24 hours, USDC, up to 1000
P2FLUX_MAX_CONFIRMED1000Most for one payment you confirm above the budget, USDC, up to 1000
P2FLUX_MAX_PREPAID1Most to put aside at one site, up to 100; 0 pays every page on its own
P2FLUX_MCP_DIR~/.p2flux-mcpWhere the wallet, the spending log and the access tokens are kept
P2FLUX_RPC_URLpublic Base RPCYour own Base RPC address, https
P2FLUX_API_URLby networkThe P2Flux API; https://api.p2flux.com live, https://api-test.p2flux.com test

A limit that cannot be read stops the server with an error; it is never taken as “no limit”.

Tools

ToolDoes
wallet_setupCreates the wallet if there is none; shows the address and how to add money.
wallet_balanceBalance, what was spent in the last 24 hours, the limits.
find_paid_contentSearches the P2Flux directory.
check_priceWhat a page costs. Pays nothing.
read_paidReads a page, paying within the limits and an optional max_price.
withdraw_prepaidTakes an unused prepaid balance at a site back into the wallet, once 0.10 USDC of it was used or after a day without use. Costs nothing.
spending_reportWhat was paid, when, where.

No tool reveals the wallet key: text on a web page can tell an assistant anything, so the one action that would lose the whole wallet is not one it can take. To move the wallet elsewhere, run p2flux-mcp export-key in a terminal yourself.

Limits and safety

  • Your limits are a budget: inside it (0.50 USDC per payment and 5 USDC a day unless you change them) payments go through on their own. Above it your app asks you in a dialog the assistant cannot answer, with the amount, the site and what it says it sells; nothing is paid unless you confirm, and never more than 1000 USDC.
  • The price a page asks is checked against your limits before anything is signed, and exactly that price is signed. A site that raises the price between the check and the payment gets nothing.
  • Only USDC on the configured network is paid. Only https addresses.
  • Every payment is written to a log on your computer before it is made; the daily limit survives restarts.
  • Text from pages and from the directory is marked as untrusted for the assistant.

Subscriptions and access tokens

Some sites sell a period instead of one page — a tipster’s subscription for 30 days, say. The payment is answered with an access token. The wallet keeps it in access.json in its folder (~/.p2flux-mcp unless P2FLUX_MCP_DIR says otherwise), under that site’s name, and sends it back only to that site, so later pages there are read without paying until it expires.

  • A token lasts until the date the site gives, at most 400 days; a day when the site gives none.
  • Up to 10 unexpired tokens per site are sent. Expired ones are dropped.
  • To forget them all, delete access.json. To forget one site, remove its entry from the file. The site then asks for payment again.

ChatGPT and claude.ai

ChatGPT and the claude.ai website cannot run a program on your computer; they connect only to servers on the internet. For them there is a second, remote server. It holds no wallet, no balance and no history, and has no login. You approve each payment yourself.

NetworkServer address
Base, real USDChttps://agent.p2flux.com/mcp
Base Sepolia, test USDChttps://agent-test.p2flux.com/mcp

Add the address as a custom connector — in claude.ai under Settings → Connectors, in ChatGPT in developer mode — with no authentication. Then ask for a paid page:

  • The assistant asks for a paid page and shows you a link.
  • You open the link. The page shows the amount, the page and the seller’s address, and you approve in your own wallet (Coinbase Wallet, MetaMask, …) — one signature for exactly that amount, no network fee.
  • The page is paid and fetched at once; the assistant reads it.
ToolDoes
find_paid_contentSearches the P2Flux directory.
check_priceWhat a page costs. Pays nothing.
request_paid_pageOpens a payment request and returns the link for you to approve.
get_paid_pageThe page text, once you have approved.

Only sites paid through P2Flux can be paid, only in USDC on Base, and the server reads only public https websites. A browser wallet extension is needed; one approval per page. Above 5 USDC — a subscription, say — the assistant must first ask you for a budget, and the approval page shows a warning with what the site says it sells and a box to tick.

  • request_paid_page takes an optional max_price. A page that costs more is refused and nothing is paid. Above 5 USDC it is required, and must cover the price.
  • An approval link is valid for 15 minutes.
  • A token bought for a period comes back to the assistant tied to that site; the server keeps none. The assistant passes it as access_tokens to read more pages there without paying. Keep it like a receipt.

Where it works

The local server: Claude Desktop, Claude Code, Cursor and other clients that run MCP servers on your computer. The remote server: claude.ai and ChatGPT, added as a custom connector without authentication.

Something more than a standard integration?
Marketplace flows, platform billing and custom settlement logic.
Discuss an integration