Skip to main content
Glama
kukapay

wallet-generator-mcp

generateWallets

Batch-generates Ethereum wallets and supports EVM-compatible chains for efficient wallet creation in bulk.

Instructions

Batch-generating ethereum wallets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:19-58 (handler)
    Handler function that generates the specified number (1-100) of random Ethereum wallets using ethers.Wallet.createRandom(). Each wallet includes address, privateKey, and mnemonic phrase. Returns a JSON-formatted text response or error.
    async ({ count }) => {
      try {
        const wallets = [];
        // Generate the specified number of random wallets
        for (let i = 0; i < count; i++) {
          const wallet = ethers.Wallet.createRandom();
          wallets.push({
            address: wallet.address,
            privateKey: wallet.privateKey,
            mnemonic: wallet.mnemonic.phrase,
          });
        }
    
        // Return the generated wallets in JSON format
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                wallets,
                null,
                2
              ),
            },
          ],
          isError: false,
        };
      } catch (error) {
        // Return an error message if wallet generation fails
        return {
          content: [
            {
              type: "text",
              text: `Error generating wallets: ${error.message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Zod input schema: 'count' parameter (number, min 1, max 100, default 1).
    z.object({
      count: z.number().min(1).max(100).default(1), // Limit the number of wallets to generate (1-100)
    }),
  • index.js:13-59 (registration)
    MCP server tool registration for 'generateWallets': includes name, description, Zod schema, and handler function.
    server.tool(
      "generateWallets",
      "Batch-generating ethereum wallets",
      z.object({
        count: z.number().min(1).max(100).default(1), // Limit the number of wallets to generate (1-100)
      }),
      async ({ count }) => {
        try {
          const wallets = [];
          // Generate the specified number of random wallets
          for (let i = 0; i < count; i++) {
            const wallet = ethers.Wallet.createRandom();
            wallets.push({
              address: wallet.address,
              privateKey: wallet.privateKey,
              mnemonic: wallet.mnemonic.phrase,
            });
          }
    
          // Return the generated wallets in JSON format
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  wallets,
                  null,
                  2
                ),
              },
            ],
            isError: false,
          };
        } catch (error) {
          // Return an error message if wallet generation fails
          return {
            content: [
              {
                type: "text",
                text: `Error generating wallets: ${error.message}`,
              },
            ],
            isError: true,
          };
        }
      }
    );

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

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/kukapay/wallet-generator-mcp'

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