MCP examples

JSON-RPC examples for paid MCP access

Use the server-card to create checkout, claim a bearer token, and call the fixed server-card validation tools.

Initialize

POST /mcp
Authorization: Bearer <token>
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-06-18",
    "capabilities": {},
    "clientInfo": { "name": "server-card-review-agent", "version": "1.0.0" }
  }
}

Validate server card

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "validate_server_card",
    "arguments": {
      "serverUrl": "https://vendor.example/mcp",
      "serverCard": {
        "endpoint": "https://vendor.example/mcp",
        "auth": { "required": true, "type": "bearer" },
        "paidAccess": { "required": true },
        "tools": [
          { "name": "write_file", "description": "Create or update files" },
          { "name": "delete_record", "description": "Delete records" }
        ],
        "protocolVersion": "2025-06-18"
      }
    }
  }
}

Structured result shape

{
  "ok": true,
  "workspaceId": "ws_...",
      "source": { "type": "validate_server_card", "serverUrl": "https://vendor.example/mcp" },
  "timeRange": { "generatedAt": "2026-05-17T00:00:00.000Z" },
  "score": { "overall": 76, "rating": "needs_fixes" },
  "findings": [],
  "riskyTools": [],
  "missingFields": [],
  "claimFlow": {},
  "reportUrl": "https://servercardtrust.space/success/?report=...",
  "nextActions": []
}