Use H081 with Claude

Add the H081 bank to Claude Code or Claude Desktop and use it in plain words: balances, deposits, withdrawals, budgets and loans.

In plain words

Claude can use your H081 bank for you. You ask in plain words, like "what is my balance?" or "send 2 USDG to my other wallet", and Claude does it.

This works through MCP (Model Context Protocol): a standard way to let Claude use tools on your computer. H081 gives Claude a set of bank tools. The tools run on your own machine with your agent key. Claude asks the tools to do things; it never sees the key itself.

Setting it up is one command for Claude Code, or one small settings file for Claude Desktop.

Before you start

Do steps 1 to 3 of Getting started first: Node.js 20.11 or newer, an agent key, and a little SOL and USDG in the agent wallet. If you have not made the key yet:

any terminal
npx -y @h081lll/agent init --rpc <your Solana RPC URL>

At the end, init prints a ready-made line for Claude Code with your real key path. That line is all you need for the next section.

Set up Claude Code

  1. Add the H081 tools

    Copy the claude mcp add line that init printed and run it in a terminal. Or fill in your two values here: the full path to your key file and your RPC URL.

    macOS / Linux
    claude mcp add --scope user h081 -e H081_SOLANA_KEYPAIR=/Users/you/.h081/agent.json -e H081_RPC_URL=<your RPC> -- npx -y @h081lll/agent mcp
    Windows (not WSL)
    claude mcp add --scope user h081 -e H081_SOLANA_KEYPAIR=C:\Users\you\.h081\agent.json -e H081_RPC_URL=<your RPC> -- cmd /c npx -y @h081lll/agent mcp

    --scope user makes the tools work in every folder, not only the one you ran it in. On Windows, cmd /c before npx is needed; the line init prints already has it.

  2. Check that it is connected

    any terminal
    claude mcp list
    you should see something like
    h081: npx -y @h081lll/agent mcp - ✓ Connected

    The important part is h081 and Connected.

  3. Ask a first, read-only question

    Start a new Claude Code session and ask:

    prompt
    Show me the H081 protocol info and my balance.

    Claude should use h081_protocol_info and h081_bank_balance. Both only read; nothing is sent.

Set up Claude Desktop

  1. Open the settings file

    In Claude Desktop, open Settings › Developer › Edit Config. This opens a file called claude_desktop_config.json.

  2. Add the H081 server

    Paste this in, with your own key path and RPC URL. If the file already has an "mcpServers" section, add the "h081" part inside it.

    claude_desktop_config.json · macOS
    {
      "mcpServers": {
        "h081": {
          "command": "npx",
          "args": ["-y", "@h081lll/agent", "mcp"],
          "env": {
            "H081_SOLANA_KEYPAIR": "/Users/you/.h081/agent.json",
            "H081_RPC_URL": "https://YOUR-RPC-URL"
          }
        }
      }
    }
    claude_desktop_config.json · Windows
    {
      "mcpServers": {
        "h081": {
          "command": "cmd",
          "args": ["/c", "npx", "-y", "@h081lll/agent", "mcp"],
          "env": {
            "H081_SOLANA_KEYPAIR": "C:\\Users\\you\\.h081\\agent.json",
            "H081_RPC_URL": "https://YOUR-RPC-URL"
          }
        }
      }
    }

    On Windows the command is cmd with /c first, and every backslash in the path is doubled, because the file is JSON.

  3. Restart Claude Desktop and ask

    Quit Claude Desktop completely and open it again. Then ask the same first question:

    prompt
    Show me the H081 protocol info and my balance.

If it does not connect

No h081 tools in Claude Code
It was probably added without --scope user, so it only works in one folder. Remove it, then add it again with the line from step 1.
The first start times out
The first run downloads the package. Run this once in a terminal, then restart Claude: npx -y @h081lll/agent fetch-circuits.
"no file at …"
The key path is wrong. Check it, or leave H081_SOLANA_KEYPAIR out to use ~/.h081/agent.json.
"429 Too Many Requests"
The public Solana RPC is limiting you. Put your own RPC URL in H081_RPC_URL.
remove the server (Claude Code)
claude mcp remove h081

What Claude can do

Claude gets thirteen tools. You never type their names; Claude picks them from what you ask. The last column matters most: it says whether a tool can move money and whether it shows a plan first.

ToolWhat it doesMoves money?
h081_bank_balanceYour private balance, the wallet's SOL and USDG, and your budgetsNo, read-only
h081_protocol_infoFacts about the bank: limits, fees, your addressesNo, read-only
h081_loan_quotePrices a loan from a lender's terms codeNo, read-only
h081_bank_depositAgent wallet → bankYes, sends when called
h081_bank_withdrawBank → any wallet, sent by the relayerYes, sends when called
h081_transferBank → another account's h081-address: code, privatelyYes, sends when called
h081_payPays from a budget your agent holdsYes, sends when called
h081_loan_borrowPledges a budget to a lender and makes the code they fund againstYes, sends when called
h081_allowance_grantGives a sub-account or another agent a budgetPlan first, sends only with confirm: true
h081_allowance_reclaimTakes back what is left of a budget you gavePlan first, sends only with confirm: true
h081_allowance_delegatePasses part of a budget on to another agentPlan first, sends only with confirm: true
h081_lendThe lender's side of a loanOpen, fund, settle and close: plan first. Status is read-only. Claim, collect and sweep send when called.
h081_stakeStakes H081 for larger relayed withdrawalsView is read-only; the others send when called

Plan first, with Claude

On the command line, nothing is sent without --yes. With Claude, it works a little differently, and it is worth knowing how:

  • The budget tools (give, take back, pass on) and the lender's open, fund, settle and close steps have a real plan step. Claude calls them once and gets a plan back; nothing is sent. Only a second call with confirm: true sends it. Ask Claude to show you that plan before it confirms.
  • Deposit, withdraw, transfer, pay, borrow, staking and the lender's claim, collect and sweep send as soon as Claude calls them. So ask Claude to tell you the plan in words (amount, fee, what arrives, who sends it) and to wait for your "yes" before it calls the tool.
  • Your Claude app normally asks your permission before it runs a tool, unless you told it to always allow that tool. Do not choose "always allow" for the tools that move money.

Example prompts

Copy one, change the numbers and addresses, and paste it into Claude. Wallet addresses below are shortened (9xQe…); use the full address.

Check

prompt
What is my H081 balance? Include the wallet's SOL and USDG.
  • "Show me the H081 protocol info: deposit limits, the relayer fee, and whether deposits are paused."
  • "What is my h081-address: code? I want someone to pay me privately."
  • "List my budgets: how much is left in each, and which ones I can take back."

Deposit

prompt
Deposit 5 USDG into my H081 account. Show me the plan first and wait for my yes.
  • "How much USDG is in the agent wallet? Deposit all but 1 USDG, after showing me the plan."
  • "Is there room in the bank for a 50 USDG deposit right now?"

Withdraw

prompt
Withdraw 2 USDG from my H081 account to 9xQe… (a fresh wallet that never touched the agent). Tell me the fee and what arrives first, and wait for my yes.
  • "What would it cost to withdraw 10 USDG through the relayer? Do not send anything."
  • "Does a wallet that has never held USDG cost extra to withdraw to?"

Give a budget

prompt
Give sub-account 1 a budget of 20 USDG: at most 5 USDG a day, at most 2 USDG per payment, for 30 days. Show me the plan first.
  • "Give the agent with this code a 10 USDG budget for 7 days: h081-address:…. Show me the plan first."
  • "Take back what is left of budget 12345. Show me how much comes back first."

More about budgets: Allowances.

Pay and transfer

prompt
Pay 2 USDG from my budget to h081-address:… privately. Tell me which budget you will use and wait for my yes.
  • "Send 3 USDG from my main balance to h081-address:… privately. Wait for my yes."
  • "Pay 1 USDG from my budget to the wallet 9xQe…. Tell me the fee first."

Loans

prompt
A lender gave me this terms code: h081-loan-terms:… What could I borrow against a 100 USDG budget? Just the quote, do not borrow yet.
  • "Open a loan slot as a lender with a 40% share. Show me the plan; do not open it yet."
  • "Here is the borrower's code: h081-loan-proof:…. Show me what funding it would cost me, and wait for my yes."
  • "Show the status of my loans: what is repaid, what is still owed, what I can collect."

More about loans: Loans.

Example conversations

These show the shape of a good session: Claude explains the plan and waits for your "yes". Claude's exact wording, and the numbers on your account, will differ.

Example conversation · wording variesA first deposit
  1. You

    Deposit 5 USDG into my H081 account. Show me the plan first and wait for my yes.

  2. Claude

    uses h081_protocol_infouses h081_bank_balance

    Your agent wallet holds 5 USDG and 0.05 SOL, and deposits are open.

    The plan: deposit 5 USDG from the agent wallet into your private balance. There is no H081 fee; it needs about 0.02 SOL for network fees and temporary rent, which mostly comes back. A deposit is public: the chain will show your agent wallet and the 5 USDG. After that, your balance is private.

    Shall I go ahead?

  3. You

    Yes.

  4. Claude

    uses h081_bank_deposit

    Done. 5 USDG is now in your private balance. Transaction signature: 4vJ…

Example conversation · wording variesA withdrawal to a fresh wallet
  1. You

    Withdraw 2 USDG to my wallet.

  2. Claude

    Which wallet should it go to? Please use a fresh one that has never touched the agent. Sending it back to the wallet that deposited links the two.

  3. You

    9xQe… It is brand new.

  4. Claude

    uses h081_protocol_info

    The plan: withdraw 2 USDG to 9xQe… through the H081 relayer. The fee is 0.05 USDG, so 1.95 USDG arrives. A brand-new wallet has no USDG account yet, so the relayer adds 1 USDG to create it, and 0.95 USDG arrives.

    The relayer sends it, so the chain shows that 9xQe… received the money, but not your agent wallet. Shall I send it?

  5. You

    Yes, send it.

  6. Claude

    uses h081_bank_withdrawuses h081_bank_balance

    Sent. 9xQe… received 0.95 USDG. Signature: 2Hn…

    You have 3 USDG left in your private balance.

Example conversation · wording variesGiving a budget, with the built-in plan
  1. You

    Give sub-account 1 a budget of 20 USDG: at most 5 USDG a day and 2 USDG per payment, for 30 days. Show me the plan first.

  2. Claude

    uses h081_allowance_grant

    Here is the plan. Nothing has been sent yet.

    20 USDG from your private balance to sub-account 1, with a daily cap of 5 USDG, at most 2 USDG per payment, ending in 30 days. You stay the owner and can take back what is left at any time. It needs about 0.1 SOL for network fees and rent, and the first time, a one-time download of the budget proving files. The chain will see that your agent wallet made a grant, but not the amount, the rules or who got it.

    Shall I send it?

  3. You

    Yes.

  4. Claude

    uses h081_allowance_grant

    Done (sent with confirm: true). Sub-account 1 now has a 20 USDG budget. Its id is in your balance, if you want to take it back later.

Example conversation · wording variesBorrowing against a budget
  1. You

    A lender gave me h081-loan-terms:…. What could I borrow against a 100 USDG budget, over 30 days?

  2. Claude

    uses h081_loan_quote

    These terms route 40% of every payment from the budget to the lender. Against a 100 USDG budget you can borrow at most 40 USDG. The 0.25% origination fee is 0.10 USDG, so 39.90 USDG would reach your agent wallet.

    The lender can never receive more than the 40 USDG it lent. Anything paid beyond that goes back to your payout account.

    This was only a quote. Borrowing pledges a 100 USDG budget from your private balance and sends when I call it. Do you want me to go ahead?

  3. You

    Yes, borrow 40 USDG over 30 days, unlocking over 30 days.

  4. Claude

    uses h081_loan_borrow

    Done. The budget is pledged. Give the lender this code: h081-loan-proof:…

    Nothing is borrowed until the lender funds it. When they do, 39.90 USDG arrives in your agent wallet.

Tips

Keep a small balance

Treat the agent like a wallet in your pocket, not a savings account. Keep only what Claude should be able to spend. You can also set hard limits that the tools enforce before anything is proven. They are in base units, where 1 USDG = 1000000:

SettingLimits each
H081_MAX_DEPOSITdeposit
H081_MAX_PAYpayment from a budget
H081_MAX_GRANTbudget given or passed on
H081_MAX_LENDloan funded as a lender
Claude Code, with limits: 10 USDG per deposit, budget and loan, 2 USDG per payment
claude mcp add --scope user h081 -e H081_SOLANA_KEYPAIR=/Users/you/.h081/agent.json -e H081_RPC_URL=<your RPC> -e H081_MAX_DEPOSIT=10000000 -e H081_MAX_PAY=2000000 -e H081_MAX_GRANT=10000000 -e H081_MAX_LEND=10000000 -- npx -y @h081lll/agent mcp

In Claude Desktop, add the same names and values to the "env" section. To change them in Claude Code, remove the server and add it again.

Ask for the plan, every time

Say "show me the plan first" in every request that moves money, or paste the habit prompt at the start. Read the fee, what arrives, and who the chain will see. Then say "yes".

What Claude cannot do

  • See or copy your key. The tools use ~/.h081/agent.json on your computer; no tool returns it. Backup and restore exist only on the command line.
  • Go past the bank's limits. At most 1,000 USDG per deposit and 10,000 USDG in the whole bank for now. Relayed withdrawals above 100 USDG need H081 staked.
  • Quietly send it another way. If the relayer is down, a withdrawal is not sent and Claude gets an error. The agent key sends it itself only if you ask for a direct withdrawal, which shows your agent wallet as the sender.
  • Borrow on its own. A loan needs a real lender who funds it. Until then, nothing is borrowed.
  • Pass on part of a budget yet. The proving files for that step are not published yet, so sending it is refused before anything is signed.
  • Undo a payment. Once sent, a transaction is final. That is why the plan comes first.

Next steps

New here? The 5-minute quickstart does a first private payment end to end. The package is @h081lll/agent on npm. Questions: @H081CAP on X.