Foundry: prepaid AI compute in USDF
by usdf.fi · remote · no sign-in to list tools · v1.0.0 · published by fi.usdf
Prepaid AI compute in USDF: models, quotes and chat with a receipt; pay per call (x402) or by key
10 tools: 1 do something that can't be undone, 7 change things and 2 only read.
Scanned Oct 21, 2026
- Deletes or cancels0Claude Code: deny
- Can't be undone1Claude Code: ask: see these tools
- Changes things7Claude Code: ask: see these tools
- Only reads2Claude Code: allow: see these tools
3 checks matched something in the tool definitions. No finding is not a safety guarantee. How the checks work.
claude mcp add --transport http gateway https://api.usdf.fi/mcpFindings
Matches of fixed checks, with the text they matched.
- Warnlist_tools
The server marks "list_tools" read-only (readOnlyHint: true), and its own name, description or input give the class "write".
What this check looks forMatched text
annotations: {"readOnlyHint":true,"openWorldHint":false}; The name "list_tools" says "list": a word for reading.
- Infochat
The description mentions "credential".
What this check looks forMatched text
description: "...ignature transfer); call again with the credential in _meta["org.paymentauth/credential"],..."
- Infochat
The description is 2,615 characters long, over the 2,000 this check looks for.
What this check looks forMatched text
description ends: "...tauth/credential"], and the paid result carries _meta["org.paymentauth/receipt"]."
Tools
Open a tool for its reasons and full description. Descriptions are the publisher's own words, shown as they are.
10 tools
Can't be undone 1Claude Code: ask
x402_payCalls a URL that asks for an x402 payment and pays it for you: the gateway pays the seller in USDC from its own float and charges this key in USDF cost plus 5% at most, no minimum …No findings
Why it is in this group
- The name "x402_pay" says "pay": a word that usually means money moves, which cannot be taken back.
Description, as the server wrote it Calls a URL that asks for an x402 payment and pays it for you: the gateway pays the seller in USDC from its own float and charges this key in USDF cost plus 5% at most, no minimum (the seller's amount and a fee of at most 5% of it; never free credit), within the key's and its agent's limits. Needs an API key. Returns the seller's answer with the payment and its receipt; a payment is charged only once the chain shows it, and one that never settles costs nothing. quote: true answers what it would cost and pays nothing. Third-party tools to call this way are listed under marketplace in list_tools (GET /v1/tools?source=marketplace).
Annotations the server declares
- readOnlyHint: false
- destructiveHint: false
- idempotentHint: false
- openWorldHint: true
Changes things 7Claude Code: ask
agents_market_callCalls a listing of the agents market by its id (svc_..., from agents_market_search), paid from this key's USDF balance (never free credit) within the key's and its agent's limits a…No findings
Why it is in this group
- The name "agents_market_call" says "call": a word for a change.
Description, as the server wrote it Calls a listing of the agents market by its id (svc_..., from agents_market_search), paid from this key's USDF balance (never free credit) within the key's and its agent's limits and at most max_price: what one call costs and nothing on top; a call its seller does not answer 2xx costs nothing, or no more than what its seller kept of it. Every listing is called the same way, and answers 503 market_calls_unarmed while calls to the market are not switched on. Needs an API key. Returns the seller's answer and the receipt. The input goes to the seller, whose own policy governs what it keeps.
Annotations the server declares
- readOnlyHint: false
- destructiveHint: false
- idempotentHint: false
- openWorldHint: true
balanceWith an API key: what the key can spend now, the account's balance and the amount held for requests running, and what is left of the key's budget, in USDF.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
- The server marks it read-only (readOnlyHint: true), but an annotation never lowers a class.
Description, as the server wrote it With an API key: what the key can spend now, the account's balance and the amount held for requests running, and what is left of the key's budget, in USDF. With address instead, and no key: that wallet's USDF and USDG on the chain now, and how much USDF it lets the signature-transfer contract spend, which x402 payments come from.
Annotations the server declares
- readOnlyHint: true
- openWorldHint: false
chatRuns a chat completion and returns the text with its receipt (tokens, price, cost, balance, settlement).2 findings
Why it is in this group
- The description's first verb is "run": a word for a change.
Findings
- Info
The description mentions "credential".
What this check looks forMatched text
description: "...ignature transfer); call again with the credential in _meta["org.paymentauth/credential"],..."
- Info
The description is 2,615 characters long, over the 2,000 this check looks for.
What this check looks forMatched text
description ends: "...tauth/credential"], and the paid result carries _meta["org.paymentauth/receipt"]."
Description, as the server wrote it Runs a chat completion and returns the text with its receipt (tokens, price, cost, balance, settlement). With an API key it spends from that key's balance, holding the most the request can cost first. Not streamed. Output is capped at 4096 tokens. A call without a progress token answers within 55 s of arriving. With a progress token, progress is sent every 15 s and the call may run 10 minutes, so the client must reset its timeout on progress (resetTimeoutOnProgress: true in the TypeScript SDK) or wait that long. At its deadline, or when the client's connection closes, a call is cut: the text produced so far is returned with finish_reason "length" and billed on the provider's usage report where the provider gives one, otherwise on an estimate never above max_tokens; for a model whose reasoning is not streamed, at the held output budget. Cancellation messages are not supported: a call the client stops waiting for without disconnecting runs to completion or its deadline and is billed. With no key, the call is paid with x402 in USDF (signature transfer) or USDG (signed transfer), as POST /x402/v1/chat/completions: without a payment it returns isError with the payment requirements (x402Version, resource, accepts) as structuredContent; sign one accept and call again with the payment in _meta["x402/payment"], the payment argument or the PAYMENT-SIGNATURE header. The quote is the call's maximum cost at the published price (prompt at one token per byte, output at max_tokens, capped as above, no minimum), paid up front; the call is charged what it uses at that price and the rest is refunded in the asset paid, the gateway paying the gas. A paid call runs to its end or its deadline whether or not the client waits and returns the receipt and _meta["x402/payment-response"]; at the deadline the text so far is returned with finish_reason "length" and a note, charged what it used and the rest refunded. A call no provider accepted before its deadline, or whose provider failed or ended with nothing, is refunded in full in the asset paid; so is one cut by the deadline after the provider accepted it, with nothing produced. A call with less than 20 s left before its deadline is refused before the payment is settled (deadline_too_close), nothing charged. MPP clients pay the same quote: the payment-required result also carries _meta["org.paymentauth/payment-required"] with evm charge challenges (USDG by signed transfer authorization, USDF by signature transfer); call again with the credential in _meta["org.paymentauth/credential"], and the paid result carries _meta["org.paymentauth/receipt"].
Annotations the server declares
- readOnlyHint: false
- destructiveHint: false
- idempotentHint: false
- openWorldHint: true
list_toolsTools you can call through POST /v1/tools/{id}, paid from the same balance and key as chat, each with its price in USDF (what it costs plus 5% at most) and the input it takes, orde…1 finding
Why it is in this group
- The name "list_tools" says "list": a word for reading.
- The description's first verb is "call": a word for a change.
- The server marks it read-only (readOnlyHint: true), but an annotation never lowers a class.
Findings
- Warn
The server marks "list_tools" read-only (readOnlyHint: true), and its own name, description or input give the class "write".
What this check looks forMatched text
annotations: {"readOnlyHint":true,"openWorldHint":false}; The name "list_tools" says "list": a word for reading.
Description, as the server wrote it Tools you can call through POST /v1/tools/{id}, paid from the same balance and key as chat, each with its price in USDF (what it costs plus 5% at most) and the input it takes, ordered by title. Every tool listed can be called now. q keeps the tools whose id, title or description has those words; a page holds up to 200, and page.next names the next one. No key needed.
Annotations the server declares
- readOnlyHint: true
- openWorldHint: false
quoteThe hold the chat tool places before running a request, in USDF and USD (output capped at 4096 tokens).No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
- The server marks it read-only (readOnlyHint: true), but an annotation never lowers a class.
Description, as the server wrote it The hold the chat tool places before running a request, in USDF and USD (output capped at 4096 tokens). It is an estimate, not a ceiling: a completed request is billed the provider's reported usage, normally less. Pass prompt or messages. No key needed; a request for attested hardware (a :private model id or provider.private), and any request from a Private-tier key, is quoted on its attested routes, at the model's price.
Annotations the server declares
- readOnlyHint: true
- openWorldHint: false
quote_toolWhat a call to a tool would hold for this input before it runs (its most it can cost), in USDF and USD, with the tool's price.No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
- The server marks it read-only (readOnlyHint: true), but an annotation never lowers a class.
Description, as the server wrote it What a call to a tool would hold for this input before it runs (its most it can cost), in USDF and USD, with the tool's price. It checks the input as the call would, and runs and holds nothing. No key needed.
Annotations the server declares
- readOnlyHint: true
- openWorldHint: false
receiptWith the API key that made the request: its receipt, with the usage, the price sheet version, the cost and, once settled, the settlement, its transaction and the rows behind the on…No findings
Why it is in this group
- Nothing in its name or description says what it does, so it is counted as a write.
- The server marks it read-only (readOnlyHint: true), but an annotation never lowers a class.
Description, as the server wrote it With the API key that made the request: its receipt, with the usage, the price sheet version, the cost and, once settled, the settlement, its transaction and the rows behind the onchain digest. With no key: the public receipt of any request id, x402 ones included, with its line in the usage log, the payment, the settlement and where its proof is (GET /x402/v1/receipts/{id}).
Annotations the server declares
- readOnlyHint: true
- openWorldHint: false
Only reads 2Claude Code: allow
agents_market_searchAgents, APIs and tools priced per call, in one market, every listing in the same shape: its id (svc_...), name, description, tags, site and logo, how it is called (GET or POST), wh…No findings
Why it is in this group
- The name "agents_market_search" says "search": a word for reading.
Description, as the server wrote it Agents, APIs and tools priced per call, in one market, every listing in the same shape: its id (svc_...), name, description, tags, site and logo, how it is called (GET or POST), what one call costs in USDF from this key's balance, input and output examples, and the data policy. Ordered by popularity (default), price or newest. No key needed to search; agents_market_call calls one.
Annotations the server declares
- readOnlyHint: true
- openWorldHint: true
list_modelsModels the gateway serves with their prices (USD per 1M tokens, the same figure in USDF), context window, output limits and whether a route is available right now.No findings
Why it is in this group
- The name "list_models" says "list": a word for reading.
Description, as the server wrote it Models the gateway serves with their prices (USD per 1M tokens, the same figure in USDF), context window, output limits and whether a route is available right now. No key needed.
Annotations the server declares
- readOnlyHint: true
- openWorldHint: false
This is not a safety rating, and no finding is not a safety guarantee. The groups and findings come from fixed checks of the tool definitions the server returned on the date shown, not from its code or what it does when called. How the checks work.
Install
Pinned to version 1.0.0. Values in angle brackets are yours to fill in.
claude mcp add --transport http gateway https://api.usdf.fi/mcpRun in a terminal.
Claude Code permissions
Allow the reads, ask before a change, deny the deletes. Paste into .claude/settings.json.
{
"permissions": {
"allow": [
"mcp__gateway__list_models",
"mcp__gateway__agents_market_search"
],
"ask": [
"mcp__gateway__quote",
"mcp__gateway__list_tools",
"mcp__gateway__quote_tool",
"mcp__gateway__x402_pay",
"mcp__gateway__agents_market_call",
"mcp__gateway__chat",
"mcp__gateway__balance",
"mcp__gateway__receipt"
],
"deny": []
}
}Tools that only read are allowed, tools that change things ask first, tools that delete or cancel are denied. It assumes the server is installed as gateway. Review it before you use it.