PHANTOM ID — agent payments (USDC on Base)

io.github.Arbromagency-Sato由 GitHub 帳號 Arbromagency-Sato 發布v0.3.2更新於 Nov 11, 2026

PHANTOM ID MCP payment server: agent-to-agent USDC payments on Base.

發布方自己的服務:Payments Ai Mcp

已驗證Streamable HTTP可網頁執行金融AI 與機器學習

概覽

AI 產生的概覽

讓 AI 助理透過 IDPHANTOM 平台在 Base 上報價、授權、提交並驗證代理之間的 USDC 付款。

可以做什麼
  • 建立含透明平台費的付款報價,並回傳可簽署的付款意圖
  • 為已報價的付款意圖附加本機產生的付款方簽章以完成授權
  • 廣播已授權的付款意圖,由平台轉送鏈上交易並完成資金結算
  • 驗證付款收據,包含簽章、付款方還原、有效期限與鏈上授權狀態
  • 註冊帳號並綁定可攜式的代理身分
  • 設定由出資方簽署的消費預算,可附帶每日上限
適用情境
當代理需要以 Base 上的 USDC 向其他代理或服務付款,並希望把報價、消費上限、結算與收據驗證交給同一個 API 處理時使用。它不是通用錢包或交易工具。
執行需求
可使用遠端端點,或以 Node.js 透過 npx 在本機執行 npm 套件。需要 IDPHANTOM 帳號,並在 PHANTOM_API_KEY(或 Authorization 標頭)中提供 API 金鑰;PHANTOM_API_URL 為選用,預設指向正式環境。註冊與預算工具需要在環境中設定 PHANTOM_PAYER_PRIVATE_KEY、PHANTOM_FUNDER_PRIVATE_KEY 與 PHANTOM_ROUTER_ADDRESS。註冊需在 Base 主網支付 2 USDC。
安裝前請注意
伺服器要求在環境變數中提供錢包私鑰(PHANTOM_PAYER_PRIVATE_KEY、PHANTOM_FUNDER_PRIVATE_KEY、PHANTOM_IDENTITY_PRIVATE_KEY),持有者即可控制資金。註冊與付款會在 Base 主網花費真實 USDC,submit_payment 會實際結算資金。API 金鑰只顯示一次,請妥善保存。預設上限為單筆 50 美元、每日 500 美元。伺服器會將漏斗事件寫入 stderr。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 PHANTOM ID — agent payments (USDC on Base),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.Arbromagency-Sato%2Fphantom-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

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

{
  "mcpServers": {
    "phantom-id-agent-payments-usdc-on-base": {
      "type": "http",
      "url": "https://pay.idphantom.com/mcp"
    }
  }
}

README

IDPHANTOM MCP Server

@phantomid/mcp-server exposes IDPHANTOM payments as standard MCP tools so an AI agent can quote, authorize, submit, and verify agent-to-agent payments through IDPHANTOM.

Production defaults to:

text
https://pay.idphantom.com

Install

sh
npx @phantomid/mcp-server

For MCP clients, configure the server command and environment:

json
{  "mcpServers": {    "phantom-id": {      "command": "npx",      "args": ["@phantomid/mcp-server"],      "env": {        "PHANTOM_API_URL": "https://pay.idphantom.com",        "PHANTOM_API_KEY": "pk_live_..."      }    }  }}

PHANTOM_API_URL is optional when using production. PHANTOM_API_KEY is required for normal paid API usage after registration.

Self-serve tools environment (AGP-100)

The MCP tools phantom_register and phantom_authorize_budget read their signing keys only from the environment (never from command-line flags — argv leaks into shell history and process listings):

VariableUsed byPurpose
PHANTOM_PAYER_PRIVATE_KEYphantom_register (auto mode)Pays the $2 USDC registration; signs locally, never leaves the process.
PHANTOM_FUNDER_PRIVATE_KEYphantom_authorize_budgetHuman funder's key for the EIP-712 AgentWalletAuthorization.
PHANTOM_ROUTER_ADDRESSbothPhantomRouter verifying contract of the EIP-712 domain.
PHANTOM_FUNNEL_SOURCEfunnelinternal for dogfood/QA traffic (reported separately — wash volume prohibited); default external.

Without PHANTOM_PAYER_PRIVATE_KEY, phantom_register runs in manual mode: pass payer_wallet and it returns the registration challenge plus step-by-step signing instructions.

Funnel events (AGP-100 F1.4)

The server emits one JSON line per event on stderr, prefixed with [funnel]:

text
[funnel] {"event":"install","ts":"...","source":"external",...}

Events: install → register_start → register_complete → first_pay → repeat. Scrape these lines to build the onboarding funnel (install → register → first pay → repeat). Traffic tagged PHANTOM_FUNNEL_SOURCE=internal must be aggregated separately from external volume.

Connect Your Agent In 5 Minutes

Registration is self-serve and costs $2 USDC on Base mainnet. The CLI signs locally and never prints the private key.

sh
export PHANTOM_PAYER_PRIVATE_KEY="0x..."export PHANTOM_ROUTER_ADDRESS="0x..."npx @phantomid/mcp-server init --name my-agent

The init flow calls:

  1. POST /v1/register
  2. POST /v1/intents/:id/authorize
  3. POST /v1/intents/:id/submit
  4. GET /v1/register/:reference
  5. POST /v1/register/:reference/claim

On success it prints the account id and the API key once. Store the returned key as PHANTOM_API_KEY.

Flags are supported for non-sensitive options. The payer key is environment-only (never a flag — command lines leak into shell history and process listings):

sh
export PHANTOM_PAYER_PRIVATE_KEY="0x..."npx @phantomid/mcp-server init \  --api-url https://pay.idphantom.com \  --router-address 0x... \  --name my-agent

Tools

The server supports newline-delimited JSON-RPC over stdio.

quote_payment

json
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "quote_payment",    "arguments": {      "payer_wallet": "0x...",      "recipient_wallet": "0x...",      "asset_contract": "0x...",      "amount": "1000000",      "chain_id": 8453,      "idempotency_key": "quote-001",      "payer_agent_id": "buyer-agent",      "recipient_agent_id": "seller-agent"    }  }}

authorize_payment

json
{  "jsonrpc": "2.0",  "id": 2,  "method": "tools/call",  "params": {    "name": "authorize_payment",    "arguments": {      "payment_intent_id": "pi_...",      "payer_signature": "0x..."    }  }}

submit_payment

json
{  "jsonrpc": "2.0",  "id": 3,  "method": "tools/call",  "params": {    "name": "submit_payment",    "arguments": {      "payment_intent_id": "pi_..."    }  }}

verify_payment

json
{  "jsonrpc": "2.0",  "id": 4,  "method": "tools/call",  "params": {    "name": "verify_payment",    "arguments": {      "payment_intent_id": "pi_...",      "receipt_id": "rcpt_..."    }  }}

Limits

Default production policy limits are:

  • 50 USD maximum per payment
  • 500 USD maximum per day

Payments above those limits are rejected by the PHANTOM ID API.

Publish

sh
npm publish --access public

來源:README.md,提交 9bf67a0

工具

7

phantom_register

Register an IDPHANTOM account (self-serve)

One-line onboarding: creates an IDPHANTOM account for the configured payer wallet, pays the $2 USDC registration with a locally-signed EIP-712 authorization and returns the api_key. Requires PHANTOM_PAYER_PRIVATE_KEY and PHANTOM_ROUTER_ADDRESS in the environment. The api_key is shown exactly ONCE in this response — store it as PHANTOM_API_KEY immediately. Without a payer key configured, pass payer_wallet to get manual instructions instead.

輸入參數nametimeout_mspayer_walletpoll_interval_ms

phantom_authorize_budget

Authorize a spending budget for an account

Funder-signed EIP-712 AgentWalletAuthorization: lets an account spend up to max_units of USDC (6-decimal units, e.g. '1000000' = $1) with an optional daily cap, without giving away the wallet. Requires PHANTOM_FUNDER_PRIVATE_KEY in the environment; the signature is produced locally. Policy templates: 'micro' ($1/tx, $5/day, 30d) and 'subscriptions' ($2/tx, $5/day, 30d) — pilot caps kept deliberately low; explicit max_units/daily_cap_units/expires_in_days override any template. The account's own api_key is sent as authentication (first binding requires it).

輸入參數nonceapi_keymax_unitsaccount_id必填daily_cap_unitsexpires_in_dayspolicy_template

phantom_bind_identity

Bind a portable agent identity (AGP-123)

Registers an agent_id as a portable identity for this account via POST /v1/identity/bind. The proof-of-possession is an EIP-712 IdentityBinding signature produced LOCALLY with PHANTOM_IDENTITY_PRIVATE_KEY (environment variable only, never a command-line flag — AGP-057); the private key never leaves this process, only the signature is sent. Idempotent: replaying the same bind returns the existing binding. attestation_address comes from GET /.well-known/phantom-identity.json of the PHANTOM deployment (field attestation_address) — pass it here together with the chain_id so the local signature domain matches the server's. Key rotation is NOT exposed here (it needs the old AND new keys); call POST /v1/identity/rotate directly instead.

輸入參數epochagent_id必填chain_id必填issued_atattestation_address必填

quote_payment

Quote a payment

Create an IDPHANTOM payment quote with transparent platform fee (0.5%, min $0.01 USDC). Returns a payment intent ready for the payer's EIP-712 signature. Free: quoting never moves funds.

輸入參數amount必填chain_id必填metadatapayer_wallet必填asset_contract必填payer_agent_ididempotency_key必填recipient_wallet必填recipient_agent_id

authorize_payment

Authorize a payment

Attach the payer's EIP-712 PaymentAuthorization signature to a quoted payment intent. The signature is produced locally by the payer's wallet; it authorizes up to maximumTotalAuthorized, expiring at expiresAt. No funds move until submit_payment.

輸入參數payer_signature必填payment_intent_id必填

submit_payment

Submit a payment

Broadcast an authorized payment intent through IDPHANTOM. The platform relays the on-chain transaction; exactly one broadcast per intent is enforced server-side (retries return the already-submitted transaction hash). This is the step that settles funds.

輸入參數payment_intent_id必填

verify_payment

Verify a payment receipt

Verify an IDPHANTOM payment receipt: cryptographic checks (EIP-712 signature, payer recovery), expiry, and the on-chain state of the authorization (free/used/cancelled). Free for receipts of payments the caller participated in; paid via the receipt-verifier for third-party receipts.

輸入參數receipt_idpayment_intent_id必填

版本歷史

8
  1. v0.3.2最新Nov 11, 2026
  2. v0.3.0Oct 15, 2026
  3. v0.2.1Oct 13, 2026
  4. v0.2.0Oct 7, 2026
  5. v0.1.9Oct 2, 2026
  6. v0.1.8Oct 2, 2026
  7. v0.1.5Oct 1, 2026
  8. v0.1.3Sep 28, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Payments 整合