Skip to main content
Glama
Zetrix MCP Server

Zetrix MCP Server

Official
by Zetrix-Chain

Servidor MCP de Zetrix

Un servidor completo del Protocolo de Contexto de Modelo (MCP) para interactuar con la cadena de bloques Zetrix. Proporciona 55 herramientas en 7 categorías: RPC HTTP, WebSocket (protobuf), transacciones SDK, criptografía y desarrollo de contratos inteligentes. Admite modos de transporte stdio y HTTP.

Información de la moneda Zetrix

Moneda nativa: ZETRIX

  • Unidad principal: ZETRIX

  • Unidad base: ZETA

  • Conversión: 1 ZETRIX = 1,000,000 ZETA

  • Precio del gas: Evaluado dinámicamente mediante testTransaction

Related MCP server: MCP Crypto Wallet EVM

Inicio rápido

npx zetrix-mcp-server

O instálelo globalmente:

npm install -g zetrix-mcp-server

Guías:

Características (56 herramientas)

General (1 herramienta)

Herramienta

Descripción

zetrix_version

Obtener la versión del servidor MCP e información de la red

RPC HTTP (16 herramientas)

Herramienta

Descripción

zetrix_check_health

Comprobar el estado de salud del nodo

zetrix_get_account

Obtener información de la cuenta, incluyendo saldo y metadatos

zetrix_get_block

Obtener bloque por altura

zetrix_get_latest_block

Obtener el último bloque

zetrix_get_transaction

Obtener transacción por hash

zetrix_get_balance

Obtener saldo en ZETA y ZETRIX

zetrix_create_keypair

Generar nuevo par de claves (solo pruebas)

zetrix_get_account_base

Obtener información básica de la cuenta

zetrix_get_account_assets

Obtener tenencias de activos

zetrix_get_account_metadata

Obtener metadatos de la cuenta

zetrix_get_transaction_history

Obtener transacciones completadas

zetrix_get_transaction_cache

Obtener transacciones pendientes

zetrix_get_ledger

Obtener información del libro mayor/bloque

zetrix_multi_query

Ejecutar múltiples consultas

zetrix_get_transaction_blob

Serializar transacción a hexadecimal

zetrix_submit_transaction

Enviar transacción firmada

Consulta de contrato (2 herramientas)

Herramienta

Descripción

zetrix_call_contract

Llamar a contrato en sandbox (solo lectura)

zetrix_test_transaction

Evaluar tarifas sin enviar

WebSocket — Tiempo real (5 herramientas)

Utiliza codificación binaria protobuf para la comunicación con los nodos de Zetrix.

Herramienta

Descripción

zetrix_ws_connect

Conectar y registrar mediante CHAIN_HELLO de protobuf

zetrix_ws_submit_transaction

Enviar transacción con estado en tiempo real

zetrix_ws_subscribe_tx

Suscribirse a notificaciones de transacciones

zetrix_ws_disconnect

Desconectar de WebSocket

zetrix_ws_status

Comprobar estado de la conexión

Consulta SDK (5 herramientas)

Herramienta

Descripción

zetrix_sdk_create_account

Crear nueva cuenta

zetrix_sdk_get_balance

Obtener saldo mediante SDK

zetrix_sdk_is_activated

Comprobar si la cuenta está activada

zetrix_sdk_get_nonce

Obtener nonce de la cuenta

zetrix_sdk_call_contract

Llamar a contrato mediante SDK (solo lectura)

Transacciones SDK (11 herramientas)

Todas las herramientas de transacción utilizan evaluateFee (testTransaction) para el precio dinámico del gas. Se admiten anulaciones opcionales de gasPrice/feeLimit en todas las operaciones.

Herramienta

Descripción

zetrix_sdk_send_gas

Enviar ZETRIX nativo a otra dirección

zetrix_sdk_activate_account

Activar una nueva cuenta con saldo inicial

zetrix_sdk_set_metadata

Establecer metadatos clave-valor en una cuenta

zetrix_sdk_set_privilege

Establecer pesos, umbrales y firmantes de la cuenta

zetrix_sdk_issue_asset

Emitir un nuevo token personalizado

zetrix_sdk_send_asset

Transferir un token personalizado

zetrix_sdk_create_contract

Desplegar un contrato inteligente (con propietario opcional)

zetrix_sdk_invoke_contract

Invocar contrato con pago de gas

zetrix_sdk_invoke_contract_by_asset

Invocar contrato con transferencia de activos

zetrix_sdk_upgrade_contract

Actualizar código del contrato y/o transferir propiedad

zetrix_sdk_create_log

Crear un registro de eventos en la cadena

Criptografía (8 herramientas)

Herramienta

Descripción

zetrix_crypto_generate_keypair

Generar nuevo par de claves (dirección, clave privada, clave pública)

zetrix_crypto_get_public_key

Derivar clave pública a partir de la clave privada

zetrix_crypto_get_address

Obtener dirección a partir de la clave pública

zetrix_crypto_validate_key

Validar formato de clave privada, clave pública o dirección

zetrix_crypto_sign

Firmar un mensaje (hex) con una clave privada

zetrix_crypto_verify

Verificar una firma

zetrix_crypto_encrypt_key

Cifrar clave privada con contraseña

zetrix_crypto_decrypt_key

Descifrar clave privada cifrada

Desarrollo de contratos inteligentes (7 herramientas)

Herramienta

Descripción

zetrix_contract_get_chain_functions

Documentación de funciones del objeto Chain

zetrix_contract_get_utils_functions

Documentación de funciones del objeto Utils

zetrix_contract_get_structure_guide

Guía de estructura de contratos y patrones ES5

zetrix_contract_get_token_standard

Especificaciones de estándares de tokens (ZTP20, ZTP721, ZTP1155)

zetrix_contract_init_dev_environment

Inicializar proyecto de desarrollo mediante create-zetrix-tool

zetrix_contract_generate_advanced

Generar arquitectura de contrato multiclase

zetrix_contract_get_testing_guide

Guía de pruebas (TEST_INVOKE, TEST_QUERY)

Redes compatibles

Red

RPC HTTP

WebSocket

Mainnet

https://node.zetrix.com

wss://ws-node.zetrix.com

Testnet

https://test-node.zetrix.com

wss://test-ws-node.zetrix.com

Configuración

Variables de entorno

Variable

Descripción

Predeterminado

ZETRIX_NETWORK

Selección de red (mainnet o testnet)

mainnet

ZETRIX_RPC_URL

Punto final RPC HTTP personalizado (anula el predeterminado de la red)

—

ZETRIX_WS_URL

Punto final WebSocket personalizado (anula el predeterminado de la red)

—

ZETRIX_TRANSPORT

Modo de transporte (stdio o http)

stdio

ZETRIX_PORT

Puerto del servidor HTTP (solo usado cuando ZETRIX_TRANSPORT=http)

3000

ZETRIX_PRIVATE_KEY

Clave privada predeterminada para firmar transacciones (opcional, mantiene la clave fuera de la conversación)

—

ZETRIX_SOURCE_ADDRESS

Dirección de origen predeterminada para transacciones (opcional)

—

Transacciones seguras (Recomendado)

Al establecer ZETRIX_PRIVATE_KEY y ZETRIX_SOURCE_ADDRESS como variables de entorno, su clave privada nunca se expone en la conversación. El LLM puede ejecutar transacciones como "enviar 0.01 ZETRIX a ZTX3..." sin ver nunca su clave.

{
  "mcpServers": {
    "zetrix": {
      "command": "npx",
      "args": ["-y", "zetrix-mcp-server"],
      "env": {
        "ZETRIX_NETWORK": "testnet",
        "ZETRIX_PRIVATE_KEY": "your-private-key-here",
        "ZETRIX_SOURCE_ADDRESS": "your-zetrix-address-here"
      }
    }
  }
}

Nota: Estos son opcionales. Si no se establecen, el LLM necesitará solicitar o recibir la clave privada y la dirección de origen en la conversación. Si se establecen, se utilizan como valores predeterminados; aún puede anularlos por llamada de herramienta si es necesario.

Claude Code (CLI)

Añada el servidor MCP directamente desde la línea de comandos:

Mainnet:

claude mcp add zetrix-mainnet -s user -- npx -y zetrix-mcp-server -e ZETRIX_NETWORK=mainnet

Testnet:

claude mcp add zetrix-testnet -s user -- npx -y zetrix-mcp-server -e ZETRIX_NETWORK=testnet

Con URLs personalizadas de RPC y WebSocket:

claude mcp add zetrix-testnet -s user -- npx -y zetrix-mcp-server \
  -e ZETRIX_NETWORK=testnet \
  -e ZETRIX_RPC_URL=https://your-node.example.com \
  -e ZETRIX_WS_URL=wss://your-ws-node.example.com

Claude Desktop

Edite su archivo de configuración de Claude Desktop:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Windows (Microsoft Store): %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

Testnet:

{
  "mcpServers": {
    "zetrix": {
      "command": "npx",
      "args": ["-y", "zetrix-mcp-server"],
      "env": {
        "ZETRIX_NETWORK": "testnet"
      }
    }
  }
}

Mainnet:

{
  "mcpServers": {
    "zetrix": {
      "command": "npx",
      "args": ["-y", "zetrix-mcp-server"],
      "env": {
        "ZETRIX_NETWORK": "mainnet"
      }
    }
  }
}

Ambas redes (mainnet + testnet):

{
  "mcpServers": {
    "zetrix-mainnet": {
      "command": "npx",
      "args": ["-y", "zetrix-mcp-server"],
      "env": {
        "ZETRIX_NETWORK": "mainnet"
      }
    },
    "zetrix-testnet": {
      "command": "npx",
      "args": ["-y", "zetrix-mcp-server"],
      "env": {
        "ZETRIX_NETWORK": "testnet"
      }
    }
  }
}

Con URLs personalizadas de RPC y WebSocket:

{
  "mcpServers": {
    "zetrix": {
      "command": "npx",
      "args": ["-y", "zetrix-mcp-server"],
      "env": {
        "ZETRIX_NETWORK": "testnet",
        "ZETRIX_RPC_URL": "https://your-node.example.com",
        "ZETRIX_WS_URL": "wss://your-ws-node.example.com"
      }
    }
  }
}

Después de guardar el archivo de configuración, reinicie Claude Desktop para que los cambios surtan efecto.

Nota: ZETRIX_RPC_URL y ZETRIX_WS_URL anulan los puntos finales predeterminados para la red seleccionada. Puede anular solo uno o ambos. Si no se establecen, se utilizan los valores predeterminados de la tabla anterior.

Transporte HTTP (Servidor API)

Ejecute el servidor MCP como un servidor API HTTP utilizando el transporte HTTP Streamable. Esto permite que los clientes MCP remotos se conecten a través de la red.

Iniciar el servidor (predeterminado a mainnet):

ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 npx zetrix-mcp-server

Con testnet:

ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 ZETRIX_NETWORK=testnet npx zetrix-mcp-server

Puntos finales:

Punto final

Método

Descripción

/mcp

POST

Punto final del protocolo MCP (HTTP Streamable)

/health

GET

Comprobación de salud: devuelve { status, version, network }

Conectar desde un cliente MCP:

{
  "mcpServers": {
    "zetrix": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Ambas redes (mainnet + testnet):

Ejecute dos servidores en puertos diferentes:

ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 ZETRIX_NETWORK=mainnet npx zetrix-mcp-server &
ZETRIX_TRANSPORT=http ZETRIX_PORT=3001 ZETRIX_NETWORK=testnet npx zetrix-mcp-server &

Luego configure su cliente MCP:

{
  "mcpServers": {
    "zetrix-mainnet": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    },
    "zetrix-testnet": {
      "type": "http",
      "url": "http://localhost:3001/mcp"
    }
  }
}

Nota: El transporte HTTP utiliza la especificación MCP Streamable HTTP. Cualquier cliente MCP que admita el transporte StreamableHTTP puede conectarse a él.

Registros del servidor:

El servidor registra en stderr. Para ver los registros, ejecute en primer plano o redirija a un archivo:

# Foreground — logs show directly in terminal
ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 npx zetrix-mcp-server

# Background with logs to file
ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 npx zetrix-mcp-server 2> server.log &
tail -f server.log

Desarrollo

Estructura del proyecto

zetrix-mcp-server/
├── src/
│   ├── index.ts                  # MCP server (55 tool definitions + handlers)
│   ├── zetrix-client.ts          # HTTP RPC client
│   ├── zetrix-sdk.ts             # SDK wrapper (11 transaction operations)
│   ├── zetrix-websocket.ts       # WebSocket client (protobuf binary)
│   ├── zetrix-encryption.ts      # Crypto operations
│   ├── zetrix-contract-docs.ts   # Contract documentation
│   └── zetrix-contract-generator.ts # Contract code generator
├── tests/
│   ├── test-server.js            # HTTP RPC tests
│   ├── test-sdk.js               # SDK tests
│   └── test-encryption.js        # Crypto tests
├── docs/
│   ├── TEST_REPORT.md            # Comprehensive test results
│   ├── DEVELOPER_GUIDE.md        # Developer documentation
│   ├── ZETRIX_CONTRACT_DEVELOPMENT_RULES.md
│   ├── QUICKSTART.md             # 5-minute setup guide
│   └── EXAMPLES.md               # 20+ usage examples
└── dist/                         # Compiled output

Construcción

npm install
npm run build

Prueba

npm test                           # HTTP RPC tests
ZETRIX_NETWORK=testnet npm test    # Run on testnet
npm run test:sdk                   # SDK tests
npm run test:encryption            # Crypto tests

Licencia

MIT

Available Tools

44 tools
zetrix_call_contractB

Call smart contract in sandbox environment for debugging

Inputs: contractAddress, code, input, contractBalance, +4 more.

zetrix_check_healthB

Check the health status of the Zetrix node

Inputs: no named parameters.

zetrix_contract_generate_advancedA

Generate advanced multi-class Zetrix smart contract with interfaces, libraries, utilities, main contract, and comprehensive test specs. MANDATORY WORKFLOW: (1) First call zetrix_contract_init_dev_environment with contractName (e.g., 'CertificateContract'). (2) Then call this tool with the SAME contractName and outputDirectory set to './{contractName}'. Calling this tool WITHOUT initializing the project first will result in an error. Supports complex architectures with inheritance, composition, and modular design.

Inputs: contractName (required), contractType (required), features, tokenStandard, +2 more.

zetrix_contract_get_chain_functionsA

Get documentation for all built-in Chain object functions available in Zetrix smart contracts

Inputs: no named parameters.

zetrix_contract_get_structure_guideB

Get guide on how to structure Zetrix smart contracts with ES5 patterns, classes, and inheritance

Inputs: no named parameters.

zetrix_contract_get_testing_guideB

Get guide on testing Zetrix smart contracts with TEST_INVOKE and TEST_QUERY

Inputs: no named parameters.

zetrix_contract_get_token_standardC

Get token standard specification (ZTP20, ZTP721, or ZTP1155)

Inputs: standard (required).

zetrix_contract_get_utils_functionsB

Get documentation for all built-in Utils object functions available in Zetrix smart contracts

Inputs: no named parameters.

zetrix_contract_init_dev_environmentB

Initialize a new Zetrix smart contract development environment using create-zetrix-tool. This creates a complete project structure with testing framework, examples, and utilities.

Inputs: contractName (required), workingDirectory.

zetrix_create_keypairB

Generate a new public-private key pair (for testing only)

Inputs: no named parameters.

zetrix_crypto_decrypt_keyC

Decrypt an encrypted private key with a password

Inputs: encryptedData (required), password (required).

zetrix_crypto_encrypt_keyC

Encrypt a private key with a password for secure storage

Inputs: privateKey (required), password (required).

zetrix_crypto_generate_keypairB

Generate a new Zetrix key pair with private key, public key, and address

Inputs: no named parameters.

zetrix_crypto_get_addressC

Get Zetrix address from public key

Inputs: publicKey (required).

zetrix_crypto_get_public_keyC

Derive public key from private key

Inputs: privateKey (required).

zetrix_crypto_signC

Sign a message with a private key

Inputs: message (required), privateKey (required).

zetrix_crypto_validate_keyC

Validate private key, public key, or address format

Inputs: type (required), value (required).

zetrix_crypto_verifyC

Verify a signature against a message and public key

Inputs: message (required), signature (required), publicKey (required).

zetrix_get_accountC

Get Zetrix account information including balance and metadata

Inputs: address (required).

zetrix_get_account_assetsB

Get asset holdings for an account

Inputs: address (required), code, issuer.

zetrix_get_account_baseB

Get basic account information without assets and metadata

Inputs: address (required).

zetrix_get_account_metadataC

Get metadata associated with an account

Inputs: address (required), key.

zetrix_get_balanceB

Get the ZETRIX balance of an account. Returns balance in both ZETA (micro units) and ZETRIX (main units). Note: 1 ZETRIX = 1,000,000 ZETA

Inputs: address (required).

zetrix_get_blockC

Get information about a specific block by height

Inputs: blockNumber (required).

zetrix_get_latest_blockB

Get the latest block information from Zetrix blockchain

Inputs: no named parameters.

zetrix_get_ledgerC

Get block/ledger information with optional details

Inputs: seq, withValidator, withConsValue, withFee.

zetrix_get_transactionC

Get transaction details by transaction hash

Inputs: hash (required).

zetrix_get_transaction_blobC

Serialize transaction data into hexadecimal format

Inputs: transaction (required).

zetrix_get_transaction_cacheC

Get pending transactions not yet executed

Inputs: hash, limit.

zetrix_get_transaction_historyC

Get completed transaction records

Inputs: hash, ledgerSeq.

zetrix_multi_queryC

Execute multiple API queries simultaneously

Inputs: items (required).

zetrix_sdk_call_contractA

Call a smart contract function (query only, no state change) using SDK

Inputs: contractAddress (required), input, sourceAddress.

zetrix_sdk_create_accountB

Create a new Zetrix account using the official SDK

Inputs: no named parameters.

zetrix_sdk_get_balanceC

Get account balance using the official SDK

Inputs: address (required).

zetrix_sdk_get_nonceC

Get account nonce (transaction sequence number)

Inputs: address (required).

zetrix_sdk_invoke_contractB

Invoke a smart contract function with state change (requires private key)

Inputs: sourceAddress (required), privateKey (required), contractAddress (required), amount (required), +2 more.

zetrix_sdk_is_activatedC

Check if an account is activated on the blockchain

Inputs: address (required).

zetrix_submit_transactionC

Submit signed transaction to blockchain for execution

Inputs: transactionBlob (required), signatures (required).

zetrix_test_transactionB

Evaluate transaction fees without blockchain submission

Inputs: items (required).

zetrix_ws_connectC

Connect and register to Zetrix WebSocket for real-time updates

Inputs: apiList.

zetrix_ws_disconnectB

Disconnect from WebSocket

Inputs: no named parameters.

zetrix_ws_statusB

Check WebSocket connection status

Inputs: no named parameters.

zetrix_ws_submit_transactionB

Submit transaction via WebSocket and get real-time status updates

Inputs: transaction (required), signatures (required), trigger.

zetrix_ws_subscribe_txC

Subscribe to transaction notifications for specific addresses

Inputs: addresses (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 44 tools

    Disambiguation3/5

    The tool set has clear thematic grouping (e.g., crypto, account, contract, SDK, WebSocket), but there is notable overlap within groups. For example, zetrix_get_account, zetrix_get_account_base, and zetrix_get_balance all retrieve account-related data with subtle distinctions that could confuse agents. Similarly, multiple contract call tools (zetrix_call_contract, zetrix_sdk_call_contract) and transaction submission tools (zetrix_submit_transaction, zetrix_ws_submit_transaction) have overlapping purposes, though descriptions provide some guidance.

    Naming Consistency5/5

    Tool names follow a highly consistent pattern throughout: all start with 'zetrix_' prefix, use snake_case uniformly, and employ a verb_noun structure (e.g., zetrix_get_balance, zetrix_create_keypair). Minor deviations like 'zetrix_multi_query' (adjective_verb_noun) are rare and do not disrupt readability, maintaining excellent predictability across all 44 tools.

    Tool Count2/5

    With 44 tools, the server is overly broad and heavy for a single MCP server, likely covering multiple domains (blockchain interaction, smart contract development, cryptography, WebSocket management). This high count increases complexity and cognitive load for agents, making it difficult to navigate efficiently. A more modular approach with separate servers for distinct functionalities would be more appropriate.

    Completeness4/5

    The tool surface is extensive and covers core blockchain operations comprehensively, including account management, transaction handling, contract development, and real-time updates. However, there are minor gaps: for instance, tools for updating or deleting accounts are missing, and some advanced contract management features (e.g., contract deployment or upgrade) are not explicitly covered, though the provided guides and generation tools mitigate this.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers