Onchain Agent Wallets

v0.1.1
io.github.nirholas/onchain-agent-wallets Checked 14 hours ago Published 1 month ago

Give an AI agent a Solana spending allowance instead of your key.

Values you need

VariableWhat it is
OWNER_SECRET_KEYoptional secret Owner secret key, base58 or a JSON byte array. Optional: without it every owner action is returned as an unsigned transaction for Phantom, Solflare, Backpack, or a Ledger to sign.
OAW_NETWORKoptional Cluster: mainnet or devnet. Defaults to mainnet. State is kept per network, so a devnet rehearsal never touches mainnet agents. Default: mainnet
SOLANA_RPC_URLoptional HTTPS Solana RPC endpoint. Defaults to the public endpoint for the configured network; bring your own (Helius / Quicknode / Triton) for production.
OAW_STATE_DIRoptional Where agent keypairs, guardrails, and the spend ledger are stored. Defaults to ~/.onchain-agent-wallets, written 0600 inside a 0700 directory.
REQUIRE_CONFIRMoptional Refuse to broadcast anything that moves value until the call is re-issued with confirm:true. Default true. Default: true

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add onchain-agent-wallets -- npx -y @three-ws/onchain-agent-wallets@0.1.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "onchain-agent-wallets": {
      "args": [
        "-y",
        "@three-ws/onchain-agent-wallets@0.1.1"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "onchain-agent-wallets": {
      "args": [
        "-y",
        "@three-ws/onchain-agent-wallets@0.1.1"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "onchain-agent-wallets": {
      "args": [
        "-y",
        "@three-ws/onchain-agent-wallets@0.1.1"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.onchain-agent-wallets]
command = "npx"
args = ["-y", "@three-ws/onchain-agent-wallets@0.1.1"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: create_agent_wallet, fund_agent_wallet, approve_agent_allowance, set_guardrails, agent_pay, pay_x402, withdraw_from_vault, revoke_agent_wallet, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json