Skip to main content
Glama

fund_testnet

Fund an Algorand testnet account using the official faucet. Provide the testnet address to receive Algos for testing and development on the Algorand blockchain.

Instructions

Fund an Algorand testnet account using the official faucet

Input Schema

NameRequiredDescriptionDefault
addressYesAlgorand testnet address to fund

Input Schema (JSON Schema)

{ "properties": { "address": { "description": "Algorand testnet address to fund", "type": "string" } }, "required": [ "address" ], "type": "object" }

Implementation Reference

  • The handler implementation for the 'fund_testnet' tool. It parses the input arguments using Zod schema, makes a POST request to the Algorand testnet faucet API to fund the provided address, and returns success or error messages.
    case 'fund_testnet': { const parsed = FundTestnetArgsSchema.parse(args); try { // Use node-fetch for HTTP requests const fetch: typeof import('node-fetch') = (await import('node-fetch')).default; const faucetUrl = `https://bank.testnet.algorand.network/api/v2/accounts/${parsed.address}`; const response = await fetch(faucetUrl, { method: 'POST' }); if (!response.ok) { throw new Error(`Faucet request failed: ${response.statusText}`); } const result = await response.json(); return { content: [ { type: 'text', text: `Faucet request sent!\nStatus: ${result.message || 'Success'}\nCheck your account balance in a few seconds.`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Faucet funding failed: ${error}`, }, ], isError: true, }; } }
  • Zod schema for validating the input arguments of the 'fund_testnet' tool, requiring an 'address' string.
    const FundTestnetArgsSchema = z.object({ address: z.string(), });
  • src/index.ts:142-155 (registration)
    Tool registration in the TOOLS array, defining the name, description, and JSON input schema for the MCP protocol.
    { name: 'fund_testnet', description: 'Fund an Algorand testnet account using the official faucet', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Algorand testnet address to fund', }, }, required: ['address'], }, },

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jake-loranger/algorand-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server