openapi: 3.1.0
info:
  title: Agent Card Validator MCP
  version: 0.1.0
  description: |
    x402 MCP that audits + lints any service's discovery surfaces (agent-card.json,
    ai-plugin.json, openapi.yaml, mcp.json, agent-discovery). Returns a 0-100
    quality score plus an improvement TODO list and a strict JSON-schema lint
    report. Helps agents and developers grade x402 services on completeness/quality
    before integration. Pay USDC on Base via x402 — no signup, no API key.
servers:
  - url: https://agent-card-validator-mcp.mtree.workers.dev
x-pricing:
  - path: /v1/wellknowns/audit
    method: POST
    price: $0.05
    amount: "0.05"
    asset: USDC
    network: base
  - path: /v1/wellknowns/lint
    method: POST
    price: $0.03
    amount: "0.03"
    asset: USDC
    network: base
paths:
  /v1/wellknowns/audit:
    post:
      summary: Audit any x402/A2A service's 5 discovery surfaces
      description: |
        Fetch the 5 well-knowns (agent-card.json, ai-plugin.json, openapi.yaml,
        mcp.json, agent-discovery) of a target x402/A2A service in parallel,
        score each on completeness, return per-surface presence + sub-scores +
        an improvement TODO list. $0.05 per call via x402 USDC on Base.
      operationId: wellknownsAudit
      x-x402-price-usd: 0.05
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                base_url: { type: string, example: "https://procure-mcp.mtree.workers.dev" }
              required: [base_url]
      responses:
        '402': { description: Payment required (x402 envelope) }
        '200': { description: Audit result }
  /v1/wellknowns/lint:
    post:
      summary: Strict JSON-schema lint of agent-card.json
      description: |
        Strict JSON-schema validation of agent-card.json against the Google A2A
        AgentCard spec subset. Returns valid:bool + structured errors at
        fatal/error/warn severities with JSONPath-style locations. $0.03 per
        call via x402 USDC on Base.
      operationId: wellknownsLint
      x-x402-price-usd: 0.03
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                base_url: { type: string, example: "https://procure-mcp.mtree.workers.dev" }
              required: [base_url]
      responses:
        '402': { description: Payment required (x402 envelope) }
        '200': { description: Lint result }
  /healthz:
    get:
      summary: Liveness probe (unpaid)
      operationId: healthz
      responses:
        '200': { description: Service is live }
  /mcp:
    post:
      summary: MCP Streamable HTTP transport (JSON-RPC 2.0; unpaid catalog discovery)
      operationId: mcpRpc
      responses:
        '200': { description: JSON-RPC response }
