
CRA AGENT
io.github.giupy997Published by GitHub account giupy997v0.0.11Updated Nov 3, 2026
Lets an agent pay for x402 APIs in USDC on Arc, under a spending policy it cannot change.
Overview
Lets an AI agent find, price and pay for x402 APIs in USDC on Arc, under a spending policy fixed in the environment.
- What you can do
- Search and price payable APIs on Arc, with method, URL, parameters, price, seller and whether the policy allows paying
- Pay a URL and get the response plus a signed receipt, optionally in bitcoin over Lightning, with a per-call ceiling
- Check wallet and Circle Gateway balances and move USDC from the wallet into Gateway
- Review the ledger of every attempt, match settled payments to on-chain transfers, and verify another agent's receipt
- Show the spending limits in force and work with ERC-8183 escrow jobs on testnet
- When to use it
- Useful when an agent should buy API calls or data on its own with USDC on Arc, and you want hard spending limits, receipts and an audit trail rather than handing over an API key. Also for checking what a paid endpoint costs before committing.
- Requirements
- Runs locally via npx from the npm package @cra-agent/mcp. Needs CRA_KEY_FILE pointing at a chmod 600 file holding the agent's private key, and CRA_NETWORK set to arc or arcTestnet. CRA_POLICY sets spending limits; CRA_RPC_URL and DATABASE_URL are optional. The wallet must be funded with USDC, and a one-time deposit into Circle Gateway is needed before the first payment.
Installation
In SourceWeft
- Open CRA AGENT in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: packages/mcp/README.md at commit 47ab8f9
Tools
0Version history
6- v0.0.11LatestSep 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
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts