Skip to main content
Glama
Caravan MCP

Caravan MCP

by OJ-IRO

Caravan MCP

Give Claude, Cursor, or any MCP client a wallet and the whole Algorand x402 Bazaar — safely.

Caravan is the safety layer of the Algorand x402 Bazaar: every paid endpoint gets a trust score from 2-hourly patrols, every merchant gets verified by purchase, and every payment your AI makes runs through a spend policy it cannot talk its way around.

This repo is the MCP connector. The trust patrols, verification robots, and paid gateway live at https://caravan-sable-nine.vercel.app (live economy, receipts on-chain).

What your AI gets

Tool

What it does

discover_services

Curated, junk-filtered catalog of live paid x402 services (with trust tiers)

get_service

Inspect one service: price, input/output schema, settle count

check_trust

Trust Index report for any endpoint — uptime history, latency, conformance, tier

call_paid_service

Pay a service in USDC and return the result + on-chain receipt. Optionally via Caravan's relay (failed calls are never charged)

get_policy / set_policy

The Quartermaster spend policy: per-call cap, daily budget, call count, minimum trust tier, allow/deny lists, human-approval threshold

get_ledger

Append-only audit ledger of every payment, block, and approval

wallet_status / create_wallet

Balance / opt-in status; generate a local wallet

Default policy: max $0.25 per call · $1.00 per day · 200 calls per day · anything above $0.10 needs human approval · endpoints tiered Unreachable are refused. The model cannot forge approvals (HMAC tokens bound to host + price, 10-minute window).

Related MCP server: @hpp-io/x402-mcp-bridge

Install (2 minutes)

git clone https://github.com/OJ-IRO/caravan-mcp
cd caravan-mcp && npm install && npm run build
npm run gen-wallet        # prints an Algorand address + writes the mnemonic to .env

Fund the wallet with a little ALGO (network fees) and USDC on Algorand. Sub-cent calls mean $5 lasts a long time. To try it with free faucet money first, use CARAVAN_NETWORK=testnet and the faucets at https://lora.algokit.io/testnet/fund (ALGO) and https://faucet.circle.com (USDC → "Algorand Testnet").

Add to your MCP client config (Claude Desktop: claude_desktop_config.json; Cursor: MCP settings):

{
  "mcpServers": {
    "caravan": {
      "command": "node",
      "args": ["/absolute/path/to/caravan-mcp/dist/mcp/server.js"],
      "env": {
        "CARAVAN_MNEMONIC": "<25-word mnemonic from .env>",
        "CARAVAN_NETWORK": "mainnet"
      }
    }
  }
}

Restart the client. Ask your AI: "Find me a paid weather API on Algorand and check its trust score before you buy."

Environment

Variable

Default

Purpose

CARAVAN_MNEMONIC

—

25-word Algorand mnemonic of the paying wallet (required for paid calls)

CARAVAN_NETWORK

mainnet

mainnet or testnet

CARAVAN_GATEWAY

https://caravan-sable-nine.vercel.app

Gateway used for the Trust Index and the relay

CARAVAN_HOME

~/.caravan

Where the policy and ledger are stored

How payments work

x402 v2 over the GoPlausible facilitator: the service answers 402 with its price, the connector checks the Quartermaster policy against the real quoted price, signs an exact-amount USDC transfer, and retries with the payment header. Settlement is on Algorand; the receipt (txid) is returned to the model and written to the ledger.

Safety model

  • Policy is evaluated on the quoted price, not the model's claim.

  • Approval tokens are HMAC-signed by the server for a specific host + price; the model cannot mint them.

  • The ledger is append-only and lives outside the model's reach.

  • Trust tiers come from independent patrols, not merchant self-description.

License

MIT

Available Tools

9 tools
call_paid_serviceCall a paid x402 service (spends USDC)B

Call an x402 endpoint and automatically pay its USDC price from the configured wallet. Refuses to pay above maxPriceUsdc (default 0.25). Returns the response plus payment receipt (txid).

Inputs: url (required), via, body, query, +4 more.

check_trustCheck an endpoint's Trust Index scoreA

Free lookup of Caravan's Trust Index — 0-100 reliability score built from hourly patrols of every Bazaar endpoint (uptime history, latency, x402 conformance, adoption). Use before paying an unfamiliar service. Omit url to get the index summary.

Inputs: url.

create_walletCreate a local walletA

Generate a fresh Algorand account. The mnemonic is returned ONCE for the user to store in the CARAVAN_MNEMONIC env var — it is not persisted anywhere.

Inputs: no named parameters.

discover_servicesDiscover paid x402 servicesA

Search the Algorand x402 Bazaar for paid API services. Returns url, method, price in USDC, description, and proven usage counts. Use this first to find a service, then get_service for details, then call_paid_service to use it.

Inputs: limit, query, network, provenOnly, +1 more.

get_ledgerRead the audit ledgerA

The Quartermaster's append-only record of every payment, blocked attempt, and approval request from this wallet — with amounts, merchants, on-chain txids, and reasons.

Inputs: limit.

get_policyShow the Quartermaster spend policyB

The active spend policy governing every paid call from this wallet: per-call cap, daily budget, approval threshold, Trust-tier floor, allow/deny lists — plus today's spend so far and recent ledger activity.

Inputs: no named parameters.

get_serviceInspect one x402 serviceA

Get full details for a service found via discover_services: exact price, expected input (query params or JSON body) and example output.

Inputs: url (required), network.

set_policyUpdate the Quartermaster spend policyA

Update spend-policy fields (only the fields you pass change). Use when the human asks to change budgets, caps, approval thresholds, tier floors, or allow/deny lists. Never loosen the policy without the human explicitly asking.

Inputs: minTier, denyHosts, allowHosts, maxCallsPerDay, +4 more.

wallet_statusWallet statusB

Show the configured wallet's address, ALGO and USDC balances, and whether it is opted in to USDC.

Inputs: network.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools are clearly distinct, with a clean pipeline from discover_services to get_service to call_paid_service. Slight overlap exists between get_ledger and get_policy (both surface recent spend/ledger activity), and wallet_status vs get_policy both report wallet-adjacent state, but descriptions mostly disambiguate them.

    Naming Consistency4/5

    Eight of nine tools follow a verb_noun pattern (get_ledger, create_wallet, discover_services, call_paid_service, check_trust, get_policy, set_policy). The single outlier, wallet_status, is noun-first rather than a get_/show_ verb, a minor inconsistency.

    Tool Count5/5

    Nine tools is well-scoped for this domain, covering wallet lifecycle, service discovery, payment, trust checking, policy, and ledger. Each tool earns its place and there is no bloat.

    Completeness4/5

    The surface covers the core workflows: create/check wallet, discover/detail/pay services, check trust, view/update policy, and read ledger. The main gap is the absence of an explicit approve/deny tool despite the policy supporting an approval threshold, plus no withdrawal/funding operation; these are workaroundable but notable.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers