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 集成