Skip to main content
Glama
Zetrix MCP Server

Zetrix MCP Server

Official
by Zetrix-Chain

Zetrix MCP Server

Комплексный сервер Model Context Protocol (MCP) для взаимодействия с блокчейном Zetrix. Предоставляет 55 инструментов в 7 категориях — HTTP RPC, WebSocket (protobuf), транзакции SDK, криптография и разработка смарт-контрактов. Поддерживает режимы транспорта stdio и HTTP.

Информация о валюте Zetrix

Нативная монета: ZETRIX

  • Основная единица: ZETRIX

  • Базовая единица: ZETA

  • Конвертация: 1 ZETRIX = 1 000 000 ZETA

  • Стоимость газа (Gas Price): Рассчитывается динамически через testTransaction

Related MCP server: MCP Crypto Wallet EVM

Быстрый старт

npx zetrix-mcp-server

Или установите глобально:

npm install -g zetrix-mcp-server

Руководства:

  • QUICKSTART.md — Настройка за 5 минут

  • EXAMPLES.md — Обучение на 20+ примерах

  • TEST_REPORT.md — Полные результаты тестирования для всех 55 инструментов

Функции (56 инструментов)

Общие (1 инструмент)

Инструмент

Описание

zetrix_version

Получить версию MCP-сервера и информацию о сети

HTTP RPC (16 инструментов)

Инструмент

Описание

zetrix_check_health

Проверить статус работоспособности узла

zetrix_get_account

Получить информацию об аккаунте, включая баланс и метаданные

zetrix_get_block

Получить блок по высоте

zetrix_get_latest_block

Получить последний блок

zetrix_get_transaction

Получить транзакцию по хешу

zetrix_get_balance

Получить баланс в ZETA и ZETRIX

zetrix_create_keypair

Создать новую пару ключей (только для тестирования)

zetrix_get_account_base

Получить базовую информацию об аккаунте

zetrix_get_account_assets

Получить активы аккаунта

zetrix_get_account_metadata

Получить метаданные аккаунта

zetrix_get_transaction_history

Получить завершенные транзакции

zetrix_get_transaction_cache

Получить ожидающие транзакции

zetrix_get_ledger

Получить информацию о реестре/блоке

zetrix_multi_query

Выполнить несколько запросов

zetrix_get_transaction_blob

Сериализовать транзакцию в hex

zetrix_submit_transaction

Отправить подписанную транзакцию

Запросы к контрактам (2 инструмента)

Инструмент

Описание

zetrix_call_contract

Вызвать контракт в песочнице (только чтение)

zetrix_test_transaction

Оценить комиссии без отправки

WebSocket — В реальном времени (5 инструментов)

Использует бинарное кодирование protobuf для связи с узлами Zetrix.

Инструмент

Описание

zetrix_ws_connect

Подключиться и зарегистрироваться через protobuf CHAIN_HELLO

zetrix_ws_submit_transaction

Отправить транзакцию со статусом в реальном времени

zetrix_ws_subscribe_tx

Подписаться на уведомления о транзакциях

zetrix_ws_disconnect

Отключиться от WebSocket

zetrix_ws_status

Проверить статус подключения

Запросы SDK (5 инструментов)

Инструмент

Описание

zetrix_sdk_create_account

Создать новый аккаунт

zetrix_sdk_get_balance

Получить баланс через SDK

zetrix_sdk_is_activated

Проверить, активирован ли аккаунт

zetrix_sdk_get_nonce

Получить nonce аккаунта

zetrix_sdk_call_contract

Вызвать контракт через SDK (только чтение)

Транзакции SDK (11 инструментов)

Все инструменты транзакций используют evaluateFee (testTransaction) для динамического ценообразования газа. Для всех операций поддерживаются необязательные параметры gasPrice/feeLimit.

Инструмент

Описание

zetrix_sdk_send_gas

Отправить нативный ZETRIX на другой адрес

zetrix_sdk_activate_account

Активировать новый аккаунт с начальным балансом

zetrix_sdk_set_metadata

Установить метаданные «ключ-значение» для аккаунта

zetrix_sdk_set_privilege

Установить веса аккаунта, пороги и подписантов

zetrix_sdk_issue_asset

Выпустить новый пользовательский токен

zetrix_sdk_send_asset

Перевести пользовательский токен

zetrix_sdk_create_contract

Развернуть смарт-контракт (с опциональным владельцем)

zetrix_sdk_invoke_contract

Вызвать контракт с оплатой газа

zetrix_sdk_invoke_contract_by_asset

Вызвать контракт с переводом активов

zetrix_sdk_upgrade_contract

Обновить код контракта и/или передать право собственности

zetrix_sdk_create_log

Создать лог события в блокчейне

Криптография (8 инструментов)

Инструмент

Описание

zetrix_crypto_generate_keypair

Создать новую пару ключей (адрес, приватный ключ, публичный ключ)

zetrix_crypto_get_public_key

Получить публичный ключ из приватного

zetrix_crypto_get_address

Получить адрес из публичного ключа

zetrix_crypto_validate_key

Проверить формат приватного ключа, публичного ключа или адреса

zetrix_crypto_sign

Подписать сообщение (hex) приватным ключом

zetrix_crypto_verify

Проверить подпись

zetrix_crypto_encrypt_key

Зашифровать приватный ключ паролем

zetrix_crypto_decrypt_key

Расшифровать зашифрованный приватный ключ

Разработка смарт-контрактов (7 инструментов)

Инструмент

Описание

zetrix_contract_get_chain_functions

Документация функций объекта Chain

zetrix_contract_get_utils_functions

Документация функций объекта Utils

zetrix_contract_get_structure_guide

Руководство по структуре контракта и паттернам ES5

zetrix_contract_get_token_standard

Спецификации стандартов токенов (ZTP20, ZTP721, ZTP1155)

zetrix_contract_init_dev_environment

Инициализировать проект разработки через create-zetrix-tool

zetrix_contract_generate_advanced

Сгенерировать архитектуру контракта с несколькими классами

zetrix_contract_get_testing_guide

Руководство по тестированию (TEST_INVOKE, TEST_QUERY)

Поддерживаемые сети

Сеть

HTTP RPC

WebSocket

Mainnet

https://node.zetrix.com

wss://ws-node.zetrix.com

Testnet

https://test-node.zetrix.com

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

Конфигурация

Переменные окружения

Переменная

Описание

По умолчанию

ZETRIX_NETWORK

Выбор сети (mainnet или testnet)

mainnet

ZETRIX_RPC_URL

Пользовательский HTTP RPC эндпоинт (переопределяет сеть по умолчанию)

—

ZETRIX_WS_URL

Пользовательский WebSocket эндпоинт (переопределяет сеть по умолчанию)

—

ZETRIX_TRANSPORT

Режим транспорта (stdio или http)

stdio

ZETRIX_PORT

Порт HTTP-сервера (используется только при ZETRIX_TRANSPORT=http)

3000

ZETRIX_PRIVATE_KEY

Приватный ключ по умолчанию для подписи транзакций (опционально, скрывает ключ из диалога)

—

ZETRIX_SOURCE_ADDRESS

Адрес отправителя по умолчанию для транзакций (опционально)

—

Безопасные транзакции (рекомендуется)

Установив ZETRIX_PRIVATE_KEY и ZETRIX_SOURCE_ADDRESS в качестве переменных окружения, ваш приватный ключ никогда не будет раскрыт в диалоге. LLM может выполнять транзакции, например «отправить 0.01 ZETRIX на ZTX3...», не видя вашего ключа.

{
  "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"
      }
    }
  }
}

Примечание: Это необязательно. Если не задано, LLM потребуется запросить или получить приватный ключ и адрес отправителя в ходе диалога. Если задано, они используются по умолчанию — вы все равно можете переопределить их при вызове каждого инструмента, если это необходимо.

Claude Code (CLI)

Добавьте MCP-сервер прямо из командной строки:

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

С пользовательскими RPC и WebSocket URL:

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

Отредактируйте файл конфигурации 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"
      }
    }
  }
}

Обе сети (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"
      }
    }
  }
}

С пользовательскими RPC и WebSocket URL:

{
  "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"
      }
    }
  }
}

После сохранения файла конфигурации перезапустите Claude Desktop, чтобы изменения вступили в силу.

Примечание: ZETRIX_RPC_URL и ZETRIX_WS_URL переопределяют эндпоинты по умолчанию для выбранной сети. Вы можете переопределить один или оба. Если не задано, используются значения по умолчанию из таблицы выше.

HTTP-транспорт (API-сервер)

Запустите MCP-сервер как HTTP API-сервер, используя транспорт Streamable HTTP. Это позволяет удаленным MCP-клиентам подключаться по сети.

Запуск сервера (по умолчанию mainnet):

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

С testnet:

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

Эндпоинты:

Эндпоинт

Метод

Описание

/mcp

POST

Эндпоинт протокола MCP (Streamable HTTP)

/health

GET

Проверка работоспособности — возвращает { status, version, network }

Подключение из MCP-клиента:

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

Обе сети (mainnet + testnet):

Запустите два сервера на разных портах:

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 &

Затем настройте ваш MCP-клиент:

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

Примечание: HTTP-транспорт использует спецификацию MCP Streamable HTTP. К нему может подключиться любой MCP-клиент, поддерживающий транспорт StreamableHTTP.

Логи сервера:

Сервер записывает логи в stderr. Чтобы просмотреть логи, запустите в фоновом режиме или перенаправьте в файл:

# 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

Разработка

Структура проекта

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

Сборка

npm install
npm run build

Тестирование

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

Лицензия

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