Skip to content

Repository files navigation

MeshWallet

An MPP wallet as an MCP server. Give any MCP client (Claude Code, Claude Desktop, or another agent runtime) its own wallet on Robinhood Chain, let it discover merchants published on the mesh marketplace, and pay per use for their services over x402/MPP.

How it works

  1. First run generates a wallet. On install there is nothing to configure: the server creates a Robinhood Chain keypair and stores it at ~/.meshwallet/wallet.json (file mode 0600). The same wallet is loaded on every later start.
  2. Fund it. Send USDG (0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168) and a little ETH for gas to the address on Robinhood Chain (chain id 4663). wallet_status shows the address and balances.
  3. Discover and pay. discover_merchants lists every service on the mesh with its price. pay_merchant calls an offer and settles the 402 challenge automatically from the wallet.

Tools

  • wallet_status shows the address, key location, whether it was just created, and Robinhood Chain balances.
  • discover_merchants lists every published mesh merchant with offers, prices, and networks.
  • get_merchant returns the full discovery document for one merchant.
  • pay_merchant calls a merchant offer and pays per use (USDG on Robinhood Chain, USDC on Base). Spends real funds at the offer price.
  • paid_fetch pays any x402 URL outside the mesh.
  • get_balances, transfer, get_transaction, list_networks, sign_message for direct wallet operations.

Networks

Robinhood Chain is the home network; Base networks are supported for merchants that settle in USDC.

id chain token rail
robinhood Robinhood Chain (4663) USDG permit2
base Base (8453) USDC EIP-3009
base-sepolia Base Sepolia (84532) USDC EIP-3009, testnet

Install

No clone or build needed; the package is on npm.

Cursor (Agent Plugin)

This repo follows the Open Plugins standard: .plugin/plugin.json (and .cursor-plugin/plugin.json) is the manifest, mcp.json launches the MCP server, and skills/pay-per-use/ teaches the agent the funding and payment workflow. Install it from the Cursor marketplace (Customize sidebar → Plugins → search "meshwallet"), or test it locally:

ln -s "$(pwd)" ~/.cursor/plugins/local/meshwallet

Then reload Cursor.

Claude Code:

claude mcp add meshwallet -- npx -y meshwallet

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "meshwallet": {
      "command": "npx",
      "args": ["-y", "meshwallet"]
    }
  }
}

Development

npm install
npm run build

npm run dev runs the server from source with tsx; node dist/index.js runs the built server.

Configuration (all optional)

  • MESHWALLET_PRIVATE_KEY uses an existing key instead of the generated one.
  • MESHWALLET_DIR moves the keystore directory (default ~/.meshwallet).
  • MESHWALLET_GATEWAY_URL points discovery at another gateway (default https://api.meshgateway.co).
  • ROBINHOOD_RPC_URL, BASE_RPC_URL, BASE_SEPOLIA_RPC_URL override RPC endpoints.

Security notes

  • The private key never leaves the server process; no tool returns it.
  • pay_merchant, paid_fetch, and transfer move real funds on mainnet networks. Keep the wallet funded with only what the agent should be able to spend.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages