FlowIndex
PackagesAgent Wallet

@flowindex/agent-wallet

MCP server for AI agent wallets on the Flow blockchain with local keys, cloud wallet, and passkey signing

LLM IndexLLM Full

@flowindex/agent-wallet

An MCP (Model Context Protocol) server that gives AI agents a full Flow blockchain wallet. Supports local key signing, cloud-custodied wallets, and passkey-based approval flows. Includes native Flow EVM support.

bun add @flowindex/agent-wallet

Requirements: Node.js 20+

Features

  • MCP Protocol -- Exposes wallet operations as MCP tools that any MCP-compatible AI client (Claude, etc.) can call
  • Multiple Signer Types -- Local mnemonic, local private key, cloud wallet (JWT-authenticated), and interactive cloud login
  • Flow + Flow EVM -- Full support for both Cadence transactions and EVM operations (transfers, ERC-20, contract calls)
  • Cadence Template Library -- Built-in library of Cadence transaction and script templates (token transfers, NFT operations, EVM bridging, etc.)
  • Transaction Approval -- Optional approval queue that lets agents propose transactions for human review before execution
  • Account Discovery -- Automatically discovers Flow accounts associated with a public key

Architecture

The server registers five groups of MCP tools:

Tool GroupToolsDescription
Walletwallet_status, wallet_login, wallet_login_statusWallet configuration, status, and interactive login
Templateslist_templates, get_template, execute_script, execute_templateCadence template browsing and execution
Approvalconfirm_transaction, cancel_transaction, list_pendingTransaction approval queue management
Flow Queryget_account, get_flow_balance, get_ft_balance, get_nft_collection, get_transactionRead-only Flow blockchain queries
EVMevm_wallet_address, evm_get_balance, evm_get_token_balance, evm_transfer, evm_transfer_erc20, evm_read_contract, evm_write_contract, evm_get_transactionFlow EVM operations

Signer Types

The signer type is determined automatically from environment variables:

PrioritySigner TypeTriggerBehavior
1local-mnemonicFLOW_MNEMONIC is setDerives Flow key via BIP-44 (m/44'/539'/0'/0/0), EVM key via standard path
2local-keyFLOW_PRIVATE_KEY is setUses the raw private key directly
3cloudFLOWINDEX_TOKEN is setDelegates signing to the FlowIndex custodial API
4cloud-interactiveNone of the aboveRequires user to authenticate via wallet_login before signing

Quick Example

Run the server with a local key:

FLOW_PRIVATE_KEY=abc123... \
FLOW_ADDRESS=0x1234567890abcdef \
FLOW_NETWORK=mainnet \
npx @flowindex/agent-wallet

Or add it to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "flow-wallet": {
      "command": "npx",
      "args": ["@flowindex/agent-wallet"],
      "env": {
        "FLOW_PRIVATE_KEY": "your-private-key",
        "FLOW_ADDRESS": "0x1234567890abcdef",
        "FLOW_NETWORK": "mainnet"
      }
    }
  }
}

On this page