Zetrix MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Zetrix MCP Serverwhat's the balance of account ZETRIX1234567890abcdef?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zetrix MCP Server
A comprehensive Model Context Protocol (MCP) server for interacting with the Zetrix blockchain. Provides 55 tools across 7 categories — HTTP RPC, WebSocket (protobuf), SDK transactions, cryptography, and smart contract development. Supports both stdio and HTTP transport modes.
Zetrix Currency Information
Native Coin: ZETRIX
Main Unit: ZETRIX
Base Unit: ZETA
Conversion: 1 ZETRIX = 1,000,000 ZETA
Gas Price: Evaluated dynamically via
testTransaction
Quick Start
npx zetrix-mcp-serverOr install globally:
npm install -g zetrix-mcp-serverGuides:
QUICKSTART.md — Get set up in 5 minutes
EXAMPLES.md — Learn through 20+ examples
TEST_REPORT.md — Comprehensive test results for all 55 tools
Features (56 Tools)
General (1 tool)
Tool | Description |
| Get MCP server version and network info |
HTTP RPC (16 tools)
Tool | Description |
| Check node health status |
| Get account info including balance and metadata |
| Get block by height |
| Get latest block |
| Get transaction by hash |
| Get balance in ZETA and ZETRIX |
| Generate new keypair (testing only) |
| Get basic account info |
| Get asset holdings |
| Get account metadata |
| Get completed transactions |
| Get pending transactions |
| Get ledger/block info |
| Execute multiple queries |
| Serialize transaction to hex |
| Submit signed transaction |
Contract Query (2 tools)
Tool | Description |
| Call contract in sandbox (read-only) |
| Evaluate fees without submitting |
WebSocket — Real-time (5 tools)
Uses protobuf binary encoding for communication with Zetrix nodes.
Tool | Description |
| Connect and register via protobuf CHAIN_HELLO |
| Submit transaction with real-time status |
| Subscribe to transaction notifications |
| Disconnect from WebSocket |
| Check connection status |
SDK Query (5 tools)
Tool | Description |
| Create new account |
| Get balance via SDK |
| Check if account is activated |
| Get account nonce |
| Call contract via SDK (read-only) |
SDK Transactions (11 tools)
All transaction tools use evaluateFee (testTransaction) for dynamic gas pricing. Optional gasPrice/feeLimit overrides supported on all operations.
Tool | Description |
| Send native ZETRIX to another address |
| Activate a new account with initial balance |
| Set key-value metadata on an account |
| Set account weights, thresholds, and signers |
| Issue a new custom token |
| Transfer a custom token |
| Deploy a smart contract (with optional owner) |
| Invoke contract with gas payment |
| Invoke contract with asset transfer |
| Upgrade contract code and/or transfer ownership |
| Create an on-chain event log |
Cryptography (8 tools)
Tool | Description |
| Generate new keypair (address, private key, public key) |
| Derive public key from private key |
| Get address from public key |
| Validate private key, public key, or address format |
| Sign a message (hex) with a private key |
| Verify a signature |
| Encrypt private key with password |
| Decrypt encrypted private key |
Smart Contract Development (7 tools)
Tool | Description |
| Chain object function documentation |
| Utils object function documentation |
| Contract structure and ES5 patterns guide |
| Token standard specs (ZTP20, ZTP721, ZTP1155) |
| Initialize dev project via |
| Generate multi-class contract architecture |
| Testing guide (TEST_INVOKE, TEST_QUERY) |
Supported Networks
Network | HTTP RPC | WebSocket |
Mainnet |
|
|
Testnet |
|
|
Configuration
Environment Variables
Variable | Description | Default |
| Network selection ( |
|
| Custom HTTP RPC endpoint (overrides network default) | — |
| Custom WebSocket endpoint (overrides network default) | — |
| Transport mode ( |
|
| HTTP server port (only used when |
|
| Default private key for signing transactions (optional, keeps key out of conversation) | — |
| Default source address for transactions (optional) | — |
Secure Transactions (Recommended)
By setting ZETRIX_PRIVATE_KEY and ZETRIX_SOURCE_ADDRESS as environment variables, your private key is never exposed in the conversation. The LLM can execute transactions like "send 0.01 ZETRIX to ZTX3..." without ever seeing your key.
{
"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"
}
}
}
}Note: These are optional. If not set, the LLM will need to ask for or be given the private key and source address in the conversation. If set, they are used as defaults — you can still override them per-tool call if needed.
Claude Code (CLI)
Add the MCP server directly from the command line:
Mainnet:
claude mcp add zetrix-mainnet -s user -- npx -y zetrix-mcp-server -e ZETRIX_NETWORK=mainnetTestnet:
claude mcp add zetrix-testnet -s user -- npx -y zetrix-mcp-server -e ZETRIX_NETWORK=testnetWith custom RPC and WebSocket URLs:
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.comClaude Desktop
Edit your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonWindows (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"
}
}
}
}Both networks (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"
}
}
}
}With custom RPC and WebSocket URLs:
{
"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"
}
}
}
}After saving the config file, restart Claude Desktop for changes to take effect.
Note:
ZETRIX_RPC_URLandZETRIX_WS_URLoverride the default endpoints for the selected network. You can override just one or both. If not set, the defaults from the table above are used.
HTTP Transport (API Server)
Run the MCP server as an HTTP API server using the Streamable HTTP transport. This allows remote MCP clients to connect over the network.
Start the server (defaults to mainnet):
ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 npx zetrix-mcp-serverWith testnet:
ZETRIX_TRANSPORT=http ZETRIX_PORT=3000 ZETRIX_NETWORK=testnet npx zetrix-mcp-serverEndpoints:
Endpoint | Method | Description |
| POST | MCP protocol endpoint (Streamable HTTP) |
| GET | Health check — returns |
Connect from an MCP client:
{
"mcpServers": {
"zetrix": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}Both networks (mainnet + testnet):
Run two servers on different ports:
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 &Then configure your MCP client:
{
"mcpServers": {
"zetrix-mainnet": {
"type": "http",
"url": "http://localhost:3000/mcp"
},
"zetrix-testnet": {
"type": "http",
"url": "http://localhost:3001/mcp"
}
}
}Note: The HTTP transport uses the MCP Streamable HTTP specification. Any MCP client that supports
StreamableHTTPtransport can connect to it.
Server logs:
The server logs to stderr. To view logs, run in the foreground or redirect to a file:
# 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.logDevelopment
Project Structure
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 outputBuild
npm install
npm run buildTest
npm test # HTTP RPC tests
ZETRIX_NETWORK=testnet npm test # Run on testnet
npm run test:sdk # SDK tests
npm run test:encryption # Crypto testsLicense
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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