
tx402
io.github.Mahesvannan由 GitHub 帳號 Mahesvannan 發布v0.2.0更新於 Oct 24, 2026
Explain Algorand transactions, groups, batches, and account activity with x402.
概覽
透過付費的 x402 API,用淺白英文解釋 Algorand 交易、原子群組、批次交易與帳戶活動。
- 可以做什麼
- 包裝了一個託管服務,把原始 Algorand 索引器資料轉成可讀的說明。它能解釋單筆交易、原子群組的每一段、最多十個交易 ID 的批次,以及帳戶近期活動,回傳換算後的金额、內部交易、資產名稱、手續費、時間戳、交易對手與協定標籤。MCP 包裝預設為唯讀,對付費呼叫回傳 x402 付款要求。
- 適用情境
- 適合助理需要向人描述 Algorand 鏈上活動、而不是回傳原始索引器 JSON 的情境,例如解釋一筆付款、一個原子群組或某個帳戶的近期歷史。
- 執行需求
- 以 npm 套件(npx tx402-mcp)透過 stdio 在本機執行,需要 Node.js。付費路由需要已儲值的 Algorand 錢包與 Mainnet USDC,並透過網路存取託管服務。清單中未宣告任何環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 tx402,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
tx402
Plain-English explanations of Algorand transactions, sold as a pay-per-call API with x402 on Algorand.
Live service:
Explain one transaction, every leg of an atomic group, a batch of IDs, or recent account activity. Responses include scaled amounts, inner transactions, asset names, fees, timestamps, counterparties, and source-verified protocol labels.
Try the free fixed-transaction demo without a wallet:
Example response after payment:
Raw Algorand indexer JSON is optimized for machines doing bookkeeping: amounts are base units, assets are numeric IDs, and notes are base64. tx402 is the translation layer for agents and applications that need to explain a transaction to a person.
API
Public routes:
GET /- landing page with service metadata linksGET /health- process livenessGET /health?deep=1&network=mainnet- readiness check for upstream servicesGET /discovery- machine-readable service description and pricing metadataGET /openapi.json- OpenAPI 3.1 specificationGET /.well-known/agent.json- agent marketplace manifestGET /.well-known/x402- x402 resource manifestGET /llms.txt- agent-readable documentationGET /demo?example=algo|usdc- free allowlisted Mainnet examplesGET /explain?txid=...&network=mainnet- paid transaction explanationGET /group?txid=...&network=mainnet- paid atomic-group explanationPOST /batch- paid batch of 1 to 10 transaction IDsGET /account/activity?address=...&limit=25- paid activity summaryGET /analytics- free aggregate adoption counters
Default prices are $0.005 for /explain, $0.01 for /group, $0.02 for
/batch, and $0.01 for /account/activity. Production accepts Mainnet USDC:
- network:
algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8= - asset:
31566704 - receiver:
6RK3U3OF2B4Q773L4KC7OVFHQGU5I74NHRZ36QN6CVF527CKXAL62YR754
Architecture
tx402 has a small deterministic core and a thin serving shell.
Core:
- src/decoder.js converts raw Algorand indexer JSON into a normalized transaction object.
- src/narrator.js converts that normalized object into one readable sentence.
- src/insights.js builds group and account-level summaries.
- src/explainer.js resolves assets and orchestrates the single, group, batch, and account products.
- src/knownApps.js maps known app and asset IDs to human labels with a verification source for every narrated protocol claim.
Serving shell:
- src/index.js owns HTTP routes, middleware ordering, logging, rate limits, health checks, and graceful shutdown.
- src/indexer.js is the only module that talks to AlgoNode's public indexer.
- src/payments.js declares the x402 price and receiver, then delegates verification and settlement to the hosted GoPlausible facilitator.
- src/rateLimit.js provides the in-memory per-IP limiter.
- src/analytics.js keeps aggregate process-local adoption counters without cookies, raw wallet addresses, query strings, or IP history.
The server never stores private keys. Buyer signing happens client-side. The resource server only advertises a price, validates payment, and settles through the facilitator after a successful product-route response.
Run Locally
Local endpoints:
The app reads .env when present. Leave USDC_ASSET_ID unset unless you need a
non-standard asset; the code derives the canonical USDC asset from NETWORK.
Client Examples
Read-only example client:
The default client prints discovery metadata and the x402 payment challenge
without spending funds. To make it pay, configure a funded buyer wallet and set
TX402_EXAMPLE_PAY=1 plus CONFIRM_MAINNET_PAYMENT=1.
OpenAPI:
- openapi.json
https://tx402-production.up.railway.app/openapi.json
Agent marketplace metadata:
https://tx402-production.up.railway.app/.well-known/agent.jsonhttps://tx402-production.up.railway.app/.well-known/x402https://tx402-production.up.railway.app/llms.txt
Copy-paste integrations and distribution assets:
The paid route also declares the standard x402 Bazaar extension, including its input/output schemas, service metadata, and example request. Facilitators can index that metadata after a successful settlement.
MCP wrapper:
After the public npm package is published, agents can install it without cloning this repository:
By default the MCP wrapper is read-only and returns x402 payment requirements
for paid calls. To let it pay from a local wallet, set
TX402_MCP_ENABLE_PAYMENTS=1 and CONFIRM_MAINNET_PAYMENT=1.
The six-part adoption roadmap is tracked in PLAN.md.
Submission Assets
Security Notes
- Output strings can contain untrusted on-chain data, including asset names and notes. JSON output is safe as JSON, but consumers rendering HTML must escape it.
- Invalid
txidinput is rejected before indexer access and before payment. - Payment only settles after a successful response.
- All product routes,
/analytics,/discovery, and deep health checks are rate-limited. - Protocol/app names are only stated as fact when marked
verified: true. - Application logs omit query strings and client IP addresses.
Status
- Phase 1 - core explainer, free and local
- Phase 2 - x402 payment middleware on Testnet, verified end-to-end
- Phase 3 - public HTTPS deployment
- Phase 4 - Mainnet payment configuration
- Phase 5 - first real Mainnet settlement
- Phase 6 - example client, OpenAPI spec, optional MCP wrapper
First Mainnet settlement:
- txid:
XA7HMRPUV4X2GWI4AAGUT5FKAVTNCQJ5ZMUNTVTBKG3GZMES27LA - amount:
0.005000USDC
Maintainer Notes
Implementation runbooks, deployment commands, phase evidence, and operational cautions live in CLAUDE.md.
來源:README.md,提交 6932592
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分