{
  "openapi": "3.1.0",
  "info": {
    "title": "Solana Forensics MCP",
    "version": "1.0.0",
    "description": "Deterministic Solana SPL & Token-2022 security forensics API + Remote MCP server. Audits mint/freeze authorities, dangerous Token-2022 extensions (PermanentDelegate, TransferHook, TransferFeeConfig, DefaultAccountState, MintCloseAuthority, Pausable, NonTransferable), top-20 holder concentration, and wallet Token-2022 exposure."
  },
  "servers": [
    {
      "url": "https://solana-forensics-mcp.nguyenthanhnam-pye.workers.dev"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health, KV bindings, USDC ATA state, and active x402 assets",
        "responses": {
          "200": {
            "description": "Healthy status JSON"
          }
        }
      }
    },
    "/v1/preview/mint/{mint}": {
      "get": {
        "operationId": "previewSolanaMint",
        "summary": "Free basic SPL & Token-2022 authority and extension check (20/day/IP)",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo"
          }
        ],
        "responses": {
          "200": {
            "description": "Preview mint security report"
          },
          "400": {
            "description": "Invalid base58 address"
          },
          "429": {
            "description": "Daily free preview rate limit exceeded"
          }
        }
      }
    },
    "/v1/audit/mint/{mint}": {
      "get": {
        "operationId": "auditSolanaMint",
        "summary": "Deep SPL & Token-2022 mint audit with top-20 holder concentration & 0-100 risk score ($0.02)",
        "x-payment-info": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "priceUsd": 0.02,
          "amountAtomic": "20000",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "assets": [
            "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
          ],
          "facilitator": "https://facilitator.payai.network",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "alternativeAuth": [
            "X-API-Key",
            "Authorization: Bearer",
            "X-Solana-Tx"
          ]
        },
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo"
          }
        ],
        "responses": {
          "200": {
            "description": "Deep mint forensics report with deterministic findings"
          },
          "402": {
            "description": "Payment Required (x402 v2 PAYMENT-REQUIRED header + direct Solana Pay alternatives)"
          }
        }
      }
    },
    "/v1/audit/wallet/{address}": {
      "get": {
        "operationId": "auditSolanaWallet",
        "summary": "Solana wallet SOL balance, SPL & Token-2022 holdings, frozen/dust exposure audit ($0.02)",
        "x-payment-info": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "priceUsd": 0.02,
          "amountAtomic": "20000",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "assets": [
            "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
          ],
          "facilitator": "https://facilitator.payai.network",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "alternativeAuth": [
            "X-API-Key",
            "Authorization: Bearer",
            "X-Solana-Tx"
          ]
        },
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt"
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet counterparty and token exposure report"
          },
          "402": {
            "description": "Payment Required (x402 v2 PAYMENT-REQUIRED header + direct Solana Pay alternatives)"
          }
        }
      }
    },
    "/v1/audit/batch": {
      "post": {
        "operationId": "batchAuditSolanaMints",
        "summary": "Batch deep Solana mint audit for up to 10 mints in one call ($0.05)",
        "x-payment-info": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "priceUsd": 0.05,
          "amountAtomic": "50000",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "assets": [
            "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
          ],
          "facilitator": "https://facilitator.payai.network",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "alternativeAuth": [
            "X-API-Key",
            "Authorization: Bearer",
            "X-Solana-Tx"
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mints"
                ],
                "properties": {
                  "mints": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch mint forensics results"
          },
          "402": {
            "description": "Payment Required (x402 v2 PAYMENT-REQUIRED header)"
          }
        }
      }
    },
    "/v1/keys/redeem": {
      "post": {
        "operationId": "redeemSolanaApiKey",
        "summary": "Permissionless redemption of a confirmed Solana SOL/USDT/USDC payment tx into an API key",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "txSignature"
                ],
                "properties": {
                  "txSignature": {
                    "type": "string"
                  },
                  "pack": {
                    "type": "string",
                    "enum": [
                      "starter",
                      "builder",
                      "pro_30d"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API key issued"
          },
          "400": {
            "description": "Invalid signature or pack"
          },
          "402": {
            "description": "Unconfirmed or insufficient on-chain transfer"
          },
          "409": {
            "description": "Transaction signature already redeemed"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpJsonRpc",
        "summary": "Streamable HTTP JSON-RPC 2.0 Remote MCP Server endpoint",
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 MCP response"
          }
        }
      }
    }
  }
}