Skip to main content
Glama
Deconstruct2021

cryptopunks-mcp-server

generate_merkle_root

Generate a Merkle root from CryptoPunk indices to construct collection bids. Pure computation without wallet requirements.

Instructions

Generate a Merkle root for a set of CryptoPunk indices. Pure computation, no wallet required. Used as the first step in constructing a collection bid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
punk_indicesYesPunk indices to include in the Merkle tree
expected_rootNoOptional: verify the result matches this expected root

Implementation Reference

  • The actual API call logic for generating the Merkle root.
    export async function generateMerkleRoot(punkIndices: number[], expectedRoot?: string) {
      return post(BIDS_BASE, "/api/v1/merkle/root", { punkIndices, expectedRoot });
    }
  • The MCP tool handler that invokes the API function.
    case "generate_merkle_root": {
      const result = await api.generateMerkleRoot(
        args.punk_indices,
        args.expected_root,
      );
      return ok(result);
    }
  • src/tools.ts:234-244 (registration)
    The tool definition and schema registration.
    generate_merkle_root: {
      description:
        "Generate a Merkle root for a set of CryptoPunk indices. Pure computation, no wallet required. Used as the first step in constructing a collection bid.",
      inputSchema: z.object({
        punk_indices: z.array(punkIndex).min(1).describe("Punk indices to include in the Merkle tree"),
        expected_root: z
          .string()
          .optional()
          .describe("Optional: verify the result matches this expected root"),
      }),
    },

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/Deconstruct2021/cryptopunks-mcp-server'

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