Skip to main content
Glama
qubic-mcp

qubic-mcp

by fyllepo

qubic-mcp

MCP server for the Qubic cryptocurrency — enabling AI assistants to interact with the Qubic network.

npm version CI License: MIT PRs Welcome

Overview

qubic-mcp is an open-source Model Context Protocol (MCP) server that gives AI assistants — Claude, ChatGPT, Copilot, Cursor, and others — native access to the Qubic blockchain.

Query balances, inspect transactions, monitor the network, trade on QX, switch between networks, and interact with smart contracts — all through natural language.

Related MCP server: bybit-trading

What's New in v0.4

  • Smart Contract Profiles — Register custom SC interface definitions, then query them by name with automatic binary encoding/decoding

  • Network Management — Save and switch between mainnet, testnet, or your own local/lite node at runtime

  • Epoch Computors — Query the 676 computor identities for any epoch

  • MCP Prompts — Predefined workflows for portfolio analysis, market overview, and research

  • MCP Resources — Qubic reference documentation (network, tokenomics, smart contracts, address format)

  • HTTP Transport — Run as a standalone HTTP server for remote deployment

Features

Blockchain Query Tools

  • Balance & Transfers — Query any Qubic address balance and transfer history

  • Transactions — Look up transaction details by ID

  • Network Status — Current tick, epoch, supply, burned QUs, active addresses, market cap

  • Mining Phase — Current MINING/IDLE phase, cycle progress, and XMR marathon status

  • Epoch Computors — List all 676 computor identities for a given epoch

  • Rich List — Top holders ranked by balance

Market & Analytics

  • Token Price — Real-time QUBIC price compared across 3 sources (CoinGecko, Qubic API, CryptoCompare)

  • QU/USD Converter — Convert between QU and USD at live rates

  • Token Registry — List all registered Qubic tokens with issuer and website

  • QX DEX Orderbook — Live ask/bid orders for any token on the QX decentralized exchange

Smart Contract Tools

  • Register Contract — Save a custom SC interface definition (function names, input/output field schemas)

  • Query Contract — Query a registered SC function by name with automatic binary encoding/decoding

  • Raw SC Query — Low-level smart contract query with base64 input/output for advanced use

  • List/Remove Contracts — Manage your registered contract definitions

Local Management

  • Wallet Management — Save wallet addresses locally for quick access

  • Network Switching — Save and switch between mainnet, testnet, or custom RPC endpoints at runtime

  • Address Validation — Check format and on-chain activity

  • Explorer Links — Direct links to the official Qubic block explorer

AI Context

  • MCP Resources — Qubic reference docs (network, tokenomics, smart contracts, address format) available as context

  • MCP Prompts — Predefined workflows: portfolio analysis, market overview, and Qubic research

Quick Start

Works with any MCP-compatible AI client — Claude, ChatGPT, Copilot, Cursor, Windsurf, Gemini, JetBrains, and more.

Add this to your client's MCP config:

{
  "mcpServers": {
    "qubic": {
      "command": "npx",
      "args": ["mcp-server-qubic"]
    }
  }
}

Client

Config location

Claude Desktop (macOS)

~/Library/Application Support/Claude/claude_desktop_config.json

Claude Desktop (Windows)

%APPDATA%\Claude\claude_desktop_config.json

Claude Desktop (Linux)

~/.config/Claude/claude_desktop_config.json

Claude Code

Run claude mcp add qubic -- npx mcp-server-qubic in your terminal

VS Code / Cursor / Windsurf

.vscode/mcp.json or your editor's MCP settings

JetBrains IDEs

Settings > Tools > AI Assistant > MCP Servers

ChatGPT Desktop

Settings > MCP Servers > Add

For other clients, check your app's MCP documentation — the config above is universal.

Then just ask in plain English:

Wallet Management

"Save my wallet UXITJAGNXUE...RAPDBE as my-main"
"List my wallets"
"Remove my old-wallet"

Balances & Transfers

"What's the balance of my-main?"
"Show transfer history for my-main over the last 1000 ticks"

Price & Market

"What's the current QUBIC price?"
"How much is 1 billion QU worth in USD?"
"Convert $100 to QU"

Network & Mining

"What's the current tick?"
"Show me the network status"
"What mining phase are we in?"
"Who are the top Qubic holders?"

QX DEX & Tokens

"What tokens are available on Qubic?"
"Show the QX orderbook for CFB"
"Show bid orders for QMINE on QX"

Network Switching

"Add my local network at http://192.168.1.50:21841"
"Switch to my local network"
"Switch back to mainnet"
"List my networks"

Smart Contract Queries

"Register my counter contract at index 10 with these functions: [...]"
"Query counter getStats"
"Query counter getValue with key 1"
"List my registered contracts"

Smart Contract Development Workflow

One of the most powerful features of qubic-mcp is its smart contract profile system. If you're developing a Qubic smart contract on a local lite network, you can use the MCP to test your contract's RPC interface directly through your AI assistant.

Why This Matters

Qubic smart contracts communicate via binary-encoded structs over the /v1/querySmartContract RPC endpoint. Without tooling, this means manually encoding fields into base64, making HTTP calls, and decoding binary responses — error-prone and tedious.

With qubic-mcp, you register your contract's interface once, and then query it by name with human-readable input and output. Your AI assistant handles all the binary encoding/decoding automatically.

Step-by-Step

1. Point the MCP at your test network:

"Add my test network at http://192.168.1.50:21841 called my-testnet"
"Switch to my-testnet"

Your MCP server now talks to your local lite node instead of mainnet. This persists across sessions in ~/.qubic-mcp/networks.json.

2. Register your contract's interface:

Tell the assistant your contract's index and function definitions. Here's a simple counter contract at index 10 as an example:

Register my counter contract at index 10 with these functions:

- getStats (inputType 1): no input, output is totalKeys (uint32) and totalIncrements (uint64)
- getValue (inputType 2): input is key (uint32), output is value (uint64) and lastUpdatedTick (uint32)

The assistant will call register_contract with the proper field schema JSON. The definition is saved to ~/.qubic-mcp/contracts.json and persists across sessions.

Supported field types: uint8, uint16, uint32, uint64, int8, int16, int32, int64, identity (60-char Qubic address / 32-byte pubkey), padding (skipped bytes).

Fields support count for arrays and enum for value-to-label mapping.

3. Query your contract by name:

"Query counter getStats"
"Query counter getValue with key 1"

The MCP encodes your input into binary, calls the RPC endpoint, and decodes the response into named fields:

counter.getValue
================

  value: 42
  lastUpdatedTick: 22,345,678

4. Switch back to mainnet when done:

"Switch to mainnet"

Installation

npm install -g mcp-server-qubic

From source

git clone https://github.com/fyllepo/qubic-mcp.git
cd qubic-mcp
npm install
npm run build

Configuration

Network Management

The easiest way to configure which Qubic network you talk to is through the built-in tools — no env vars needed:

  1. Add a custom network: add_network — save your local node's IP with a friendly name

  2. Switch networks: switch_network — toggle between mainnet, testnet, or any saved network

  3. List networks: list_networks — see all available networks and which is active

Networks are saved to ~/.qubic-mcp/networks.json and persist across sessions. Built-in networks (mainnet, testnet) are always available.

Environment Variables

For advanced use or CI environments, you can also configure via env vars. See .env.example.

Variable

Default

Description

QUBIC_RPC_URL

(from active network)

Override the RPC endpoint (takes priority over saved networks)

QUBIC_API_URL

(from active network)

Override the Query API endpoint

QUBIC_NETWORK_LABEL

(auto)

Friendly label shown when using QUBIC_RPC_URL override

MCP_HTTP_PORT

(not set)

Set a port to run as an HTTP server instead of stdio

HTTP Transport

By default the server uses stdio, which is what most MCP clients expect. To run it as a standalone HTTP endpoint instead, set MCP_HTTP_PORT:

MCP_HTTP_PORT=3000 node dist/index.js

The server exposes a single /mcp endpoint that supports the MCP Streamable HTTP transport:

  • POST /mcp — send JSON-RPC requests (initialize creates a session)

  • GET /mcp — open an SSE stream for server notifications (requires mcp-session-id header)

  • DELETE /mcp — terminate a session

All Tools

Blockchain

Tool

Description

get_balance

Get balance and transfer activity for an address or saved wallet

get_tick_info

Get current tick number, epoch, and tick duration

get_network_status

Network stats: supply, burned QUs, active addresses, tick quality, market cap

get_transaction

Look up a transaction by its 60-character ID

get_transfer_history

Paginated transfer history for an address within a tick range

get_mining_phase

Current MINING/IDLE phase, cycle progress, and XMR marathon status

get_epoch_computors

List all 676 computor identities for a given epoch

get_rich_list

Top Qubic addresses ranked by balance with pagination

Market & Tokens

Tool

Description

get_token_price

QUBIC price compared across CoinGecko, Qubic API, and CryptoCompare

convert_qu_usd

Convert between QU and USD using live price

get_token_list

List all registered Qubic tokens with name, issuer address, and website

get_qx_orderbook

QX DEX orderbook — ask and/or bid orders for any token, with pagination

Smart Contract Development & Testing

Tool

Description

register_contract

Register a custom SC definition with typed function schemas

query_contract

Query a registered SC function by name (auto binary encode/decode)

query_smart_contract

Low-level SC query with raw base64 input/output

list_contracts

List all registered contract definitions

remove_contract

Remove a registered contract definition

Wallets

Tool

Description

save_wallet

Save a Qubic address with a friendly name for quick access

list_wallets

List all saved wallets

remove_wallet

Remove a saved wallet

Network Management

Tool

Description

add_network

Save a custom Qubic network (e.g., local lite node) for quick switching

switch_network

Switch the active network (mainnet, testnet, or any saved custom network)

list_networks

List all available networks and show which is currently active

remove_network

Remove a saved custom network

Utility

Tool

Description

validate_address

Validate address format and check on-chain activity

get_explorer_links

Get links to Qubic block explorers for an address or transaction

MCP Resources

Resource URI

Description

qubic://docs/network

Qubic network: epochs, ticks, quorum consensus, computor ranking

qubic://docs/tokenomics

Qubic tokenomics: supply cap, emission schedule, burning

qubic://docs/smart-contracts

Qubic smart contracts: governance, execution, IPO process

qubic://docs/address-format

Qubic identity system: seed to private key to public key to address

qubic://docs/oracles

Qubic Oracle Machines: bridging smart contracts with real-world data via QPI

qubic://docs/sc-architecture

Qubic smart contract architecture: state, procedures, functions, logging

qubic://docs/sc-lifecycle

Smart contract lifecycle: from research through proposal, IPO, deployment, and maintenance

qubic://docs/ticks-concurrency

Qubic ticks and concurrency: tick lifecycle, parallel execution, transaction ordering

qubic://docs/interact-sc

Interacting with Qubic smart contracts: calling functions, invoking procedures

qubic://docs/execution-fees

Qubic contract execution fees: fee reserves, invocation costs, burn mechanics

qubic://docs/rpc

Qubic RPC API: endpoints, smart contract queries, transaction broadcasting

qubic://docs/qpi

Qubic Protocol Interface (QPI): the API available to smart contracts

MCP Prompts

Prompt

Description

qubic-portfolio

Analyze your portfolio: wallet balances, token holdings, USD values

qubic-market

Market overview: price, network stats, mining phase, rich list

qubic-research

Research a Qubic topic using the built-in reference documentation

Local Data

qubic-mcp stores local data in ~/.qubic-mcp/:

File

Purpose

wallets.json

Saved wallet addresses (public addresses only, never private keys)

networks.json

Saved network profiles and active network selection

contracts.json

Registered smart contract interface definitions

Security

This project takes security seriously, especially given it interacts with a financial network.

  • No private keys — This server is read-only. It never asks for, stores, or transmits private keys or seeds.

  • Input validation — All inputs are validated with Zod schemas before processing.

  • No telemetry — No analytics, tracking, or data collection of any kind.

  • Auditable — Fully open source. Read every line.

See SECURITY.md for our vulnerability disclosure policy.

Contributing

Contributions are welcome and encouraged! Whether you're fixing a bug, adding a new tool, improving docs, or suggesting an idea — we'd love your help.

See CONTRIBUTING.md for guidelines.

Roadmap

See ROADMAP.md for our planned features and future direction.

License

MIT — see LICENSE.

Disclaimer

This software is provided "as is" without warranty of any kind. The authors and contributors are not responsible for any loss of funds, data, or other damages resulting from the use of this software.

This tool interacts with the Qubic blockchain where transactions are irreversible. Users are solely responsible for verifying all information and understanding the risks. This software does not provide financial advice.

Available Tools

27 tools
add_networkA

Save a custom Qubic network (e.g., a local lite node). Stored in ~/.qubic-mcp/networks.json. Use switch_network to activate it.

Inputs: name (required), rpcUrl (required), apiUrl.

convert_qu_usdA

Convert between QU (Qubic Units) and USD using the current live price. Specify either a QU amount to get USD value, or a USD amount to get the equivalent in QU.

Inputs: qu, usd.

get_balanceA

Get the current balance of a Qubic address or saved wallet. Accepts a 60-character Qubic address OR a saved wallet name (e.g., "my-main"). Use save_wallet to save addresses for quick access.

Inputs: address (required).

get_epoch_computorsA

List the computor identities for a given epoch. Computors are the 676 nodes that validate transactions on the Qubic network. Defaults to the current epoch if none is specified.

Inputs: epoch.

get_mining_phaseA

Get the current Qubic mining phase (MINING or IDLE) and whether it's an XMR marathon day. The network alternates between mining and idle phases every ~1,353 ticks, and between Qubic AI solution days and XMR mining days every 24 hours.

Inputs: no named parameters.

get_network_statusA

Get comprehensive Qubic network status including current tick, epoch progress, circulating supply, burned QUs, active addresses, price, and market cap.

Inputs: no named parameters.

get_qx_orderbookA

Query the QX decentralized exchange orderbook for a Qubic token. Returns current ask (sell) and bid (buy) orders with price and quantity.

IMPORTANT: You MUST call get_token_list first to find the exact issuer address. NEVER guess or fabricate an issuer address. If the token is not in the registry, tell the user it was not found and ask them to provide the issuer address.

Inputs: issuer (required), asset_name (required), side, offset.

get_rich_listA

Get the Qubic rich list — top addresses ranked by balance for the current epoch. Supports pagination.

Inputs: page, pageSize.

get_tick_infoA

Get the current Qubic network tick information. Returns the current tick number, epoch, and tick duration. Qubic processes transactions in ticks (~5 seconds each) organized into epochs (~1 week each).

Inputs: no named parameters.

get_token_listA

Get a list of all registered Qubic tokens with their name, issuer address, and website. Useful for finding token issuers needed for QX orderbook queries.

Inputs: no named parameters.

get_token_priceA

Get the current QUBIC token price compared across multiple sources (CoinGecko, Qubic Official API, CryptoCompare). Shows price, 24h change, market cap, and volume with source-by-source comparison.

Inputs: no named parameters.

get_transactionA

Look up a Qubic transaction by its transaction ID. Returns source, destination, amount, tick, and execution status. Transaction IDs are 60 lowercase letters.

Inputs: transactionId (required).

get_transfer_historyA

Get the transfer history for a Qubic address or saved wallet within a tick range. Returns incoming and outgoing transfers with details. Use get_tick_info first to find the current tick number.

Inputs: address (required), endTick (required), startTick (required), page, +1 more.

get_versionA

Get the current qubic-mcp server version

Inputs: no named parameters.

list_contractsA

List all registered custom smart contract definitions with their functions and field schemas.

Inputs: no named parameters.

list_networksA

List all available Qubic networks (built-in and custom) and show which is currently active.

Inputs: no named parameters.

list_walletsA

List all saved Qubic wallet addresses. These are public addresses only — no private keys are ever stored.

Inputs: no named parameters.

query_contractA

Query a registered smart contract function with automatic binary encoding/decoding.

Use register_contract first to define the contract's functions and their field schemas. Then call this tool by contract name and function name.

Input values are provided as a JSON object with field names as keys. For example: {"gateId": 1}

The response is automatically decoded into human-readable named fields.

Inputs: contract (required), function (required), input.

query_smart_contractB

Query a Qubic smart contract (read-only). Returns the contract's response data as base64-encoded bytes.

Known contracts: 1: QX (Decentralized Exchange) 2: Quottery (Betting & Oracles) 3: Random (Random Number Generation) 4: QUTIL (Utility Functions) 5: MLM (My Last Match - Gaming)

This is a low-level query tool. Use inputType to specify which contract function to call, and inputHex for the function parameters (hex-encoded bytes). If unsure about parameters, start with inputType=0 and empty input to get contract info.

Inputs: inputType (required), contractIndex (required), inputSize, requestData.

register_contractA

Register a custom smart contract definition for use with query_contract.

Provide the contract's on-chain index and a JSON array of function definitions describing the binary input/output layout. Once registered, you can query the contract by name with automatic encoding and decoding.

Supported field types: uint8, uint16, uint32, uint64, int8, int16, int32, int64, identity (32-byte pubkey ↔ 60-char address), padding (skipped bytes).

Fields support "count" for arrays (e.g., 8 recipients) and "enum" for value→label mapping.

Example functions JSON: [{ "name": "getGateCount", "inputType": 6, "input": [], "output": [ { "name": "totalGates", "type": "uint64" }, { "name": "activeGates", "type": "uint64" } ] }]

Inputs: name (required), functions (required), contractIndex (required), identity, +1 more.

remove_contractB

Remove a registered smart contract definition by name.

Inputs: name (required).

remove_networkA

Remove a saved custom network. Cannot remove built-in networks (mainnet, testnet). If the removed network was active, switches back to mainnet.

Inputs: name (required).

remove_walletA

Remove a saved wallet by name. This only removes the local reference — it does not affect the actual blockchain address in any way.

Inputs: name (required).

save_walletA

Save a Qubic wallet address with a friendly name for quick access. Only saves the public address — never stores seeds or private keys. Stored locally in ~/.qubic-mcp/wallets.json.

Inputs: name (required), address (required).

switch_networkA

Switch the active Qubic network. All subsequent tool calls will use the new endpoint. Built-in networks: "mainnet", "testnet". Use add_network to save custom networks.

Inputs: name (required).

validate_addressA

Validate a Qubic address format and check if it exists on-chain with balance or transfer activity.

Inputs: address (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 27 tools

    Disambiguation3/5

    Several tools have overlapping purposes, such as get_tick_info and get_network_status both returning tick data, and query_smart_contract vs query_contract both dealing with contract queries. Descriptions help distinguish them, but the boundaries are not always clear, especially for agents choosing between the two contract query tools.

    Naming Consistency4/5

    Most tools use a consistent verb_noun pattern (e.g., save_wallet, list_wallets, get_balance). Minor deviations include the confusing similarity between query_smart_contract and query_contract, and the use of 'qu_usd' instead of a more standard naming convention, but overall the pattern is predictable.

    Tool Count2/5

    With 27 tools, the server exceeds the threshold for a heavy tool set (25+). While the breadth covers many Qubic features, the count feels excessive and could be consolidated, such as merging the two contract query tools or reducing the number of local config tools.

    Completeness3/5

    The server covers a wide range of read-only Qubic operations: balances, transfers, network status, mining, DEX orderbooks, and smart contract queries. However, there is no ability to send transactions or perform any on-chain write, which is a notable gap for a wallet and network management server, even if intentional for security.

    Maintenance

    ActivityInactive
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers