PHANTOM ID MCP payment server: agent-to-agent USDC payments on Base.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y @phantomid/mcp-server
MCP client config
{
"mcpServers": {
"phantom": {
"command": "npx",
"args": [
"-y",
"@phantomid/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:
https://pay.idphantom.com
npx @phantomid/mcp-server
For MCP clients, configure the server command and environment:
{
"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.
Registration is self-serve and costs $2 USDC on Base mainnet. The CLI signs locally and never prints the private key.
export PHANTOM_PAYER_PRIVATE_KEY="0x..."
export PHANTOM_ROUTER_ADDRESS="0x..."
npx @phantomid/mcp-server init --name my-agent
The init flow calls:
POST /v1/registerPOST /v1/intents/:id/authorizePOST /v1/intents/:id/submitGET /v1/register/:referencePOST /v1/register/:reference/claimOn 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):
export PHANTOM_PAYER_PRIVATE_KEY="0x..."
npx @phantomid/mcp-server init \
--api-url https://pay.idphantom.com \
--router-address 0x... \
--name my-agent
The server supports newline-delimited JSON-RPC over stdio.
quote_payment{
"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{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "authorize_payment",
"arguments": {
"payment_intent_id": "pi_...",
"payer_signature": "0x..."
}
}
}
submit_payment{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "submit_payment",
"arguments": {
"payment_intent_id": "pi_..."
}
}
}
verify_payment{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "verify_payment",
"arguments": {
"payment_intent_id": "pi_...",
"receipt_id": "rcpt_..."
}
}
}
Default production policy limits are:
Payments above those limits are rejected by the PHANTOM ID API.
npm publish --access public
By default the client only sends credentials to trusted IDPHANTOM origins
(*.idphantom.com, localhost, 127.0.0.1). If you run a custom or
self-hosted endpoint, allow it explicitly:
export PHANTOM_ALLOW_CUSTOM_API_URL=1
or pass --allow-custom-api-url. Without the override, an untrusted
PHANTOM_API_URL is refused before any credential is transmitted.
MIT — see LICENSE. The MIT License applies solely to the source
code contained in this repository and distributed as the
@phantomid/mcp-server connector. The IDPHANTOM hosted service, APIs, backend
infrastructure, payment engine, internal algorithms, transaction
orchestration, risk systems, databases and other server-side components are
separate proprietary systems and are not licensed under this repository's
MIT License. See NOTICE.