Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_sdk_create_account

Generate a new blockchain account on Zetrix using the official SDK to enable secure transactions and smart contract interactions.

Instructions

Create a new Zetrix account using the official SDK

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server handler for the 'zetrix_sdk_create_account' tool. Dispatches the request by calling ZetrixSDK.createAccount() and returns the result as JSON.
    case "zetrix_sdk_create_account": {
      const account = await zetrixSDK.createAccount();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(account, null, 2),
          },
        ],
      };
    }
  • src/index.ts:420-427 (registration)
    Tool registration in the tools array used by ListToolsRequestHandler. Defines name, description, and empty input schema.
    {
      name: "zetrix_sdk_create_account",
      description: "Create a new Zetrix account using the official SDK",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Core implementation of account creation in ZetrixSDK wrapper class. Initializes SDK and calls official zetrix-sdk-nodejs account.create() method to generate new keypair and address.
    async createAccount(): Promise<ZetrixSDKAccount> {
      await this.initSDK();
    
      try {
        const result = await this.sdk.account.create();
    
        if (result.errorCode !== 0) {
          throw new Error(result.errorDesc || `SDK Error: ${result.errorCode}`);
        }
    
        return {
          address: result.result.address,
          privateKey: result.result.privateKey,
          publicKey: result.result.publicKey,
        };
      } catch (error) {
        throw new Error(
          `Failed to create account: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • TypeScript interface defining the output structure of the createAccount method.
    export interface ZetrixSDKAccount {
      address: string;
      privateKey: string;
      publicKey: string;
    }

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/Zetrix-Chain/zetrix-mcp-server'

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