
CRA AGENT
io.github.giupy997由 GitHub 帳號 giupy997 發布v0.0.11更新於 Nov 3, 2026
Lets an agent pay for x402 APIs in USDC on Arc, under a spending policy it cannot change.
概覽
讓 AI 代理在 Arc 上以 USDC 尋找、詢價並支付 x402 API,支出受環境變數中固定的策略約束。
- 可以做什麼
- 搜尋並詢價 Arc 上可購買的 API,回傳方法、URL、參數、價格、賣家以及策略是否允許支付
- 支付某個 URL 並取回回應與簽章收據,可選用閃電網路以比特幣支付,並可為單次呼叫設上限
- 查詢錢包與 Circle Gateway 餘額,並把錢包中的 USDC 轉入 Gateway
- 檢視每次嘗試的帳本,把已結算支付對應到鏈上轉帳,並驗證其他代理的收據
- 顯示目前生效的支出限額,並在測試網上處理 ERC-8183 託管任務
- 適用情境
- 適合希望代理自行以 Arc 上的 USDC 購買 API 呼叫或資料,同時需要硬性支出限額、收據與稽核紀錄的情境;也適合在付費前先確認某個端點的價格。
- 執行需求
- 透過 npx 從 npm 套件 @cra-agent/mcp 在本機執行。需要 CRA_KEY_FILE 指向一個權限為 chmod 600、存放代理私鑰的檔案,並設定 CRA_NETWORK 為 arc 或 arcTestnet。CRA_POLICY 設定支出限額,CRA_RPC_URL 與 DATABASE_URL 為選用。錢包需有 USDC,首次支付前還需一次性存入 Circle Gateway。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 CRA AGENT,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@cra-agent/mcp
An MCP server that lets an AI agent pay for an API call. The agent calls one tool, the rail reads the x402 price, checks a spending policy, pays in USDC on Arc through Circle Gateway with no gas for the buyer, and keeps the receipt.
The model never sees the key, and it cannot raise its own limit: both are read from the environment before the conversation starts.
Install
Set it up in one command
Creates the agent's key in ~/.cra-agent/agent.key (readable only by you, never overwritten), checks the limits, writes the entry into the client's config file with a copy of the old one, and prints the address to fund. --client is claude-desktop, cursor, claude-code or terminal; --policy, --network, --key-file and --dry-run do what they say. CRA Factory writes the command for you from four questions.
Or by hand, from any MCP client
CRA_KEY_FILE points at a file holding the private key, chmod 600. Never put a key in a prompt.
Tools
An agent that pays for its own thinking
cra-agent think "<task>" runs a small autonomous agent whose brain is a pay-per-call LLM on Arc: BlockRun's chat completions, found in the bazaar, Claude Haiku 4.5 by default. Every thought is a paid call, and so is every tool the brain asks for: it searches the bazaar for free, then buys what it needs at the listed price. There is no API key anywhere, only the agent's wallet. The session budget (--budget, default $0.10) and the spending policy cover thinking and tools alike, a thought is capped with --ceiling (default $0.01), and the brain can only buy a URL that one of its searches returned. It prints each step with its cost and ends with the bill: so much for thinking, so much for tools. A short task costs a few cents: the run on cra-agent.tech/think that found when Arc mainnet went live and who validates it cost $0.023648, four thoughts and one web search from Exa.
It also knows a few free public APIs, called without paying and shown as such: DexScreener's pairs, boosted tokens and new token profiles, digested to what answers questions (pairs by 24-hour volume). --tools <file> keeps it to a list of URL prefixes: anything else is never shown to it, so never bought.
With --record and a DATABASE_URL, the run is kept in Postgres as it happens, step by step, which is how the page shows it live and replays it after. --questions <file> picks the question when none is given, which is how our server runs it on a timer: the file combines templates (What is the price of {coin} right now?) with lists (@coin = bitcoin (BTC) | ether (ETH)), and a recorded run never repeats one of the last hundred questions.
The same agent can be hired by anyone, over x402 upto: GET https://api.cra-agent.tech/v1/upto/think?task=… asks you to sign for up to $0.10 and charges what the run spent plus $0.005. arc_pay and cra-agent pay pay routes like this one: your policy is checked against the ceiling, since all of it could be taken, and your ledger keeps what was. The default policy allows $0.05 a payment, so give this one more with per_payment=0.10.
Fund the agent from Base or Solana
Paying on Arc takes USDC in Circle Gateway on Arc, and most agents hold theirs on Base or Solana. One command brings it over and deposits it:
It asks Eco for a route, and checks the quote before signing anything, from the transaction's own calldata: a CCTP burn of exactly that amount to Arc's domain, minting to this agent, a fee under the cap (--max-fee, default 0.5% or $0.01), the refund to the same wallet. From Base, the vault the USDC goes into must be the one Eco's Portal derives for that intent. It then waits for the USDC on Arc, usually seconds, and deposits it into Gateway, leaving $0.01 in the wallet for Arc's gas (--keep, or --no-deposit to keep it all in the wallet). From Base the wallet needs a little ETH for two transactions, about a cent; from Solana, a little SOL. The model has no tool for this: moving money between chains is the owner's call, from a terminal.
The same thing from a terminal
Every receipt carries the limits the payment passed under and is signed with the agent's key, so someone who was not there can check it. The signature proves the agent issued the statement and nobody changed it; the settlement on chain is the independent half.
Environment
Two things worth knowing. A payment is settled only after the seller's handler succeeds, so a failing endpoint costs nothing: https://api.cra-agent.tech/v1/paid/selftest/fail always answers 500 so you can check. And identity=required pays only sellers with an ERC-8004 identity on Arc: the address that gets paid must own an agent in the registry, or be the wallet an agent declared for payments. It proves an identity exists, not that the seller is honest; registering costs only gas.
Part of CRA AGENT
Payments for AI agents on Arc, Circle's USDC-native L1. Site: cra-agent.tech · Source: github.com/giupy997/arcagentx402 · MIT
來源:packages/mcp/README.md,提交 47ab8f9
工具
0版本歷史
6- v0.0.11最新Sep 23, 2026
- v0.0.9Sep 23, 2026
- v0.0.6Sep 22, 2026
- v0.0.4Sep 21, 2026
- v0.0.3Sep 20, 2026
- v0.0.2Sep 19, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分