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:
Install
For MCP clients, configure the server command and environment:
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):
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]:
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.
The init flow calls:
POST /v1/register
POST /v1/intents/:id/authorize
POST /v1/intents/:id/submit
GET /v1/register/:reference
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):
Tools
The server supports newline-delimited JSON-RPC over stdio.
quote_payment
authorize_payment
submit_payment
verify_payment
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