X402 Api

io.github.gigsoul由 GitHub 账号 gigsoul 发布v3.0.0更新于 Oct 24, 2026

AI API for marketing, content and outreach. 22 endpoints. Pay with USDC on Base via x402.

已验证Streamable HTTP可网页运行金融商业与电商

概览

AI 生成的概览

远程 MCP 端点,提供 22 个面向营销、内容与推广的 AI API 接口,通过 x402 以 Base 上的 USDC 按次付费。

可以做什么
  • 调用面向营销、内容与推广的 AI 接口
  • 通过一个远程服务器访问 22 个 API 端点
  • 使用 x402 支付流程以 Base 上的 USDC 按请求付费
  • 先收到 402 Payment Required 及付款要求,再携带已签名的付款重试
适用场景
当你希望助手直接使用付费的 AI 营销、内容与推广接口、又不想自行管理 API 密钥,并且愿意以 Base 上的 USDC 按次付费时适用。
运行要求
远程 streamable HTTP 端点;未声明本地安装、环境变量或请求头。需要支持 x402 支付的客户端,包括能在 Base 上签署 USDC 付款的钱包,以完成 402 付款步骤。
安装前请注意
每次调用都要付费:服务器返回 402 Payment Required,需先提交已签名的 Base USDC 付款才会返回结果,使用会消耗真实资金。签署付款涉及加密钱包与私钥,应限制权限并妥善保管。请求与付款数据会发送到第三方托管的端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 X402 Api,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.gigsoul%2Fx402-api/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "x402-api": {
      "type": "http",
      "url": "https://gig-x402-api.jayson-be1.workers.dev/"
    }
  }
}

README

x402

x402 is an open standard for internet native payments. It aims to support all networks (both crypto & fiat) and forms of value (stablecoins, tokens, fiat).

typescript
app.use(  paymentMiddleware(    {      "GET /weather": {        accepts: [...],                 // As many networks / schemes as you want to support        description: "Weather data",    // what your endpoint does      },    },  ),);// That's it! See examples/ for full details
Installation

Typescript

shell
# All available reference sdksnpm install @x402/core @x402/evm @x402/svm @x402/axios @x402/fetch @x402/express @x402/hono @x402/next @x402/paywall @x402/extensions
# Minimal Fetch clientnpm install @x402/core @x402/evm @x402/svm @x402/fetch
# Minimal express Servernpm install @x402/core @x402/evm @x402/svm @x402/express

Python

shell
pip install x402

Go

shell
go get github.com/x402-foundation/x402/go

Principles

  • Open standard: x402 is an open standard, freely accessible and usable by anyone. It will never force reliance on a single party.
  • HTTP / Transport Native: x402 is meant to seamlessly complement existing data transportation. It should whenever possible not mandate additional requests outside the scope of a typical client / server flow.
  • Network, token, and currency agnostic: we welcome contributions that add support for new networks (both crypto and fiat), signing standards, or schemes, so long as they meet our acceptance criteria laid out in CONTRIBUTING.md. x402 may extend support to fiat based networks, but will never deprioritize onchain payments in favor of fiat payments.
  • Backwards Compatible: x402 will not deprecate support for any existing networks unless such removal is deemed necessary for the security of the standard. Whenever possible, x402 will aim for backwards compatibility for non-major version changes.
  • Trust minimizing: all payment schemes must not allow for the facilitator or resource server to move funds, other than in accordance with client intentions
  • Easy to use: It is the goal of the x402 community to improve ease of use relative to other forms of payment on the Internet. This means abstracting as many details of crypto as possible away from the client and resource server, and into the facilitator. This means the client/server should not need to think about gas, rpc, etc.

Ecosystem

The x402 ecosystem is growing! Check out our ecosystem page to see projects building with x402, including:

  • Client-side integrations
  • Services and endpoints
  • Ecosystem infrastructure and tooling
  • Learning and community resources

Want to add your project to the ecosystem? See our demo site README for detailed instructions on how to submit your project.

Roadmap: see ROADMAP.md

Documentation: see docs/ for the GitBook documentation source

Terms:

  • resource: Something on the internet. This could be a webpage, file server, RPC service, API, any resource on the internet that accepts HTTP / HTTPS requests.
  • client: An entity wanting to pay for a resource.
  • facilitator: A server that facilitates verification and execution of payments for one or many networks.
  • resource server: An HTTP server that provides an API or other resource for a client.

Technical Goals:

  • Permissionless and secure for clients, servers, and facilitators
  • Minimal friction to adopt for both client and resource servers
  • Minimal integration for the resource server and client (1 line for the server, 1 function for the client)
  • Ability to trade off speed of response for guarantee of payment
  • Extensible to different payment flows and networks

Specification

See specs/ for full documentation of the x402 standard/

Typical x402 flow

x402 payments typically adhere to the following flow, but servers have a lot of flexibility. See advanced folders in examples/. [图片]

The following outlines the flow of a payment using the x402 protocol. Note that steps (1) and (2) are optional if the client already knows the payment details accepted for a resource.

  1. Client makes an HTTP request to a resource server.

  2. Resource server responds with a 402 Payment Required status and a PaymentRequired b64 object return as a PAYMENT-REQUIRED header.

  3. Client selects one of the PaymentRequirements returned by the server response and creates a PaymentPayload based on the scheme & network of the PaymentRequirements they have selected.

  4. Client sends the HTTP request with the PAYMENT-SIGNATURE header containing the PaymentPayload to the resource server.

  5. Resource server verifies the PaymentPayload is valid either via local verification or by POSTing the PaymentPayload and PaymentRequirements to the /verify endpoint of a facilitator.

  6. Facilitator performs verification of the object based on the scheme and network of the PaymentPayload and returns a Verification Response.

  7. If the Verification Response is valid, the resource server performs the work to fulfill the request. If the Verification Response is invalid, the resource server returns a 402 Payment Required status and a Payment Required Response JSON object in the response body.

  8. Resource server either settles the payment by interacting with a blockchain directly, or by POSTing the Payment Payload and Payment PaymentRequirements to the /settle endpoint of a facilitator server.

  9. Facilitator server submits the payment to the blockchain based on the scheme and network of the Payment Payload.

  10. Facilitator server waits for the payment to be confirmed on the blockchain.

  11. Facilitator server returns a Payment Execution Response to the resource server.

  12. Resource server returns a 200 OK response to the Client with the resource they requested as the body of the HTTP response, and a PAYMENT-RESPONSE header containing the Settlement Response as Base64 encoded JSON if the payment was executed successfully.

Schemes

A scheme is a logical way of moving money.

Blockchains allow for a large number of flexible ways to move money. To help facilitate an expanding number of payment use cases, the x402 protocol is extensible to different ways of settling payments via its scheme field.

Each payment scheme may have different operational functionality depending on what actions are necessary to fulfill the payment. For example exact, the first scheme shipping as part of the protocol, would have different behavior than upto. exact transfers a specific amount (ex: pay $1 to read an article), while a theoretical upto would transfer up to an amount, based on the resources consumed during a request (ex: generating tokens from an LLM).

See specs/schemes for more details on schemes, and see specs/schemes/exact/scheme_exact_evm.md to see the first proposed scheme for exact payment on EVM chains.

Schemes vs Networks

Because a scheme is a logical way of moving money, the way a scheme is implemented can be different for different blockchains. (ex: the way you need to implement exact on Ethereum is very different from the way you need to implement exact on Solana).

Clients and facilitators must explicitly support different (scheme, network) pairs in order to be able to create proper payloads and verify / settle payments.

来源:README.md,提交 f6a42d7

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v3.0.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分