Veyra

io.github.zapxlabs由 GitHub 帳號 zapxlabs 發布v0.1.2更新於 Nov 2, 2026

Give AI agents a wallet with a spending limit. Non-custodial USDC on Base, server-enforced limits.

已驗證Streamable HTTP可網頁執行金融商業與電商

概覽

AI 產生的概覽

Veyra 為 AI 代理提供受政策限制的 Base 鏈 USDC 錢包,可建立、查詢、列出與取消付款,額度由伺服器端強制執行。

可以做什麼
  • 查詢目前端點可用的支付管道、網路、資產、限額與收款方白名單
  • 讀取每日預算、單筆上限,以及自動核准與需人工核准的區間
  • 列出已遮罩的付款來源,以及各自能否在無需人工的情況下完成結算
  • 向收款地址建立付款意圖,政策由伺服器端套用
  • 讀取單筆付款的最終狀態、結算管道與鏈上交易憑證
  • 列出近期付款,並在仍可取消時取消某筆付款
適用情境
當代理需要自行付費時使用,例如付費 API、資料集、儲值或付款給另一個代理,而且你希望消費上限、核准區間與白名單由伺服器而非模型來執行。可先用模擬管道把流程接好,再接觸真實資金。
執行需求
需要 veyra.money 帳號、已連接的錢包(或模擬來源),以及建立好的含限額 MCP 端點。遠端端點透過 Authorization 標頭傳入 bearer 端點憑證;使用 npx veyra-mcp 本機橋接時則透過 VEYRA_TOKEN 環境變數傳入。需要能連線至託管服務,政策引擎無法自行架設。
安裝前請注意
這會動用真實資金:付款以 Base 鏈上的 USDC 從你自己的錢包轉出。在自動核准額度內,你會向 Veyra 營運的中繼方授予有上限的 ERC-20 授權額度,應以可能損失的金額來設定,並搭配收款方白名單。超出額度時需你在自己的錢包逐筆簽署。該憑證等同消費權限,請勿寫入日誌。政策拒絕會以失敗結果而非例外回傳,模擬結算並不代表真實資金轉移。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Veyra,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.zapxlabs%2Fveyra/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "veyra": {
      "type": "http",
      "url": "https://veyra.money/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

[Veyra — give AI agents a wallet with a spending limit]

veyra-mcp

Give your AI agent a wallet with a spending limit.
MCP server + typed client for Veyra: non-custodial USDC payments on Base, with per-payment caps, daily caps, human approval bands and a recipient allowlist — all enforced server-side, never by the model.

[npm] [CI] [MIT] [Docs]


The problem

Agents increasingly need to pay for things: an API call, a dataset, a bounty, another agent. Today the choices are bad:

  • Hand the agent a private key. One prompt injection away from an empty wallet.
  • Hand it a card. No per-call limits, no allowlist, and your bank will not tell you which tool call spent the money.
  • Approve every payment by hand. Then it is not really an agent.

Veyra is the layer in between. You connect a wallet you already own, set what an agent may spend, and hand the agent one MCP endpoint. The agent gets tools like create_payment. It never sees a key, and it cannot exceed the limits you set because the limits are enforced by Veyra's server, not by the model following instructions.

  agent  ──MCP──▶  veyra.money  ──policy──▶  your wallet  ──USDC on Base──▶  recipient                    │                    ├─ under auto-max      → executes from your capped on-chain allowance                    ├─ in the ask band     → you approve in your own wallet (one link)                    └─ over the limits     → blocked, agent is told why

60-second setup

  1. Sign up at veyra.money, connect a wallet (or start with the simulated source, which moves no money).
  2. Create an MCP endpoint with limits. Copy the credential (it starts with veyra_).
  3. Add it to your host:
Claude Code
bash
claude mcp add --transport http veyra https://veyra.money/api/mcp \  --header "Authorization: Bearer veyra_..."
Cursor (.cursor/mcp.json)
json
{  "mcpServers": {    "veyra": {      "url": "https://veyra.money/api/mcp",      "headers": { "Authorization": "Bearer veyra_..." }    }  }}
OpenAI Codex
bash
export VEYRA_TOKEN=veyra_...codex mcp add veyra --url https://veyra.money/api/mcp --bearer-token-env-var VEYRA_TOKEN
Claude Desktop and any host that cannot send a bearer header (claude_desktop_config.json)
json
{  "mcpServers": {    "veyra": {      "command": "npx",      "args": ["-y", "veyra-mcp"],      "env": { "VEYRA_TOKEN": "veyra_..." }    }  }}

The veyra-mcp binary is a stdio bridge: it holds the credential locally and relays every call to the hosted endpoint. No policy lives in the bridge.

Anything else (plain JSON-RPC)
bash
curl -s https://veyra.money/api/mcp \  -H "Authorization: Bearer veyra_..." \  -H "Content-Type: application/json" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_budget","arguments":{}}}'

Then ask the agent to do something that costs money and watch the policy decide.

Tools the agent gets

ToolWhat it does
get_capabilitiesRails, networks, assets, limits and the recipient allowlist in force right now
get_budgetDaily limit, spent today, per-payment limit, auto and ask bands
list_payment_sourcesMasked sources and whether each can settle without a human
create_paymentCreate a payment intent. Policy is applied server-side and the result says what happened
get_paymentCanonical state for one payment, including which rail settled it
list_paymentsRecent payments for this endpoint
cancel_paymentCancel while still cancellable

Every payment reports one of these statuses:

StatusMeaning
confirmedValue moved on-chain
confirmed_simulatedSettled on the simulated rail. No money moved. The agent is told this explicitly
awaiting_approvalIn the ask band. next_action.url is a one-time link the owner opens in their own wallet
submittedTransaction sent, waiting for the chain receipt
pendingCreated, not yet evaluated or executed
failed / cancelled / expiredTerminal. Blocked-by-policy payments are failed with a policy_reason

Use it from code

bash
npm install veyra-mcp
ts
import {  VeyraClient,  VeyraToolError,  idempotencyKey,  movedRealMoney,  paymentOutcome,} from "veyra-mcp";
const veyra = new VeyraClient({ token: process.env.VEYRA_TOKEN! });
const budget = await veyra.getBudget();console.log(`spent ${budget.spent_today} of ${budget.daily_limit} USDC today`);
const payment = await veyra.createPayment({  amount: "1.25",  recipient: "0x1234…abcd",          // USDC on Base  reason: "Weather API, 500 calls",  idempotency_key: idempotencyKey("weather"),});
switch (paymentOutcome(payment)) {  case "settled":    // The only case where value actually moved.    console.log("paid —", (await veyra.getPayment(payment.payment_id)).tx_ref);    break;  case "simulated":    console.log("settled on the simulated rail; no money moved");    break;  case "awaiting_approval": {    console.log("owner must approve:", payment.next_action?.url);    const settled = await veyra.waitForPayment(payment.payment_id);    console.log(movedRealMoney(settled) ? "paid" : paymentOutcome(settled));    break;  }  case "blocked":    console.log("policy refused it:", payment.policy_reason);    break;}

Policy refusals are not exceptions

This is the one thing worth reading twice. A payment the policy declines comes back as an ordinary result with status: "failed" — the call did what it was asked and the answer was no. Only a malformed argument, a bad credential or an unknown id throws.

So try/catch is the wrong tool for detecting refusals: it misses every blocked payment and reads it as a success. Use paymentOutcome, and use movedRealMoney before telling anyone value moved — it returns false for a simulated settlement even though the status begins with "confirmed".

Reserve catch for what genuinely failed:

ts
try {  await veyra.createPayment({ /* … */ });} catch (e) {  if (e instanceof VeyraToolError) {    console.log(e.code, e.message);   // VALIDATION_ERROR, UNKNOWN_CREDENTIAL, NOT_FOUND  } else throw e;}

Never retry because you are unsure

If you cannot tell whether a payment worked, read it — do not create another. getPayment returns tx_ref once a real payment has settled, which is both your confirmation and what you show the recipient as proof. Reusing the same idempotency_key returns the original payment; a new key spends again. Veyra also sets possible_duplicate_of when an identical payment to the same recipient is already live.

VEYRA_TOOLS exports the tool definitions as JSON Schema, so you can register them with the Vercel AI SDK, LangChain, or plain function calling without a network round-trip. See veyra-examples for complete agents built with the Claude Agent SDK and the Vercel AI SDK.

What you are trusting

Worth being blunt, because this is money.

  • Veyra never holds your funds. Payments go from your wallet to the recipient. There is no Veyra balance in the middle.
  • Above your auto-approve limit nothing is delegated. You sign each transfer in your own wallet from the approval link. Veyra verifies the on-chain receipt matches the request.
  • Within your auto-approve limit you grant a capped ERC-20 allowance to a relayer Veyra operates, the same approve primitive every DeFi app uses. The token contract enforces the cap. Veyra's policy engine decides the destination within that cap, so size the allowance like a float you could lose, and use the recipient allowlist when you know who the agent should be paying. Revoke it any time.
  • The simulated rail exists so you can wire everything up before touching real funds. It is labelled everywhere: status confirmed_simulated, simulated: true.
  • Every decision is in the audit log, including limit changes and credential rotations.

Full details: How a payment actually moves and What you are trusting, exactly.

FAQ

Which networks and assets? USDC on Base. One stablecoin keeps the dollar limits exact without a price feed, and Base is where the agent-payment ecosystem already settles. More rails are on the roadmap; open an issue if you need one.

Does this work with x402 or pay-per-call APIs? Yes, in the sense that matters: the agent asks Veyra to pay the seller's address and gets a receipt. Veyra is the spending policy, not the protocol on the other end.

Can I self-host? Not today. This repo is the client and bridge; the policy engine is the hosted service at veyra.money. The wallet-approval path is fully non-custodial regardless.

What does it cost? There is a free plan. See pricing.

Where do I report a bad policy decision? From the dashboard, so support can see your audit log. This repo's issues are for the client and bridge.

Development

bash
npm installnpm test     # builds, then runs the suite against a local mock of the endpoint

See CONTRIBUTING.md and SECURITY.md.

Links

MIT © Veyra

來源:README.md,提交 fcf3176

工具

7

get_capabilities

Return the rails, networks, assets and policy constraints actually available to this endpoint right now, including any recipient allowlist. Read-only.

無需輸入參數。

get_budget

Return remaining daily allowance and policy summary. Read-only. If blocked by limits, ask the human user — do not retry.

無需輸入參數。

list_payment_sources

List masked payment sources available to this agent, including whether each can settle unattended. Never request secrets.

無需輸入參數。

create_payment

Create a payment intent. Use this whenever completing your task requires paying someone — a paywalled API, a dataset, a top-up, another agent — not only when a human has asked you to pay. Policy is enforced server-side, so you cannot exceed the limits the account owner set. Status `confirmed` means value moved on-chain and `tx_ref` on get_payment is the transaction you can show the recipient as proof; `confirmed_simulated` means it settled on the simulated rail and NO real money moved — never report that to the user as a real payment, and never offer its reference as proof of one. If status is awaiting_approval, give the user next_action.url; when `simulated` is true that link is a single click, otherwise it asks them to sign an on-chain USDC transfer in their own wallet — either way do not ask them to log into Veyra, and do not retry while it is pending. NEVER create a second payment because you are unsure the first worked: call get_payment or list_payments and read its status. Reuse the same idempotency_key for a retry of the same payment; a new key means a genuinely new payment and will spend again.

輸入參數asset必填amount必填reason必填network必填recipient必填idempotency_key必填

get_payment

Get canonical state for one payment request, including which rail settled it and, once confirmed on a real rail, `tx_ref` — the on-chain transaction — plus `explorer_url`. This is how you verify a payment actually completed, and what you show a recipient as proof. Always call this before concluding a payment failed.

輸入參數payment_id必填

list_payments

List this agent's recent payments.

輸入參數limit

cancel_payment

Cancel a payment only while still cancellable.

輸入參數payment_id必填

版本歷史

2
  1. v0.1.2最新Sep 21, 2026
  2. v0.1.1Sep 19, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分