load_wallet
Access stored wallets on the Algorand MCP Server by entering the wallet name and password, decrypting the mnemonic, and retrieving the wallet address for blockchain interactions.
Instructions
Load a stored wallet and return the address
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Wallet name/identifier | |
| password | Yes | Password to decrypt the mnemonic |
Input Schema (JSON Schema)
{
"properties": {
"name": {
"description": "Wallet name/identifier",
"type": "string"
},
"password": {
"description": "Password to decrypt the mnemonic",
"type": "string"
}
},
"required": [
"name",
"password"
],
"type": "object"
}
Implementation Reference
- src/index.ts:764-798 (handler)Implements the load_wallet tool handler: parses args, retrieves stored wallet, decrypts mnemonic using algorandService, and returns address and mnemonic or error.case 'load_wallet': { const parsed = LoadWalletArgsSchema.parse(args); try { const wallet = walletStorage.get(parsed.name); if (!wallet) { throw new Error(`Wallet "${parsed.name}" not found`); } // Decrypt mnemonic const mnemonic = algorandService.decryptMnemonic( wallet.encryptedMnemonic, wallet.iv, parsed.password ); return { content: [ { type: 'text', text: `Wallet "${parsed.name}" loaded successfully!\nAddress: ${wallet.address}\nMnemonic: ${mnemonic}\n\n⚠️ Keep this mnemonic secure and private.`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error loading wallet: ${error}`, }, ], isError: true, }; } }
- src/index.ts:85-88 (schema)Zod schema defining input parameters for load_wallet: name (string) and password (string).const LoadWalletArgsSchema = z.object({ name: z.string(), password: z.string(), });
- src/index.ts:345-362 (registration)Registers the load_wallet tool in the TOOLS array with name, description, and inputSchema matching the Zod schema.{ name: 'load_wallet', description: 'Load a stored wallet and return the address', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Wallet name/identifier', }, password: { type: 'string', description: 'Password to decrypt the mnemonic', }, }, required: ['name', 'password'], }, },