Skip to content
Loxley

for builders

Your agent licenses the script. And calls it. On its own.

LOXLEY is an MCP server. Point your agent at it and the marketplace becomes three tools it already knows how to use: search the shelf, buy a licence, call the script. No API key, no dashboard, no human in the loop — the wallet is the account, and the licence is the permission.

step 0 · install

Add the server

One entry in your MCP client's config. The server runs locally, holds no keys of its own, and signs with the wallet you point it at — the same wallet that will hold the licences it buys.

mcp.json

live · simulated

Claude Code, Claude Desktop, Cursor and any other MCP client take the same block.

{
  "mcpServers": {
    "loxley": {
      "command": "npx",
      "args": ["-y", "@loxleymarkets/mcp"],
      "env": {
        "LOXLEY_CHAIN": "robinhood-4663",
        "LOXLEY_WALLET": "${LOXLEY_WALLET_PRIVATE_KEY}"
      }
    }
  }
}

The package is published: this block resolves today, and the server reads the same shelf this site shows. Licences are recorded in a local ledger until chain 4663 is live. Set LOXLEY_MAX_SPEND_USD in the env block to cap what an agent may spend.

See what is live →

the loop

Discover, license, call

Three tools, in the order an agent uses them. Each one is a normal MCP tool call; nothing here needs a browser, a form, or you.

  1. 1

    Discover

    The agent searches the shelf the way a buyer would — by what the script does, what it scores, and what it costs. Every field it filters on is computed from the onchain record, so there is nothing here for a publisher to inflate.

    loxley_search

    live · simulated data
    // the agent asks the shelf a question
    {
      "tool": "loxley_search",
      "arguments": {
        "class": "POLICY",
        "min_score": 1.4,
        "max_price_usd": 100,
        "limit": 3
      }
    }
    
    // → what comes back
    {
      "results": [
        {
          "id": "lox:0xd0e5",
          "name": "DrawdownSentry",
          "summary": "Blocks the orders that would deepen a drawdown past your limit.",
          "score": 1.76,
          "dsr": 0.99,
          "price_usd": 79,
          "owners": 3100,
          "licensed": false
        }
      ]
    }
  2. 2

    License

    One call, one price, once. The agent sets its own ceiling; the server refuses anything above it. The licence is an ERC-1155 that lands in the wallet and stays there — there is no renewal to miss and no subscription to cancel.

    loxley_license

    live · simulated
    // one price, once, with a ceiling the agent sets itself
    {
      "tool": "loxley_license",
      "arguments": {
        "artifact": "lox:0xd0e5",
        "max_price_usd": 100
      }
    }
    
    // → the licence is in the wallet, and stays there
    {
      "licence": "erc1155:0x8f21…/17",
      "paid_usd": 79,
      "tx": "0x4c1a…",
      "renews": false,
      "callable": true
    }
  3. 3

    Call

    From here the script is a tool like any other in the agent's belt. The licence is checked onchain, the run is attested, and the attestation comes back with the answer so the agent can prove what it called and what it got.

    loxley_call

    live · simulated
    // the script is now just another tool in the belt
    {
      "tool": "loxley_call",
      "arguments": {
        "artifact": "lox:0xd0e5",
        "input": { "order": { "…": "…" }, "portfolio": { "…": "…" } }
      }
    }
    
    // → verdict, reason, attestation, and a bill of zero
    {
      "verdict": "resize",
      "output": { "qty": 150, "reason": "drawdown 6.4% against an 8.0% limit" },
      "attestation": { "run_hash": "0x9f31…", "epoch": 47 },
      "billing": { "model": "one_time_licence", "charged_usd": 0 }
    }

the wire

What a call looks like, and what comes back

One example, end to end: an agent about to send an order asks DrawdownSentry whether it may. The response carries the verdict, the reason in words the agent can log, the attestation that proves the declared code ran — and a billing block that reads zero, because the licence was already paid for once.

request · loxley_call

live · simulated
{
  "tool": "loxley_call",
  "arguments": {
    "artifact": "lox:0xd0e5",
    "input": {
      "order": {
        "symbol": "AAPL",
        "side": "buy",
        "qty": 400,
        "limit_usd": 228.10
      },
      "portfolio": {
        "nav_usd": 250000,
        "drawdown_pct": 6.4,
        "drawdown_limit_pct": 8.0
      }
    }
  }
}

response

live · simulated
{
  "verdict": "resize",
  "output": {
    "qty": 150,
    "reason": "drawdown 6.4% against an 8.0% limit; size cut to keep the floor intact"
  },
  "attestation": {
    "code_hash": "keccak256(wasm_module)",
    "run_hash": "0x9f31…",
    "runtime": "wasm-1.2",
    "epoch": 47,
    "latency_ms": 12
  },
  "billing": {
    "model": "one_time_licence",
    "charged_usd": 0
  }
}

Two fields are worth stopping on. `attestation.run_hash` is what makes a challenge possible: anyone can replay the module against the same input and slash the publisher's bond if the hash differs. `billing.charged_usd` is zero on every call after the first purchase — that is the whole point of a one-time licence, stated where an agent can assert on it.

what you need

Before it can buy anything

A wallet on chain 4663
Robinhood Chain, an Arbitrum L2. The server signs with it; you fund it. Nothing else on this site touches it.
USDC for the licences
Prices are quoted in dollars and settled in USDC. A script costs its tag price once — budget for the shelf, not for a meter.
An MCP client
Claude Code, Claude Desktop, Cursor, or your own agent loop over the MCP SDK. The server is a stdio process; it needs no inbound network.
A spend ceiling
Set max_price_usd on every licence call and the server will refuse anything dearer, so an agent left running cannot spend the wallet on a shelf full of scripts.

Not all of this is onchain yet.

The server is published and the whole loop runs today. Search reads the catalogue this site shows; licences are recorded locally, not minted; six scripts run real logic and the rest return labelled stand-ins. The status page is the honest list of which is which.

interface contract · simulated: licences are local and no funds move