
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


