transfer_nft
Transfer NFTs across EVM and Solana networks to recipient addresses. Supports ERC-721, ERC-1155, and Metaplex standards with configurable parameters for token amounts and wallet selection.
Instructions
Transfer an NFT (ERC-721/ERC-1155/Metaplex) to a recipient address. Default tier: APPROVAL.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient address (0x-hex for EVM, base58 for Solana). | |
| token_address | Yes | NFT contract address (EVM) or mint address (Solana). | |
| token_id | Yes | Token ID within the contract (EVM). Use "0" for Solana Metaplex. | |
| standard | Yes | NFT standard. | |
| network | Yes | Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1"). | |
| amount | No | Number of tokens to transfer (default: "1"). Only relevant for ERC-1155 multi-copy NFTs. This is a count, not a smallest-unit value. | |
| wallet_id | No | Target wallet ID. Required for multi-wallet sessions. |
Implementation Reference
- The handler function that executes the logic for the "transfer_nft" tool, which constructs a request body with type 'NFT_TRANSFER' and sends it to the /v1/transactions/send API endpoint.
async (args) => { const body: Record<string, unknown> = { type: 'NFT_TRANSFER', to: args.to, token: { address: args.token_address, tokenId: args.token_id, standard: args.standard, }, network: args.network, }; if (args.amount !== undefined) body.amount = args.amount; if (args.wallet_id) body.walletId = args.wallet_id; const result = await apiClient.post('/v1/transactions/send', body); return toToolResult(result); }, ); - packages/mcp/src/tools/transfer-nft.ts:13-50 (registration)The function that registers the "transfer_nft" tool with the MCP server, defining its schema and the handler logic.
export function registerTransferNft( server: McpServer, apiClient: ApiClient, walletContext?: WalletContext, ): void { server.tool( 'transfer_nft', withWalletPrefix( 'Transfer an NFT (ERC-721/ERC-1155/Metaplex) to a recipient address. Default tier: APPROVAL.', walletContext?.walletName, ), { to: z.string().describe('Recipient address (0x-hex for EVM, base58 for Solana).'), token_address: z.string().describe('NFT contract address (EVM) or mint address (Solana).'), token_id: z.string().describe('Token ID within the contract (EVM). Use "0" for Solana Metaplex.'), standard: z.enum(['erc721', 'erc1155', 'metaplex']).describe('NFT standard.'), network: z.string().describe('Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").'), amount: z.string().optional().describe('Number of tokens to transfer (default: "1"). Only relevant for ERC-1155 multi-copy NFTs. This is a count, not a smallest-unit value.'), wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions.'), }, async (args) => { const body: Record<string, unknown> = { type: 'NFT_TRANSFER', to: args.to, token: { address: args.token_address, tokenId: args.token_id, standard: args.standard, }, network: args.network, }; if (args.amount !== undefined) body.amount = args.amount; if (args.wallet_id) body.walletId = args.wallet_id; const result = await apiClient.post('/v1/transactions/send', body); return toToolResult(result); }, ); } - The Zod schema definition for the input parameters of the "transfer_nft" tool, specifying required fields like recipient, token address, ID, standard, and network.
{ to: z.string().describe('Recipient address (0x-hex for EVM, base58 for Solana).'), token_address: z.string().describe('NFT contract address (EVM) or mint address (Solana).'), token_id: z.string().describe('Token ID within the contract (EVM). Use "0" for Solana Metaplex.'), standard: z.enum(['erc721', 'erc1155', 'metaplex']).describe('NFT standard.'), network: z.string().describe('Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").'), amount: z.string().optional().describe('Number of tokens to transfer (default: "1"). Only relevant for ERC-1155 multi-copy NFTs. This is a count, not a smallest-unit value.'), wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions.'), },