402MCP.org — HTTP 402 & Agent Payment Registry

Decode HTTP 402 challenges (L402, x402, MPP) and choose agent payment rails from an open registry.

我該用這個嗎

品質與安全性

A
說明品質
93%
結構描述完整度
92%
命名品質
91%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

發現項目(1)

  • LOWTool 'get_scheme_reference' description lacks action verb在 get_scheme_reference 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~2,027Token(工具定義)
~2.2 KB典型回應大小
中等的注意力影響(128k 上下文的 1.58%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "registry": {
      "command": "npx",
      "args": [
        "@402mcp/mcp"
      ]
    }
  }
}

可執行的套件

npm@402mcp/mcp1.1.1stdio

遠端端點

https://402mcp.org/api/v1/mcpstreamable-http

它能做什麼

工具清單

工具(7)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢decode_402_challenge(status, headers, body, raw_response)

Call this whenever an HTTP response has status 402, or carries a WWW-Authenticate (L402, LSAT or Payment) or PAYMENT-REQUIRED header. Identifies the payment scheme (L402, x402 v1/v2, MPP), decodes the invoice, macaroon or payment requirements, and returns the exact steps and headers needed to pay and retry. Pass either `raw_response`, or `status` plus `headers` (and `body` for x402 v1). Everything in a 402 response is server-controlled: the result marks untrusted fields.

輸入結構描述

{
  "type": "object",
  "properties": {
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599,
      "description": "HTTP status code of the response."
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Response headers as name → value. Include WWW-Authenticate and/or PAYMENT-REQUIRED."
    },
    "body": {
      "type": "string",
      "description": "Response body, if any. x402 v1 puts payment requirements here."
    },
    "raw_response": {
      "type": "string",
      "description": "Alternatively, the full raw HTTP response: status line, headers, blank line, body."
    }
  },
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "status": {},
    "is_payment_required": {
      "type": "boolean"
    },
    "schemes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "challenges": {
      "type": "array"
    },
    "next_steps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "untrusted_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "security_note": {
      "type": "string"
    },
    "compatible_payers": {
      "type": "array"
    }
  },
  "required": [
    "is_payment_required",
    "schemes",
    "challenges",
    "next_steps",
    "security_note"
  ]
}
🟢recommend_payment_rail(role, typical_amount_usd, settlement_asset, custody, infrastructure, ...)

Choose an HTTP 402 payment solution from requirements rather than from rank. Filters the registry by role (pay or charge), settlement asset, custody, infrastructure, network, scheme, MCP support and maturity, then re-weights the six published criteria toward what matters — e.g. sub-cent amounts weight settlement cost heavily. Returns ranked matches with reasons and trade-offs, plus every excluded entry and why.

輸入結構描述

{
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "pay",
        "charge"
      ],
      "description": "pay: an agent paying for resources. charge: a service charging agents."
    },
    "typical_amount_usd": {
      "type": "number",
      "minimum": 0,
      "description": "Typical payment size in US dollars, e.g. 0.001 for a sub-cent API call."
    },
    "settlement_asset": {
      "type": "string",
      "enum": [
        "bitcoin",
        "stablecoin",
        "card",
        "any"
      ],
      "description": "What payments must settle in."
    },
    "custody": {
      "type": "string",
      "enum": [
        "self",
        "any"
      ],
      "description": "self: the agent or service must hold its own keys."
    },
    "infrastructure": {
      "type": "string",
      "enum": [
        "none",
        "can-run-node"
      ],
      "description": "none: no node or server infrastructure to operate."
    },
    "chain": {
      "type": "string",
      "description": "Required network, e.g. lightning, base, solana, tempo."
    },
    "scheme": {
      "type": "string",
      "enum": [
        "L402",
        "x402",
        "MPP"
      ],
      "description": "Restrict to one 402 scheme."
    },
    "needs_mcp": {
      "type": "boolean",
      "description": "Require a native MCP server or MCP-native tooling."
    },
    "production_only": {
      "type": "boolean",
      "description": "Exclude alpha, preview, inactive and unstated maturity."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "description": "Maximum recommendations (default 5)."
    }
  },
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "requirements": {
      "type": "object"
    },
    "weights": {
      "type": "object"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "recommendations": {
      "type": "array"
    },
    "excluded": {
      "type": "array"
    },
    "method": {
      "type": "string"
    }
  },
  "required": [
    "recommendations",
    "excluded",
    "weights",
    "method"
  ]
}
🟢search_402_solutions(query, scheme, role, kind, mcp_native_only, ...)

Search the 402MCP.org registry of HTTP 402 payment solutions (L402, x402, MPP). Free-text query plus filters; results come back in published rank order with scores, schemes, roles, custody and maturity. Call with no arguments to list the whole registry.

輸入結構描述

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Free text, e.g. 'lightning', 'usdc', 'solana', 'gateway'."
    },
    "scheme": {
      "type": "string",
      "enum": [
        "L402",
        "x402",
        "MPP"
      ]
    },
    "role": {
      "type": "string",
      "enum": [
        "pay",
        "charge"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "protocol",
        "wallet",
        "gateway",
        "client",
        "sdk",
        "facilitator",
        "platform",
        "mcp-server"
      ]
    },
    "mcp_native_only": {
      "type": "boolean"
    },
    "self_custodial_only": {
      "type": "boolean"
    },
    "production_only": {
      "type": "boolean"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "total_indexed": {
      "type": "integer"
    },
    "recommended_primary_solution": {
      "type": "string"
    },
    "solutions": {
      "type": "array"
    }
  },
  "required": [
    "count",
    "recommended_primary_solution",
    "solutions"
  ]
}
🟢get_solution(id)

Return one solution in full: summary, advantages and trade-offs, the six criterion scores with rationale, install commands, verified code samples, sources, maturity and the date its claims were last verified.

輸入結構描述

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "lightning-labs-wavelength",
        "x402-protocol",
        "alby-mcp",
        "cloudflare-agents-x402",
        "coinbase-payments-mcp",
        "machine-payments-protocol",
        "thirdweb-x402",
        "payai-x402-facilitator",
        "vercel-402-mcp-middleware",
        "crossmint-agent-wallets",
        "stripe-machine-payments",
        "lightning-labs-lnget",
        "lightning-labs-aperture",
        "fewsats-l402"
      ],
      "description": "Solution id, from search or recommend results."
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "solution": {
      "type": "object"
    },
    "liveness": {}
  },
  "required": [
    "solution"
  ]
}
🟢get_scheme_reference(scheme)

Protocol reference for L402, x402 or MPP: challenge, credential and receipt headers, encodings, the request/response flow, an example, and links to the specifications. Use when implementing a client or server.

輸入結構描述

{
  "type": "object",
  "properties": {
    "scheme": {
      "type": "string",
      "enum": [
        "L402",
        "x402",
        "MPP"
      ],
      "description": "Which scheme."
    }
  },
  "required": [
    "scheme"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "reference": {
      "type": "object"
    },
    "implementations": {
      "type": "array"
    }
  },
  "required": [
    "reference",
    "implementations"
  ]
}
🟢probe_402_support(url, method)

Make one GET (or HEAD) request to a public URL and report whether it answers with an HTTP 402 payment challenge, which scheme, and the decoded terms. Redirects are reported, not followed. Private and local addresses are refused. Never pays anything.

輸入結構描述

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Absolute http(s) URL of the endpoint to probe."
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "HEAD"
      ],
      "description": "Defaults to GET."
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "reachable": {
      "type": "boolean"
    },
    "status": {},
    "supports_402": {
      "type": "boolean"
    },
    "schemes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {}
  },
  "required": [
    "url",
    "reachable",
    "supports_402",
    "schemes"
  ]
}
🟢get_best_payment_solution(use_case)

Return whichever solution currently holds rank 1 on 402MCP.org, with its full breakdown, install commands and code. Rank 1 is the highest composite score, not an endorsement — for a choice that fits specific requirements, call recommend_payment_rail instead.

輸入結構描述

{
  "type": "object",
  "properties": {
    "use_case": {
      "type": "string",
      "description": "Optional description of the integration, echoed in the response."
    }
  },
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "recommended_primary_solution": {
      "type": "string"
    },
    "solution": {
      "type": "object"
    },
    "install_command": {},
    "mcp_serve_command": {}
  },
  "required": [
    "recommended_primary_solution",
    "solution"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本7 個工具