
A2apay
io.github.groundhogday2011-bytev0.1.0更新於 Oct 8, 2026
Pay-per-call AI query and versioned task memory for agents. No account, no API key, via x402.
概覽
讓助理呼叫付費 AI 查詢服務並儲存帶版本的工作檢查點,附帶少量每日免費額度。
- 功能
- 以 MCP 工具形式提供 ask 和 remember。ask 會回傳 a2apay 服務產生的 AI 回答;remember 儲存帶可選標籤的扁平文字鍵值記錄。底層用戶端還支援 checkpoint 和 resume,用於帶版本、依工作區分的狀態,但 MCP 伺服器只暴露 ask 和 remember,而且 remember 只寫不可讀,沒有回讀工具。
- 適用情境
- 適合在助理需要偶爾取得 AI 回答或簡單依工作儲存文字、又不想註冊帳號或申請 API 金鑰,且每日免費額度夠用時使用。若需要透過 MCP 讀回已存內容,或需要真正的文件資料庫,則不太適用。
- 執行需求
- 以本機 Python 程序執行(pip install a2apay-io[mcp],然後 python mcp_server.py)。免費額度不需要錢包或憑證。超出免費額度後需設定環境變數 A2APAY_PRIVATE_KEY,填入 Base 主網錢包私鑰並持有少量 USDC,同時安裝付費附加依賴 eth-account。需要連線至 a2apay 服務的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 A2apay,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
a2apay
Python client for a2apay.io — pay-per-call AI answers and persistent memory for autonomous agents. No account, no API key.
(The PyPI distribution is named a2apay-io — an unrelated package already
holds the bare a2apay name. The importable module is still a2apay.)
Quick start (free tier, zero setup)
Every call tries the free tier first automatically — 5 requests/day per caller, no wallet needed:
With real payment (once the free tier is used up)
The wallet needs a small USDC balance on Base mainnet ($0.028/call). The private key is used only to sign a payment authorization locally — it is never sent anywhere.
Checkpoint / resume (task memory)
Write versioned, task-scoped state and read it back later — even from a
different process. Each checkpoint() to the same key adds a new version
rather than overwriting, and resume() always returns the latest.
resume() always requires payment ($0.014/call) — there's no free tier
for reads yet, so it needs a configured wallet even for your first call.
checkpoint() follows the same free-tier-then-paid behavior as
remember().
What this honestly does and doesn't do
ask()returns a real AI-generated answer.remember()stores a flat key/value record with optional tags — this is simple text storage, not a document database. Values are stored as text.- Falls back to a real payment only when the free tier returns a
402; if noprivate_keyis configured at that point, it raises a clearA2ApayErrorrather than failing silently. - Payment signing uses
eth-account(maintained by the Ethereum Foundation ecosystem), implementing the real x402 "exact" EVM scheme per the x402 protocol spec.
MCP server
An MCP server (mcp_server.py) exposes ask and remember as MCP tools
for any MCP-aware agent or framework (Claude Desktop, etc.):
Add to an MCP client config:
Honest scope note: remember is write-only — there's no memory read-back
tool because the live API doesn't have a read-back route yet.
Full API reference
See a2apay.io/openapi.yaml for the underlying HTTP API this wraps.
來源:README.md,提交 685aa4c
工具
0版本歷史
1- v0.1.0最新Oct 8, 2026


