
HTTPayer
io.github.HTTPayer由 GitHub 帳號 HTTPayer 發布v0.1.7更新於 Oct 24, 2026
x402 micropayments for AI agents — credits-based, no wallets, no blockchain.
概覽
本機 MCP 伺服器,讓 AI 助理透過 HTTPayer 以額度為基礎的代理呼叫 x402 付費 API,不需錢包或區塊鏈設定。
- 可以做什麼
- 查詢額度餘額、每日上限、已用與剩餘額度,額度不足時取得儲值連結,並查看 HTTPayer 全域系統每日上限與剩餘容量,以及依 webhook ID 輪詢非同步操作狀態,以及向支援 x402 的端點發出 HTTP 請求,由額度自動完成付款,以及試跑請求,在花費額度前查看費用估算。
- 適用情境
- 當助理需要存取按次計費的 x402 協定 API,而你希望以預付額度付款而非管理錢包時適用。simulate 工具可在發出付費請求前核對費用。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js,由 MCP 用戶端以 stdio 啟動。需要從 HTTPayer 主控台取得的 API 金鑰(sk-live-...),存放在本機設定檔或於安裝時傳入。需要能連線至 HTTPayer API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 HTTPayer,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@httpayer/mcp
MCP (Model Context Protocol) server for HTTPayer. Lets AI agents call x402-enabled APIs using credit balance — no wallets, no blockchain, no Web3 knowledge required.
- Dashboard & API keys: app.httpayer.com
- npm: @httpayer/mcp
- GitHub: httpayer/mcp
Quickstart
With an AI agent (recommended)
Paste this into any MCP-compatible agent (Claude Code, Cursor, Windsurf, OpenCode...):
The agent detects your environment and handles everything automatically.
Without an agent (manual)
1. Run setup:
Get your API key at app.httpayer.com when prompted.
Flags:
2. Add to your client:
Claude Code:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
Cursor (.cursor/mcp.json), Windsurf (.windsurf/mcp.json), Cline (.cline/mcp_settings.json):
OpenCode (opencode.json or ~/.config/opencode/config.json):
Zed:
3. Restart your client and verify:
Ask your agent: "fetch https://api.httpayer.com/demo/v1/base-weather"
A weather response means HTTPayer is working.
How it works
Runtime flow
- Your client launches the MCP server via
npx -y @httpayer/mcp@lateston startup (stdio transport). - The server reads the API key from
~/.httpayer/mcp-config.json. - The agent receives the tool list, system instructions, prompts, and resources in its context.
- When the agent calls
fetch, the MCP server forwards the request toPOST https://api.httpayer.com/proxy. - HTTPayer's proxy detects a 402, pays using your credits, retries, and returns the final response.
- The result (status, body, headers) comes back to the agent.
MCP capabilities
This server exposes three MCP primitives so agents get context automatically — without the user having to ask.
Tools
Six tools (see full reference below).
Prompts
Compatible clients (Claude Desktop, Cursor, and others) call prompts/list on connection and inject these into the agent's context proactively.
Resources
MCP tools reference
get_balance
Check credit balance and daily usage.
Input: none
Example response:
fetch
Make an HTTP request to any x402-enabled endpoint. Payment is handled automatically.
Input:
Example response:
On 502, the response includes webhook_id for async polling.
simulate
Dry-run a fetch. Returns cost estimate without spending credits.
Input: Same as fetch (except timeout).
Example response:
get_topup_link
Returns the dashboard URL to add credits. Show to user when balance is low.
Input: none
check_limits
Check global HTTPayer system daily limits and remaining capacity.
Input: none
get_webhook_status
Poll the status of an async operation. Use when fetch returns a 502 with webhook_id.
Input: webhook_id (string, required)
Status values: pending, success, success_refunded, payment_failed, upstream_error, internal_error, rate_limited
HTTPayer API reference
Authentication: x-api-key: sk-live-... header on all requests.
Proxy endpoint
POST https://api.httpayer.com/proxy
Only api_url and method are required.
Status codes:
Configuration
API key stored at: ~/.httpayer/mcp-config.json
To update: npx @httpayer/mcp setup --update-key
x402 protocol overview
x402 is an HTTP-native micropayment protocol using the 402 Payment Required status code.
Without HTTPayer:
- Client hits endpoint → gets
402+ payment requirements - Client pays on-chain (requires wallet + USDC)
- Client retries with payment proof
With HTTPayer:
- Client calls
POST /proxy { api_url, method, ... } - HTTPayer detects
402, pays using your credits - HTTPayer retries and returns the final response
All blockchain interaction happens on HTTPayer's side.
Credit system
Top up at app.httpayer.com. Below 100 credits, the agent will prompt you to top up.
Error handling
Setup errors
MCP tool errors
All errors return isError: true — the server stays alive and the agent gets a readable message.
© 2026 HTTPayer Inc.
來源:README.md,提交 0fd8780
工具
0版本歷史
1- v0.1.7最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。