> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simpuru.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP over streamable HTTP (JSON-RPC)

> Stateless MCP endpoint. Add it to an agent: `claude mcp add --transport http simpuru https://api.simpuru.xyz/mcp`.

| Tool | Cost | Input |
|---|---|---|
| `search_listings` | free | `{ query?, category?, mode?, maxPriceAda?, minReputation?, sort? }` (sort: popular, newest, price_asc, price_desc, reputation) |
| `get_listing` | free | `{ id }` |
| `buy_listing` | listing price | `{ id, mode: "instant" \| "protected" }` |
| `my_purchases` | free | `{}` |
| `get_purchase_status` | free | `{ tx }` |
| `my_wallet` | free | `{}`: agent wallet address to fund, balance, limits |
| `withdraw_to_owner` | fee only | `{}`: send what's left back to the owner |

Sign-in first (OAuth, see MCP sign-in): the agent then spends from the owner's own agent wallet within their limits, or from the shared demo wallet (≤ 10 tADA each, ≤ 30 tADA a day).
Run `apps/mcp` locally (stdio) to pay from your own wallet.



## OpenAPI

````yaml https://api.simpuru.xyz/openapi.json post /mcp
openapi: 3.1.0
info:
  title: Simpuru API
  version: 0.1.0
  summary: Buyer protection for AI agents paying with x402 on Cardano (preprod).
  description: >-
    Sellers list design prompts; each listing commits to the SHA-256 of its
    content.

    Buyers (people or agents) pay over **x402** on Cardano preprod, either
    **instant** (pay the seller)

    or **protected** (lock into our `vested_pay` escrow, released only if
    delivery checks out).


    Consumers: the web app (`apps/web`), the buyer agent and protection watcher
    (`apps/agent`), the MCP

    server (`apps/mcp`, hosted at `/mcp`), and the arbiter service
    (`apps/arbiter`, internal).


    Every on-chain claim can be checked on
    `https://preprod.cardanoscan.io/transaction/<hash>`.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://api.simpuru.xyz
    description: Production (Cardano preprod)
  - url: http://localhost:4021
    description: Local `bun run dev` in apps/api
security: []
tags:
  - name: Account
    description: >-
      Sign in with a Cardano wallet (CIP-30 `signData`), then use the session as
      `Authorization: Bearer <token>`. Every account has a Simpuru wallet: a
      preprod wallet the platform holds for the owner, funded with tADA, that
      web purchases and the owner's agents spend from.
  - name: Catalogue
    description: Free listing data.
  - name: Paid content
    description: 'The x402 paywall: instant or escrow-protected.'
  - name: Purchases
    description: Purchase timelines, derived from chain by the seller agent.
  - name: MCP
    description: Model Context Protocol endpoint for agents (Claude Code, Cursor, ...).
  - name: Arbiter (internal)
    description: Dispute settlement service, `apps/arbiter`, port 4023. Not public.
  - name: System
    description: Health.
paths:
  /mcp:
    post:
      tags:
        - MCP
      summary: MCP over streamable HTTP (JSON-RPC)
      description: >-
        Stateless MCP endpoint. Add it to an agent: `claude mcp add --transport
        http simpuru https://api.simpuru.xyz/mcp`.


        | Tool | Cost | Input |

        |---|---|---|

        | `search_listings` | free | `{ query?, category?, mode?, maxPriceAda?,
        minReputation?, sort? }` (sort: popular, newest, price_asc, price_desc,
        reputation) |

        | `get_listing` | free | `{ id }` |

        | `buy_listing` | listing price | `{ id, mode: "instant" \| "protected"
        }` |

        | `my_purchases` | free | `{}` |

        | `get_purchase_status` | free | `{ tx }` |

        | `my_wallet` | free | `{}`: agent wallet address to fund, balance,
        limits |

        | `withdraw_to_owner` | fee only | `{}`: send what's left back to the
        owner |


        Sign-in first (OAuth, see MCP sign-in): the agent then spends from the
        owner's own agent wallet within their limits, or from the shared demo
        wallet (≤ 10 tADA each, ≤ 30 tADA a day).

        Run `apps/mcp` locally (stdio) to pay from your own wallet.
      operationId: mcp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                A JSON-RPC 2.0 MCP message, e.g. `initialize`, `tools/list`,
                `tools/call`.
              properties:
                jsonrpc:
                  const: '2.0'
                id: {}
                method:
                  type: string
                params:
                  type: object
              required:
                - jsonrpc
                - method
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
      security:
        - mcpOAuth: []
components:
  securitySchemes:
    mcpOAuth:
      type: oauth2
      description: OAuth 2.1 with PKCE; MCP clients handle it.
      flows:
        authorizationCode:
          authorizationUrl: https://api.simpuru.xyz/oauth/authorize
          tokenUrl: https://api.simpuru.xyz/oauth/token
          scopes:
            mcp: Shop on Simpuru with the owner's agent wallet

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.