Enables querying blockchain data through the Native Indexer (NIX) system, providing tools for retrieving blocks, transactions, account information, balances, and network status across various blockchain networks including NEAR.
NIX MCP Server
A Python-based MCP (Model Context Protocol) server providing Native Indexer (NIX) query capabilities for blockchain data. This server can be used with Claude Code to enable AI-powered blockchain data queries and analysis.
Overview
The NIX MCP Server enables querying blockchain data through the Native Indexer system using a standardized MCP interface. It communicates with a Rodeos endpoint to fetch data from various blockchains and networks.
Features
Available Tools
Configuration Tools
nix_get_global_configs
- Get global configurations for all or specific networksnix_get_network_status
- Get the status of a specific blockchain network
Block Query Tools
nix_get_blocks
- Query blocks by range or specific height
Transaction Tools
nix_get_transaction
- Get a specific transaction by hashnix_get_transactions
- Get latest transactions or filter by account
Account Tools
nix_get_account
- Get account informationnix_get_account_balance
- Get account balancesnix_get_account_keys
- Get account public keys
Installation
Prerequisites
Python 3.11 or higher
UV package manager
Access to a Rodeos endpoint (default: http://127.0.0.1:8880)
Optional: Access to a Nodeos endpoint for ABI fetching (default: http://127.0.0.1:8888)
Setup
Clone the repository with submodules:
Initialize the project (installs UV and dependencies):
Configure environment (optional):
Usage with Claude Code
Configuration in Claude Code
Open Claude Code settings (⌘+, on Mac or Ctrl+, on Windows/Linux)
Navigate to the MCP Servers section
Add the NIX MCP server configuration:
Restart Claude Code to load the MCP server
Using the Tools in Claude
Once configured, you can use natural language to query blockchain data:
"Get the latest blocks on NEAR mainnet"
"Show me the transaction with hash 0x123..."
"Get the account balance for alice.near"
"Fetch network status for ETH testnet"
The tools will be available in Claude's tool panel and can be invoked automatically based on your queries.
Manual Usage
Running the Server Standalone
Configuration
Environment Variables
The server can be configured through environment variables (set in .env
file or passed directly):
RODEOS_ENDPOINT
- Rodeos HTTP endpoint URL (default: http://127.0.0.1:8880)NODEOS_API
- Nodeos API endpoint for ABI fetching (default: http://127.0.0.1:8888)NIX_QUERY_CONTRACT
- NIX query contract account (default: nix.q)NIX_CONTRACT
- NIX main contract account (default: nix)LOG_LEVEL
- Logging level: DEBUG, INFO, WARNING, ERROR (default: INFO)CLEOS_PATH
- Path to cleos binary if not in PATH (optional)
Development
Project Structure
Next Steps
See NIX_MCP_IMPLEMENTATION_PLAN.md for the complete roadmap of features to be implemented.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables AI-powered blockchain data queries and analysis through the Native Indexer (NIX) system. Supports querying blocks, transactions, account information, and network status across various blockchain networks.