Onchain Agent Wallets logo

Onchain Agent Wallets

Manage Solana agent spending with on-chain allowances, local guardrails, x402 payments, revocation, and audit logs.

Install Onchain Agent Wallets

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "onchain-agent-wallets": {
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/onchain-agent-wallets"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Onchain Agent Wallets MCP server gives AI agents capped spending access to Solana tokens without exposing the owner's private key. It creates a vault, delegates an SPL Token allowance to an agent keypair, and applies local rules for transaction size, daily totals, recipients, hosts, expiry, and confirmation. Agents can pay recipients or x402 APIs, while owners can fund, monitor, change, withdraw, pause, or revoke access. Reach for it when an agent needs controlled Solana spending and the owner must retain custody and recovery control.

Use cases

  • Delegate a capped USDC budget to a research agent
  • Pay approved x402 APIs from a Solana allowance
  • Restrict agent payments to approved recipients and hosts
  • Pause or revoke an agent and recover vault funds
  • Review agent spending and refused transactions

Key features

  • On-chain SPL Token spending allowances
  • Solana vault funding and withdrawal
  • Per-transaction and rolling daily guardrails
  • Recipient and x402 host allowlists
  • Agent wallet status and spend audit logs
  • Metaplex Agent Registry deployment

Tools14

What Onchain Agent Wallets lets your agent do. Expand a tool for its parameters.

Self-reported~290 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

6/6 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · @three-ws/onchain-agent-wallets (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
npm downloads390Package downloads in the last 30 days.
Last commit13d agoMost recent push to the default branch.
Tools exposed14Callable tools this server registers over MCP.

How Onchain Agent Wallets works

What Onchain Agent Wallets does

Onchain Agent Wallets MCP server manages delegated spending for AI agents on Solana. The owner retains the vault and its funds, while the agent receives its own keypair and a capped SPL Token delegation. The delegation limits what the agent can spend at the token-program level; the agent does not receive the owner's private key or ownership of the vault.

The server supports token funding, allowance changes, withdrawals, revocation, ordinary recipient payments, and x402 API payments. It also records spending activity and refusals, reports current balances and limits, and can create an on-chain Metaplex Agent Registry identity for an agent. Runtime export produces the MCP configuration and identity card needed to operate the agent elsewhere.

How it works

Creating an agent wallet generates an agent keypair, creates a vault, applies an allowance, and configures guardrails. The owner can optionally transfer tokens into the vault and SOL to the agent for transaction fees. Agent spending reduces the delegated amount enforced by the SPL Token program. The agent cannot raise its own allowance, withdraw from the vault, or change the vault owner.

Local checks add controls around the on-chain ceiling. Supported rules include a maximum per transaction, a rolling 24-hour limit, recipient and x402 host allowlists, an expiration time, a pause switch, and a confirmation threshold. These checks depend on the server's local state and ledger, while the allowance and vault balance remain on-chain controls.

pay_x402 checks an endpoint before payment, determines the requested price, and then pays from the allowance when the request satisfies the configured limits. It rejects unsupported chains, cluster mismatches, non-denominated assets, and prices above its per-call maximum.

Setup and configuration

Install the package globally or run it with npx:

Terminal
npm install -g @three-ws/onchain-agent-wallets
npx -y @three-ws/onchain-agent-wallets

The server uses stdio and can be added to Claude Code with its MCP command or configured in an MCP client's mcp.json. No owner key is needed to start. Without OWNER_SECRET_KEY, owner actions return unsigned transactions for signing in a wallet; with that variable set, the server can sign for the owner.

Configuration variables are:

  • OAW_NETWORK: mainnet or devnet; defaults to mainnet.
  • SOLANA_RPC_URL: an HTTPS Solana RPC endpoint; the public endpoint is the default.
  • OAW_STATE_DIR: location for keypairs, guardrails, and the spend ledger; defaults to ~/.onchain-agent-wallets.
  • REQUIRE_CONFIRM: defaults to true and requires confirm:true for value-moving tools.

Tools and capabilities

Onchain Agent Wallets MCP server exposes tools in five practical groups:

  • Wallet custody: create wallets, fund vaults, approve or replace allowances, withdraw funds, revoke agents, and broadcast owner-signed transactions.
  • Guardrails: update spending limits, allowlists, expiry, confirmation thresholds, and pause state.
  • Agent spending: send tokens to a recipient or pay an x402 endpoint.
  • Visibility: inspect one wallet's live state, list wallets and balances, and read the spend ledger, including refusals.
  • Deployment: register an agent on-chain through the Metaplex Agent Registry and export its runtime configuration.

Limitations and notes

The local guardrails are not the same as the on-chain allowance. If the machine running the server is compromised, local rules may be bypassed, but the SPL Token delegation still limits the delegated spend. The documentation therefore recommends keeping the allowance to the smallest workable amount and topping it up when needed.

The agent needs some SOL for fees, but its keypair is intended to hold no other funds. Revocation can set the delegation to zero and may sweep the balance back to the owner in the same transaction. Changing the allowance requires an owner-signed approval. State, guardrails, and the spend ledger are stored locally and separately by network.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Onchain Agent Wallets

Onchain Agent Wallets is an MCP server that connects AI agents to Solana spending allowances and x402 APIs without exposing an owner's private key. Its main tools create and fund agent wallets, send payments, pay x402 endpoints, inspect balances and logs, update limits, and revoke access.

Install it with npm or run it directly with npx. Use `npm install -g @three-ws/onchain-agent-wallets` for a global installation, or `npx -y @three-ws/onchain-agent-wallets` for an ad hoc run. The README also provides MCP configuration for Claude Code and Cursor.

Yes, Onchain Agent Wallets works with Cursor through an `mcp.json` server entry. Configure the command as `npx`, pass `-y` and `@three-ws/onchain-agent-wallets` as arguments, and set `OAW_NETWORK` to `mainnet` or `devnet` as needed.

It limits spending with an SPL Token delegation enforced on-chain, plus local guardrails. You can set a total allowance, per-transaction and rolling daily caps, recipient and host allowlists, an expiry, a pause state, and a confirmation threshold. The agent cannot raise its own allowance.

Call `revoke_agent_wallet` to disable the delegation, optionally setting `withdraw:true` to sweep the balance home in the same transaction. The owner can also use `withdraw_from_vault` with or without a live delegation, while `set_guardrails` can pause spending immediately without an on-chain transaction.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOnchain Agent Wallets AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/onchain-agent-wallets?style=directory)](https://allmcps.com/mcp/onchain-agent-wallets)
HTML Embed
<a href="https://allmcps.com/mcp/onchain-agent-wallets"><img src="https://allmcps.com/api/badge/onchain-agent-wallets?style=directory" alt="Onchain Agent Wallets on AllMCPs" /></a>