Skip to main content
Glama

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:

https://pay.idphantom.com

Install

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.

Related MCP server: cardzero-mcp

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.

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):

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

{
  "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_..."
    }
  }
}

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

npm publish --access public

Available Tools

4 tools
authorize_paymentAuthorize a paymentA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
payer_signatureYesEIP-712 signature (0x, 65 bytes) of the PaymentAuthorization typed data, signed by payer_wallet.
payment_intent_idYesPayment intent ID returned by quote_payment.

Output Schema

ParametersJSON Schema
NameRequiredDescription
contentYes
isErrorNoTrue when the API call failed; text carries { error: { code, message } }.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this is a non-readonly, idempotent, non-destructive, open-world operation. The description adds valuable flow context, especially that no funds move until submit_payment, but doesn't explain signing requirements, how authorize relates to submit, or what happens on retries. With annotations already carrying safety signals, this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences that front-load the action and then clarify the flow. Every clause earns its place by adding either purpose or usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given two required parameters, a full schema, an output schema, and annotations, the description is nearly complete for safe invocation and correct sequencing. It could be improved with explicit failure/retry guidance or more detail about the authorization semantics, but nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters' formats and meanings are documented in the schema. The description adds the concept of maximumTotalAuthorized and expiresAt, which are not parameter names in the schema, so it doesn't fully clarify the provided inputs. Baseline 3 is correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: attach the payer's EIP-712 signature to a quoted payment intent. It clearly positions the tool between quote_payment and submit_payment, so an agent can place it in the payment flow without inspecting siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the prerequisite (a quoted payment intent from quote_payment) and the follow-up ('No funds move until submit_payment'), giving clear when-to-use context. It doesn't give explicit when-not or failure/retry decision rules, but the sequence guidance is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

quote_paymentQuote a paymentA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesToken amount in smallest units (6 decimals for USDC), e.g. '2500000' = $2.50.
chain_idYesEVM chain ID: 8453 = Base mainnet.
metadataNoOptional free-form key/value object attached to the quote (surfaced in receipts).
payer_walletYesEVM address of the payer wallet (0x..., checksummed).
asset_contractYesERC-20 token contract to pay with, e.g. USDC on Base: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.
payer_agent_idNoOptional A2A agent card ID of the payer, for discovery and audit.
idempotency_keyYesUnique client-generated key; safe retries return the same quote instead of duplicating it.
recipient_walletYesEVM address of the recipient wallet (0x...).
recipient_agent_idNoOptional A2A agent card ID of the recipient.

Output Schema

ParametersJSON Schema
NameRequiredDescription
contentYes
isErrorNoTrue when the API call failed; text carries { error: { code, message } }.

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover safety (readOnlyHint=false, destructiveHint=false, idempotentHint=true), and the description adds substantive context beyond them: the platform fee (0.5%, min $0.01 USDC), the fact that no funds move, and the returned artifact (payment intent for EIP-712 signature). Minor omissions like expiry/TTL of the quote.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with what it creates, followed by the return artifact and the safety/cost reassurance. Every sentence earns its place with no padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a 9-parameter schema at full description coverage, annotations covering safety, and an output schema for return values, the description supplies the essential missing pieces (fee, no-fund-movement, signature-readiness). Only quote validity/expiry and idempotency semantics are left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% across all 9 parameters, so the schema fully documents each field; baseline 3 applies. The description adds fee context but no additional per-parameter meaning beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Create an ... payment quote') and what it produces ('a payment intent ready for the payer's EIP-712 signature'). It does not explicitly distinguish itself from siblings authorize_payment/submit_payment/verify_payment, though the quote-vs-execute distinction is fairly self-evident.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Free: quoting never moves funds' implies this is the safe pre-step before signing/submitting, which lets an agent infer when to call it. However, there is no explicit when-not guidance or named alternative (e.g. use authorize_payment once the quote is signed).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

submit_paymentSubmit a paymentA
DestructiveIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
payment_intent_idYesAuthorized payment intent ID to broadcast and settle.

Output Schema

ParametersJSON Schema
NameRequiredDescription
contentYes
isErrorNoTrue when the API call failed; text carries { error: { code, message } }.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (destructive, idempotent, openWorld), the description discloses the concrete idempotency behavior: exactly one broadcast per intent and retries returning the already-submitted transaction hash. That is genuinely useful operational detail an agent could not derive from idempotentHint=true alone. It could still say more about failure/error behavior, but it adds real value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with no redundancy, and the core action plus settlement outcome are front-loaded. Every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and annotations covering the safety profile (readOnly=false, destructive, idempotent), the description only needs to frame the action and its consequence, which it does. Nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter, already 100% covered by the schema ('Authorized payment intent ID to broadcast and settle'). The description's phrasing mirrors the schema and adds no new semantics such as ID format or where the ID comes from, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (broadcast) and resource (authorized payment intent) plus the concrete outcome ('this is the step that settles funds'). It clearly occupies a distinct position in the quote → authorize → submit → verify chain rather than overlapping the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description scopes usage to an 'authorized payment intent,' which implicitly means it follows authorize_payment, and adds the settlement context. It does not, however, explicitly name when-not to use it or contrast it directly with verify_payment, so the routing is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

verify_paymentVerify a payment receiptA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
receipt_idNoOptional specific receipt ID when several receipts exist for the intent.
payment_intent_idYesPayment intent ID to verify.

Output Schema

ParametersJSON Schema
NameRequiredDescription
contentYes
isErrorNoTrue when the API call failed; text carries { error: { code, message } }.

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: the specific cryptographic/on-chain checks performed, the enumerated authorization states, and the free-vs-paid tiering for self vs third-party receipts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core operation and the enumerated checks, followed by the cost model. Dense but nothing is redundant; arguably the state list could have been trimmed, keeping it just shy of ideal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value explanation is unnecessary, and the rich annotations cover the safety profile. The description completes the picture with checks performed and cost implications; only explicit lifecycle positioning relative to quote/authorize/submit is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters (payment_intent_id, receipt_id) are already documented in the schema, and the schema correctly labels receipt_id as optional. The description adds no syntax, format, or selection guidance beyond what the schema provides, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a specific verb ('Verify') with a precise resource ('IDPHANTOM payment receipt') and then enumerates exactly what verification covers: EIP-712 signature checks, payer recovery, expiry, and on-chain authorization state (free/used/cancelled). That level of detail lets an agent distinguish it from the lifecycle siblings (quote/authorize/submit) even without an explicit comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives cost-based context ('Free for receipts of payments the caller participated in; paid via the receipt-verifier for third-party receipts'), which helps an agent anticipate charges but is not the same as saying when to call this tool. It never names the sibling tools as alternatives or states preconditions such as 'call after submit_payment'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.6
    • First observedauthorize_payment
    • First observedquote_payment
    • First observedsubmit_payment
    • First observedverify_payment

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool maps to a distinct phase of the payment lifecycle (quote, authorize, submit, verify) with no overlapping responsibilities. The descriptions clearly delineate when funds move and what each step requires.

Naming Consistency5/5

All four names follow a consistent snake_case verb_noun pattern. The verbs are precise and parallel (quote_, authorize_, submit_, verify_).

Tool Count5/5

Four tools form a minimal, well-scoped set for the payment flow; each tool is necessary and no tool feels redundant or missing at the count level.

Completeness4/5

The core quote→authorize→submit→verify lifecycle is covered, but there is no explicit cancel/refund tool despite verify tracking a cancelled state, and no payment history or listing operation. These are minor gaps an agent can likely work around for single payments.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables AI agents to discover and pay for monetized services such as PDF processing and DeFi operations using USDC on the Base blockchain. It provides automatic payment processing and secure local wallet management for seamless integration with MCP-compatible clients.
    14 npm
    -
  • A
    license
    A
    quality
    D
    maintenance
    Gives AI agents a smart-contract wallet on Base (USDC) with 10 stdio tools: create wallets, send USDC payments, pay x402-protected HTTP resources, and run ERC-8183 escrow Jobs for A2A service delivery.
    10
    12 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to send and receive USDC stablecoin payments on Base and Solana blockchains through MCP tools for wallet operations, balance checks, payment requests, and transfers.
    11 npm
    7
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server for USDC payments on Base, enabling AI agents to check balances, send payments, generate payment requests, and view transaction history.
    4
    1
    MIT