Pick an access model
x402 and AgentEscrow are one path. For the full comparison, see Access Models.
1. Install the MCP server
Requires Node.js 24 or later..env:
GATEWAY_ENDPOINTS empty to use the SDK default. Override only when you need a specific gateway deployment.
Run:
2. Connect your agent client
Use the compiled stdio server in Cursor, Claude Desktop, Codex, or another MCP-compatible client. For Claude Desktop you can also pack an MCPB — see MCP server.molpha_get_capabilities. If the client still lists job tools such as molpha_create_job, reload the MCP server.
3. Make a read-only discovery request
Use a prompt like:Use Molpha to inspect the current protocol capabilities. Summarize the registry version, node count, supported chains, gateway endpoints, and verifier addresses. Do not make any writes.This confirms the agent can reach the server, gateway, and Solana RPC without spending USDC.
4. Request verified data
Derive or reuse a feed, then fetch withpayment: "auto":
Derive a Molpha feedId forThe trust anchor is the returned signed payload, not the prose summary. Your application should verify the payload before acting on the value. Before authorizing x402 spend:https://api.example.com/v1/finalized/priceusing$.priceand 3 required signatures. Then fetch a signed result withpayment: "auto"and a maximum age of 60 seconds for EVM. Summarize the signed value, payment mode used, and EVM verifier call arguments. Do not submit a transaction.
Call molpha_agent_status for 3 required signatures. Tell me the escrow’s USDC balance, committed amount, and quoted next price.
5. Add payment only when needed
If the agent creates or maintains feeds under a plan, use Subscriptions and optionally add a Delegate for the hot agent key. MCPpayment: "subscription" or "auto" uses that plan.
If the agent only needs one-off paid data, use x402 escrow via payment: "x402" or "auto". The MCP server can fund the escrow from the signer’s USDC balance up to MOLPHA_X402_MAX_PRICE_USDC / MOLPHA_X402_MAX_SPEND_PER_DAY_USDC.
Next steps
MCP server reference
Tool list, payment modes, guardrails, signer options, and troubleshooting.
Agent access models
Choose Delegate or x402 escrow.