AI代理市场连接工具

x402 Bazaar是一个自主市场,AI代理通过HTTP 402协议使用USDC在Base L2、SKALE on Base和Polygon上买卖API服务。

  • by Wintyx57
  • JavaScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 Wintyx57/x402-bazaar-cli

使用说明

x402集市

只需一个命令,即可将您的AI代理连接到x402 Bazaar市场。

x402 Bazaar是一个自主市场,人工智能代理使用HTTP 402协议买卖API服务,在Base L2、SKALE on Base和Polygon上支付USDC。

快速开始

npx x402-bazaar init

此单个命令将:

  1. 检测您的环境 (克劳德桌面、光标、VS代码、克劳德代码)
  2. 安装MCP服务器 及其依赖关系
  3. 配置您的钱包 (Coinbase API密钥或只读模式)
  4. 生成配置 并将其写入正确的位置
  5. 验证连接 到现场市场

命令

npx x402-bazaar init

完全交互式设置。检测您的AI客户端,安装MCP服务器,配置支付,并验证连接。

# Force a specific environment
npx x402-bazaar init --env claude-desktop

# Skip wallet setup (read-only browsing)
npx x402-bazaar init --no-wallet

# Use a custom server URL
npx x402-bazaar init --server-url https://your-server.com

npx x402-bazaar config

交互式生成MCP配置文件。

# Generate and save to a file
npx x402-bazaar config --output mcp-config.json

# Force environment
npx x402-bazaar config --env cursor

npx x402-bazaar status

检查市场服务器是否联机并显示统计数据。

npx x402-bazaar status
npx x402-bazaar status --server-url https://your-server.com

npx x402-bazaar list

列出市场上所有可用的服务。支持过滤器。

# List all services
npx x402-bazaar list

# Filter by blockchain network
npx x402-bazaar list --chain base
npx x402-bazaar list --chain skale
npx x402-bazaar list --chain polygon

# Filter by category
npx x402-bazaar list --category ai
npx x402-bazaar list --category search

# Show only free services
npx x402-bazaar list --free

npx x402-bazaar search <query>

按关键字搜索特定服务。

npx x402-bazaar search "weather"
npx x402-bazaar search "image generation"
npx x402-bazaar search "sentiment analysis"

npx x402-bazaar call <url> [--key wallet.json]

调用API端点自动支付USDC。CLI透明地处理HTTP 402流。

# Call with default wallet
npx x402-bazaar call https://x402-api.onrender.com/api/weather?city=Paris

# Call with a specific wallet key file
npx x402-bazaar call https://x402-api.onrender.com/api/search?q=AI --key ./wallet.json

npx x402-bazaar wallet [--create|--balance]

管理代理钱包:创建一个新的或检查其USDC余额。

# Create a new agent wallet (generates a key file)
npx x402-bazaar wallet --create

# Check the USDC balance of the current wallet
npx x402-bazaar wallet --balance

支持的环境

环境 配置位置
克劳德桌面 %APPDATA%/Claude/claude_desktop_config.json (Windows)
克劳德桌面 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
光标 ~/.cursor/mcp.json
VS代码+继续 ~/.continue/config.json
克劳德代码 ~/.claude.json

什么是x402集市?

x402 Bazaar是一个人工智能代理自主交易API服务的市场:

  • 代理人用美元支付 在基L2上,在基上进行SKALE,或多边形
  • HTTP 402协议 --服务器返回付款详细信息,代理付款,然后重试
  • 每笔付款都是可验证的 通过BaseScan、SKALE Explorer或PolygonScan在链上
  • 155服务 可用(搜索、人工智能、加密、天气等)

定价

行动 成本
浏览市场信息 免费
搜索服务 免费
列出所有服务 免费
注册新服务 1.00美元

需求

  • Node.js>=18
  • npm或npx

生态系统

存储库 描述
x402后端 API服务器、101个本地端点、支付中间件、MCP服务器
x402前端 React+TypeScript UI,钱包连接
x402集市广场 npx x402-bazaar --带有7个命令的CLI(此仓库)
x402 sdk 用于AI代理的TypeScript SDK
x402链条 Python语言链工具
x402快速货币化模板 FastAPI模板,用于将任何Python函数货币化

直播: x402bazaar.org | API x402-api.onrender.com

许可证

麻省理工学院