npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mixrpay/agent-sdk

v0.11.0

Published

Non-custodial wallet and payments SDK for AI agents with MCP and Claude integration

Readme

@mixrpay/agent-sdk

Non-custodial wallet, DeFi, and payments SDK for AI agents. Includes MCP server, Anthropic tool definitions, and 20+ gateway tools.

Installation

npm install @mixrpay/agent-sdk
# or
yarn add @mixrpay/agent-sdk
# or
pnpm add @mixrpay/agent-sdk

Quick Start

import { AgentWallet } from '@mixrpay/agent-sdk';

const wallet = await AgentWallet.connect();

const balances = await wallet.getBalances();
console.log(balances);

await wallet.transfer('0x...', '10.00');

Authentication

Device Flow (Browser)

On first run, connect() opens your browser for login. After approval, credentials are cached locally.

const wallet = await AgentWallet.connect();

API Key

const wallet = await AgentWallet.connect({
  apiKey: 'agt_live_...',
});

Or via environment variable:

MIXRPAY_API_KEY=agt_live_xxx node my-agent.js

Access Code

For agents connecting to an existing human-managed wallet with budget limits:

const wallet = await AgentWallet.connect({
  accessCode: 'mixr-abc123',
});

Wallet & DeFi

// Check balances (tokens + delegation budget)
const balances = await wallet.getBalances();

// Transfer USDC
await wallet.transfer('0x...', '10.00');

// Swap tokens via 0x
await wallet.swap('ETH', 'USDC', '0.1');

// Bridge cross-chain via deBridge
const bridge = await wallet.bridge('USDC', '100', 'ethereum');
await wallet.waitForBridgeCompletion(bridge.order_id);

// Execute arbitrary on-chain transactions
await wallet.executeTransaction({
  to: '0x...contractAddress',
  data: '0x...calldata',
  estimatedCostUsd: 5.0,
});

Paid APIs (x402)

const response = await wallet.fetchPaid('https://api.example.com/endpoint');

Gateway Tools

const tools = await wallet.listTools();

const result = await wallet.callTool('firecrawl', {
  action: 'scrape',
  url: 'https://example.com',
});

Transaction History

const history = await wallet.getTransactions({ limit: 50 });

for (const tx of history.transactions) {
  console.log(`${tx.chargeType}: $${tx.amount} - ${tx.status}`);
}

Multi-Step Plans

Submit, approve, and execute multi-step plans with idempotent resumption:

const plan = await wallet.submitPlan({
  title: 'Rebalance portfolio',
  steps: [
    { action: 'swap', params: { sellToken: 'ETH', buyToken: 'USDC', sellAmount: '0.5' }, description: 'Sell ETH' },
    { action: 'bridge', params: { token: 'USDC', amount: '500', destChain: 'ethereum' }, description: 'Bridge to Ethereum' },
  ],
  totalEstimatedCostUsd: 510,
});

if (plan.status === 'auto_approved') {
  const result = await wallet.executePlan(plan.planId);
  console.log(result.status);
}

Claude Agent SDK

Use as an MCP server with the Claude Agent SDK:

import { query } from '@anthropic-ai/claude-agent-sdk';
import { AgentWallet } from '@mixrpay/agent-sdk';

const wallet = await AgentWallet.connect();

for await (const msg of query({
  prompt: 'Check my balance and swap 0.1 ETH for USDC',
  options: {
    mcpServers: {
      wallet: wallet.mcp(),
    },
  },
})) {
  console.log(msg);
}

Or use wallet.tools() for direct Anthropic SDK integration:

import Anthropic from '@anthropic-ai/sdk';

const toolkit = wallet.tools();

const response = await anthropic.messages.create({
  model: 'claude-sonnet-4-20250514',
  tools: toolkit.definitions,
  messages: [{ role: 'user', content: 'Transfer 5 USDC to 0x...' }],
});

// Execute tool calls returned by Claude
for (const block of response.content) {
  if (block.type === 'tool_use') {
    const result = await toolkit.execute(block.name, block.input);
  }
}

MCP Server (Standalone)

MIXRPAY_API_KEY=agt_live_... npx mixrpay-mcp

CLI

npx mixrpay login
npx mixrpay whoami
npx mixrpay status
npx mixrpay logout

Error Handling

import { AgentWallet, InsufficientBalanceError, MixrPayError } from '@mixrpay/agent-sdk';

try {
  await wallet.transfer('0x...', '100.00');
} catch (error) {
  if (error instanceof InsufficientBalanceError) {
    console.log(`Need $${error.required}, have $${error.available}`);
  }
  if (error instanceof MixrPayError && error.isRetryable()) {
    await new Promise((r) => setTimeout(r, error.retryAfterMs || 1000));
  }
}

Environment Variables

| Variable | Description | | --- | --- | | MIXRPAY_API_KEY | Agent API key (agt_live_...), skips device flow | | MIXRPAY_SESSION_KEY | Session key for delegation signing | | MIXRPAY_BASE_URL | Custom API URL (default: https://www.mixrpay.com) |

Features

  • Non-custodial agent wallets (keys stay local)
  • DeFi primitives: swap (0x), bridge (deBridge), transfer
  • 20+ gateway tools (Firecrawl, Exa, Tavily, and more)
  • x402 auto-pay proxy for paid APIs
  • MCP server for Claude Agent SDK
  • Anthropic tool definitions for messages.create()
  • Multi-step plan submission with human approval
  • Idempotent execution with resume support
  • Transaction history and spending stats
  • Budget governance (per-tx limits, daily/total caps)

Documentation

mixrpay.com/docs

License

MIT