Qubic Agent Wallet
Sends payment approval requests to Telegram with Approve, Deny, and Pause controls, letting the user review and decide on pending QU or x402 payments from their phone.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Qubic Agent Wallet
Let AI agents pay in QU, under rules a human sets and the agent cannot change.
Qubic Agent Wallet is an open-source MCP server. It gives assistants such as Claude, Cursor or Copilot a wallet on the Qubic network. They can pay x402 endpoints and send QU, but only within spending caps, allowlists and human approvals that you control.
Non-custodial. The seed stays in your OS keychain, on your machine. No server, ours included, ever holds a key or signs anything.
Guardrails enforced in code, outside the AI. Caps, allowlists and the pause are checked before anything is signed. No agent tool can approve a payment, change the policy or lift the pause.
Human approval from the terminal (with a passphrase) or from Telegram (Approve / Deny / Pause buttons).
Never pays twice, never loses track. Every transaction is journaled before it is sent and settled from the chain afterwards.
Status: alpha. It works end to end, and real mainnet payments went through on 2026-10-30 (paid by the agent on its own, then after a Telegram approval), but no independent audit has been done. Fund the wallet only with what you are ready to lose, and keep the default low limits.
Built by PrimeQubic on top of Q+Pay's x402-qubic.
How it works
AI assistant ──MCP──▶ qubic-agent-wallet (on your machine)
├─ Policy: caps, allowlists, pause (signed, the agent can't edit it)
├─ Approval queue ──▶ Telegram / terminal (you)
├─ Guarded signer: signs once, only what was authorized
├─ x402 client (official @x402/core + x402-qubic)
└─ Local journal (SQLite) + reconciliation from the chainThe agent calls
pay_x402(orsend_qu).The wallet reads the price from the
402 Payment Requiredanswer and checks your policy. The payment is then authorized, sent to you for approval, or refused.If authorized, it signs one Qubic transaction for the exact amount, to the QPAY contract (or the approved recipient). It journals the transaction id, sends the transaction, waits for its tick and returns the resource to the agent.
If anything is uncertain (a network timeout, a crash), the wallet does not guess. It reads the outcome from the chain once the transaction's target tick has passed. A Qubic transaction can only execute at that tick.
Related MCP server: AgenticBTC MCP
Requirements
Node.js 22.16+
macOS, Windows, or Linux with a Secret Service keychain (GNOME Keyring, KWallet). Headless Linux, such as a Raspberry Pi without a desktop, is not supported yet: see Known limitations.
Install
git clone https://github.com/PrimeQubic-Labs/qubic-agent-wallet.git
cd qubic-agent-wallet
npm install
npm run buildQuick start
Run these commands yourself, in a real terminal. Approval and policy commands refuse to run without one, so an agent cannot run them for you.
# Sandbox (fake QU) is the default. For real QU: export QAW_NETWORK=mainnet
node dist/cli/main.js passphrase set # 12+ characters, never typed anywhere else
node dist/cli/main.js policy init # low default limits
node dist/cli/main.js policy allow-host useqpay.com # allowlist an x402 seller
node dist/cli/main.js wallet create # shows the seed ONCE: write it on paperThen send a small amount of QU to the address wallet create printed.
Connect it to your assistant
Claude Desktop: add this to claude_desktop_config.json:
{
"mcpServers": {
"qubic-agent-wallet": {
"command": "node",
"args": ["/absolute/path/to/qubic-agent-wallet/dist/mcp/main.js"],
"env": { "QAW_NETWORK": "mainnet" }
}
}
}Claude Code:
claude mcp add qubic-agent-wallet -e QAW_NETWORK=mainnet -- node /absolute/path/to/qubic-agent-wallet/dist/mcp/main.jsAny MCP client that can start a stdio server works the same way.
Approve from your phone (optional)
In Telegram, open @BotFather, send
/newbot, and copy the token it gives you.Run
node dist/cli/main.js telegram setup, then paste the token and send the bot the 8-digit code that is shown.
Approval requests then arrive on Telegram while the MCP server runs, or while you run telegram listen. Only your Telegram account is obeyed. Resuming after a pause is terminal-only.
Tools the agent gets
Tool | What it does |
| Network, pause state, what the policy still allows today, pending approvals |
| Read-only view of your limits |
| Fetch a resource and pay its x402 price in QU if your policy allows it. After an approval, call it again with |
| Send QU to a Qubic identity, under the same policy |
| Status and history |
There is no tool to approve, deny, change the policy, resume or export a key, and the tests check that none exists.
Commands (for you, not the agent)
passphrase set | change Approval passphrase
pending Payments waiting for approval
approve <id> | deny <id> [why] Decide (approve needs the passphrase)
history [limit] Recent payments
channels Prepaid channels: deposits, vouchers, credit left
unblock <host|seller> Allow payments again to a seller that took QU without delivering (passphrase)
journal check Check that the journal was not changed outside the wallet
journal seal Accept the journal as it is now, after checking it (passphrase)
policy init | show Create / show the policy
policy set <field> <value> Change a limit (passphrase)
policy allow-recipient <id> Allowlist a recipient (passphrase)
policy allow-host <host> Allowlist an x402 host (passphrase)
policy remove-recipient | remove-host
pause Block every payment now (anyone, even the agent, may pause)
resume Lift the pause (passphrase)
wallet create | import | address Wallet key (seed in the keychain only)
telegram setup | status | off | listen
reconcile Settle payments left in doubt, from the chainDefault policy, in QU: 100,000 per payment, 1,000,000 per day, 500,000 per day per recipient or host, human approval above 20,000. Unknown recipients and hosts need approval. The first x402 payment or channel deposit to a seller always needs approval, even on an allowlisted host; once that seller has delivered, later payments follow the policy. Q+Pay charges 0.75% per x402 payment, with a 100 QU minimum.
Security model
Agent | Protection |
Only has the MCP tools (Claude Desktop, chat) | Full. It can only ask: the code applies the rules |
Has a shell and was tricked by a prompt injection | Good. Approving needs a real terminal and your passphrase, and a policy edited by hand is detected and blocks everything |
Has a shell and actively tries to get around the wallet under your OS account | Limited. It can read what the wallet reads, keychain included. Run the wallet under a separate OS user or on another device (Known limitations) |
Other guarantees:
One signature per payment, even across processes: a payment is claimed in the database before signing.
Budget accounting. The budget is released only when the chain proves nothing moved. In doubt, it stays reserved and the agent is told not to pay again.
New sellers. The first payment to a seller always needs your approval, even on an allowlisted host such as a marketplace. A seller that took QU without delivering gets nothing more until you
unblockit.Tamper-evident journal. The journal's digest is kept in the keychain. If anything edits the journal file behind the wallet's back (to free budget or lift a block), every payment stops until you check it and run
journal seal.No requests to your own network.
pay_x402refuses local and private addresses, including names that resolve to one, checked at connection time.Third-party content. What a paid resource returns is handed to the agent as data, and the tool description tells it never to follow instructions found there.
Known limitations
Headless devices (Raspberry Pi, servers): no OS keychain. An encrypted-file key store is planned.
Remote mode: the agent and the wallet must run on the same machine today. A network transport with authentication, so the wallet can live on a separate, always-on device, is planned. It is also the strongest isolation.
Prepaid channels have no refund in the protocol. A deposit belongs to the seller once paid; unused credit comes back only if the seller refunds it. Keep
maxChannelDepositmodest. Credit is counted only from deposits the seller accepted.No independent audit. The author's own internal security review lists what was checked and fixed; no third party has reviewed the code.
Taxes
In many countries, including France, paying for a service with crypto is a taxable disposal, so each payment your agent makes may count. This wallet does not compute taxes. QubicFlow, by AndyQus, tracks any Qubic address and exports to CoinTracking, Koinly and Blockpit.
Upgrading
git pull && npm install && npm run buildIf you installed before the journal was sealed (2026-11-03), run node dist/cli/main.js journal seal once. Until then, every payment is refused. A new install seals itself.
Development
npm test # Vitest
npm run typecheckThe tests run the real @x402/core client and the real x402-qubic scheme against fake sellers and a fake chain. A sandbox is available at sandbox.useqpay.com (QAW_NETWORK=sandbox, the default).
Licenses
This project: MIT.
It depends on
@qubic-lib/qubic-ts-libraryfor signing. That library uses the Qubic Anti-Military License: MIT-like, but it forbids any military use. You must respect that restriction.Other dependencies (
x402-qubic,@x402/core,@modelcontextprotocol/sdk,@napi-rs/keyring,undici,zod) are MIT or Apache-2.0.
Disclaimer
This software moves real money and comes with no warranty (see LICENSE). It is a personal, non-custodial tool, not a financial service. You are responsible for your keys, your limits and what your agent buys.
This server cannot be deployed
Maintenance
Related MCP Connectors
Give AI agents a wallet with a spending limit. Non-custodial USDC on Base, server-enforced limits.
Crypto wallet for AI agents: balances, payments, swaps and trading with owner controls.
Wallet and payments for AI agents: auto-pay x402 APIs in USDC on XDC, within on-chain limits.
Give your AI agent an x402 wallet: discover and pay for services in USDC, or earn from your own.
Related MCP Servers
- AlicenseAqualityAmaintenanceA budget-bound x402 payment wallet for AI agents: it autonomously pays HTTP 402 payment-gated URLs across every major chain (EVM, Solana, and many non-EVM families). Self-custodial and backendless, your key, your RPC, with spend caps enforced before any on-chain send.89MIT
- AlicenseAqualityBmaintenanceConnects AI agents to Bitcoin payment rails with owner-defined spending policies and limits.2619 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to propose wallet payments while a local, human-authored policy decides whether each transaction is approved, requires human confirmation, or is refused, and records every decision in a signed, append-only ledger.-
- AlicenseNot gradedqualityBmaintenanceGives an AI agent a Stellar wallet for x402 payments whose spending budget is installed and enforced on-chain by a Soroban smart contract, so overspending is refused by the contract even if the agent process is compromised, replaced, or restarted. Budgets are declared as scoped, non-rounding data (e.g. 5 USDC per rolling day) that the agent can spend against but cannot alter or redirect.MIT