MCP

Connect AI agents to Transvia over the Model Context Protocol — six tools, one JSON-RPC endpoint.

Transvia is machine-native. Through MCP, an AI agent gets the same rail as the app: discover the platform, quote, send, track, claim, and refund — all policy-gated, all audited.

Setup

Claude Code, or any MCP client with HTTP transport:

claude mcp add --transport http transvia https://transvia.xyz/api/mcp

The server speaks JSON-RPC 2.0 over Streamable HTTP. A plain GET to https://transvia.xyz/api/mcp returns server info and the tool list.

Architecture

┌───────────────────┐   ┌──────────────┐   ┌───────────────┐   ┌───────────────┐
│ External AI Agent │──▶│     MCP      │──▶│ Transvia API  │──▶│ Transvia Core │
│ (Claude, agents)  │   │  /api/mcp    │   │               │   │   src/core    │
└───────────────────┘   └──────────────┘   └───────────────┘   └───────┬───────┘

                                                    TransviaEscrow · Arc Testnet

The MCP server is not a shim over the UI. It imports the same framework-free application core (src/core) as the Next.js app — one domain, two surfaces — so an agent's quote and your quote can never disagree. See Architecture.

The session flow

MCP is initializetools/listtools/call:

{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {} }
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": { "name": "corridor_quote", "arguments": { "corridor": "USD-INR", "amountUsdc": 500 } }
}

Tool results come back as text content carrying the JSON payload of the underlying service call.

Tools

ToolArgumentsWhat it does
rail_overviewCorridors, rail mode, live stats, x402 terms
corridor_quotecorridor, amountUsdcRate, destination amount, full fee split
corridor_sendcorridor, amountUsdc, recipientLabel, recipientAddr?Fresh quote → escrow deposit → intent id
corridor_statusintentId?One intent, or the 10 most recent
corridor_claimintentIdRelease a claimable payout (EIP-712 in live mode)
corridor_refundintentId, reasonCompliance escape hatch — refund to sender

corridor_quote and corridor_send currently enumerate USD-INR, USD-PHP, and USD-BRL in their tool schemas; the REST API accepts all eleven corridors — see API.

Notes

  • Sends made over MCP are logged with actor mcp-agent and follow the same settlement state machine as every other transfer.
  • corridor_refund mirrors the escrow's agentFallback(intentId, reason) — for compliance and timeout recovery, not for undoing settled transfers.
  • Machine pricing: quotes cost 0.01 USDC via x402 when the API is accessed over plain HTTP as an external agent. See x402.
  • A runnable MCP session example is in Examples.