Skip to main content
This quickstart is for agents that need verifiable data without embedding oracle-specific logic in every prompt or tool call. By the end, your agent can discover Molpha capabilities, request a threshold-signed payload, and decide whether to verify it, publish it to Solana, or pass chain-ready verifier arguments to an application.

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.
Set a signer and Solana RPC in .env:
Leave GATEWAY_ENDPOINTS empty to use the SDK default. Override only when you need a specific gateway deployment. Run:
The doctor prints client-specific config snippets with absolute paths.

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.
Restart the client, then ask it to call 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 with payment: "auto":
Fund the agent before the first paid requestFor a newly configured agent with neither a subscription nor USDC, payment: "auto" first finds no active subscription and then cannot fund the x402 escrow, so this prompt fails. Payment setup is in step 5 below — provision a subscription or fund the signer/escrow before issuing it.
Derive a Molpha feedId for https://api.example.com/v1/finalized/price using $.price and 3 required signatures. Then fetch a signed result with payment: "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.
The 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:
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. MCP payment: "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.