Skip to main content
Glama

HumbleSwapMCP

Protocol MCP server for the Humble Swap DEX on Voi.

Architecture

HumbleSwapMCP is a protocol-level MCP that sits above the infrastructure MCP layer:

UluCoreMCP / UluVoiMCP / UluWalletMCP / UluBroadcastMCP
                        ↓
                  HumbleSwapMCP
                        ↓
               Humble API (reads)
               On-chain (writes)

Data sources:

  • Humble API (humble-api.voi.nautilus.sh) — Pool listings, token metadata, price tickers.

  • On-chain (algod) — Pool Info, swap simulation, transaction preparation.

HumbleSwapMCP handles:

  • Pool discovery with token pairs, liquidity, and volume data

  • Token listing with metadata

  • Price data (current, historical, trends, aggregated)

  • Swap quote simulation (no transaction built)

  • Swap transaction preparation (unsigned)

  • Add/remove liquidity transaction preparation (unsigned)

  • Arbitrage opportunity detection

  • Multi-hop swap routing

HumbleSwapMCP does NOT:

  • Sign transactions (use UluWalletMCP)

  • Broadcast transactions (use UluBroadcastMCP)

  • Manage wallets

Related MCP server: Robinhood Chain MCP Server

Tools

Pools

Tool

Description

get_pools

List Humble Swap pools with token pairs, liquidity, and volume data

get_pool

Get detailed on-chain pool info (balances, fees, LP supply)

get_pool_details

Get detailed pool info from the Humble API

get_pool_analytics

Get pool analytics (TVL, liquidity depth, concentration)

get_pool_stats

Get comprehensive stats for a specific pool

get_all_pools_stats

Get stats across all pools

compare_pools

Compare multiple pools side by side

Tokens

Tool

Description

get_tokens

List tokens available on Humble Swap

get_tickers

Get price ticker data for trading pairs

search_tokens

Search tokens by name or symbol

get_token_metadata

Get enriched metadata for a token

get_token_stats

Get comprehensive stats for a token

get_token_pools

Get pools containing a specific token

get_all_tokens_stats

Get stats across all tokens

get_token_rankings

Get token rankings by various metrics

Prices

Tool

Description

get_prices

Get current prices for all tokens

get_token_price

Get current price for a specific token

get_price_history

Get historical price data

get_price_trends

Get price trend analytics (momentum, moving averages)

get_price_aggregated

Get aggregated price across pool sources

Trading

Tool

Description

get_quote

Simulate a swap — returns expected output, rate, fee, price impact, minimum received

get_swap_route

Find all possible swap paths between two tokens

swap_txn

Build unsigned swap transactions

add_liquidity_txn

Build unsigned add-liquidity transactions

remove_liquidity_txn

Build unsigned remove-liquidity transactions

get_protocol_stats

Get protocol-wide statistics (TVL, volume, pool count)

get_arbitrage_opportunities

Detect arbitrage opportunities across pools

get_triangular_arbitrage

Detect triangular arbitrage (A→B→C→A)

Agent Workflow

Agent calls HumbleSwapMCP:  swap_txn(fromToken, toToken, amount, sender)
       → returns { transactions: [base64, ...] }

Agent calls UluWalletMCP: wallet_sign_transactions(signerId, transactions)
       → returns signed transactions

Agent calls UluBroadcastMCP: broadcast_transactions(network, txns)
       → returns transaction IDs

Setup

npm install

Usage

node index.js

Testing

npm test

Adding to a Client

Add to your MCP client config (e.g. ~/.cursor/mcp.json):

{
  "mcpServers": {
    "humble-swap": {
      "command": "node",
      "args": ["/absolute/path/to/HumbleSwapMCP/index.js"]
    }
  }
}

Chain Support

Currently Voi mainnet only. All swap pools use the swap200 contract standard with ARC-200 tokens. The default chain is configured via DEFAULT_CHAIN in lib/client.js.

Native VOI handling: VOI (native token) is automatically wrapped/unwrapped to wVOI (contract 390001) during swaps. Users interact with "VOI" — wrapping is transparent.

Project Structure

index.js              MCP server entry point — registers tools and starts transport
tools/
  pools.js            Pool tool registrations (7 tools)
  tokens.js           Token tool registrations (8 tools)
  prices.js           Price tool registrations (5 tools)
  trading.js          Quote, txn, arbitrage, router, protocol tools (8 tools)
lib/
  api.js              Humble API client with timeouts (humble-api.voi.nautilus.sh)
  client.js           Algod/Indexer client factory, token ID helpers, DEFAULT_CHAIN
  pools.js            Pool discovery with TTL caching, parallel best-pool selection
  tokens.js           Token listing with TTL caching and symbol resolution
  quote.js            Swap simulation via read-only contract calls
  builders.js         Unsigned transaction group builders with permutation retries
  utils.js            Shared utilities (toBaseUnits, fromBaseUnits, tryPermutations)
data/
  contracts.json      Network config, API URLs, key token IDs
  pool-abi.json       Pool contract ABI (swap200)
test/
  utils.test.js       Unit tests for shared utilities
  client.test.js      Unit tests for client helpers
  tokens.test.js      Unit tests for token resolution
  pools.test.js       Unit tests for pool helpers

References

Contract notes

The swap200 pool contract uses a simulate boolean (first byte arg) on all mutating APIs:

  • simulate=true (1): Computes the result but does NOT execute token transfers or update pool state. Used for quoting.

  • simulate=false (0): Executes the actual swap — transfers tokens via arc200_transferFrom/arc200_transfer and updates pool balances.

Transaction builders must use 0 (execute) when constructing the actual transaction group, and 1 (simulate) only for read-only quote simulation.

The Info view struct returns tokB before tokA — the on-chain token ordering may differ from API listings, so builders always call Info() to determine the correct swap direction.

Pool Contract ABI

The swap200 pool contract exposes:

Method

Signature

Purpose

Info

()((uint256,uint256),(uint256,uint256),(uint256,uint256,uint256,address,byte),(uint256,uint256),uint64,uint64)

Pool state (balances, LP, fees, token IDs)

Trader_swapAForB

(byte,uint256,uint256)(uint256,uint256)

Swap token A for token B

Trader_swapBForA

(byte,uint256,uint256)(uint256,uint256)

Swap token B for token A

Trader_exactSwapAForB

(byte,uint256,uint256)(uint256,uint256)

Exact-output swap A→B

Trader_exactSwapBForA

(byte,uint256,uint256)(uint256,uint256)

Exact-output swap B→A

Provider_deposit

(byte,(uint256,uint256),uint256)uint256

Add liquidity

Provider_withdraw

(byte,uint256,(uint256,uint256))(uint256,uint256)

Remove liquidity

Token Standards

  • Network (VOI): Wrapped via nt200 (wVOI, contract 390001). Deposit wraps native VOI; withdraw unwraps.

  • ARC-200: Native ARC-200 tokens (e.g. VIA, GM, UNIT). Used directly.

  • ASA-backed ARC-200: Bridged assets (e.g. aUSDC, aETH). Wrapped ASAs available as ARC-200 on Voi.

Available Tools

33 tools
add_liquidity_txnA

Build unsigned transactions to add liquidity to a Humble Swap pool. Returns base64-encoded transactions for signing.

Inputs: poolId (required), sender (required), amountA (required), amountB (required).

compare_poolsB

Compare multiple pools side by side (liquidity, volume, fees, etc.).

Inputs: poolIds (required).

deposit_nnt200A

Deposit an ASA (non-network token) into an NNT200 wrapper contract to receive ARC-200 wrapped tokens. Returns base64-encoded unsigned transactions for signing.

Inputs: appId (required), amount (required), sender (required), assetId (required), +1 more.

deposit_nt200A

Deposit native network tokens (e.g. VOI) into an NT200 wrapper contract to receive ARC-200 wrapped tokens. Returns base64-encoded unsigned transactions for signing.

Inputs: appId (required), amount (required), sender (required), decimals.

get_all_pools_statsA

Get comprehensive statistics across all Humble Swap pools.

Inputs: no named parameters.

get_all_tokens_statsB

Get comprehensive statistics across all tokens on Humble Swap.

Inputs: no named parameters.

get_arbitrage_opportunitiesB

Detect current arbitrage opportunities across Humble Swap pools.

Inputs: no named parameters.

get_poolB

Get detailed on-chain info for a specific Humble Swap pool (balances, fees, LP supply).

Inputs: poolId (required).

get_pool_analyticsC

Get pool analytics including TVL, liquidity depth, and concentration metrics.

Inputs: poolId (required).

get_pool_detailsC

Get detailed pool information from the Humble API including token pair, balances, and configuration.

Inputs: poolId (required).

get_poolsB

List Humble Swap pools with token pairs, liquidity, and volume data. Voi mainnet.

Inputs: symbol.

get_pool_statsA

Get comprehensive statistics for a specific pool (volume, fees, APR, etc.).

Inputs: poolId (required).

get_price_aggregatedB

Get aggregated price for a token across multiple pool sources.

Inputs: tokenId (required).

get_price_historyC

Get historical price data for a token over a given period.

Inputs: tokenId (required), period, interval.

get_pricesB

Get current prices for all tokens on Humble Swap.

Inputs: no named parameters.

get_protocol_statsA

Get protocol-wide statistics for Humble Swap (total TVL, volume, number of pools, etc.).

Inputs: no named parameters.

get_quoteA

Simulate a swap and get a quote with expected output, rate, fee, price impact, and minimum received. No transaction is built or signed.

Inputs: amount (required), toToken (required), fromToken (required), slippage.

get_swap_routeB

Find all possible swap paths between two tokens, including multi-hop routes. Useful for tokens without a direct pool.

Inputs: tokenA (required), tokenB (required).

get_tickersC

Get price ticker data for Humble Swap trading pairs.

Inputs: no named parameters.

get_token_metadataC

Get enriched metadata for a token including name, symbol, decimals, and additional info.

Inputs: assetId (required).

get_token_poolsB

Get pool statistics for all pools containing a specific token.

Inputs: assetId (required).

get_token_priceC

Get current price data for a specific token.

Inputs: tokenId (required).

get_token_rankingsC

Get token rankings by volume, liquidity, price change, and other metrics.

Inputs: no named parameters.

get_tokensB

List tokens available on Humble Swap with contract IDs and decimals. Voi mainnet.

Inputs: symbol.

get_token_statsB

Get comprehensive statistics for a specific token (volume, price change, holder count, etc.).

Inputs: assetId (required).

get_triangular_arbitrageB

Detect triangular arbitrage opportunities (A->B->C->A cycles) across Humble Swap pools.

Inputs: no named parameters.

remove_liquidity_txnA

Build unsigned transactions to remove liquidity from a Humble Swap pool. Returns base64-encoded transactions for signing.

Inputs: poolId (required), sender (required), lpAmount (required).

report_issueA

Report an issue with the Humble Swap MCP server (unexpected data, errors, bugs, or feature ideas).

IMPORTANT — Before calling this tool you MUST:

  1. Explain to the user what you observed and why it seems wrong.

  2. Show them the report you intend to submit (title + description).

  3. Get their explicit approval to file it.

Do NOT include private keys, mnemonics, or other secrets in any field. Wallet addresses and transaction IDs are fine to include.

If a GITHUB_TOKEN is configured the issue is created automatically. Otherwise a pre-filled GitHub URL is returned for the user to open.

Inputs: title (required), category (required), description (required), input, +3 more.

search_tokensC

Search Humble Swap tokens by name or symbol.

Inputs: query (required).

swap_txnA

Build unsigned transactions to swap tokens on Humble Swap. Returns base64-encoded transactions for signing via UluWalletMCP.

Inputs: amount (required), sender (required), toToken (required), fromToken (required), +1 more.

withdraw_nnt200A

Withdraw an ASA (non-network token) from an NNT200 wrapper contract by burning ARC-200 wrapped tokens. Returns base64-encoded unsigned transactions for signing.

Inputs: appId (required), amount (required), sender (required), assetId (required), +1 more.

withdraw_nt200B

Withdraw native network tokens from an NT200 wrapper contract by burning ARC-200 wrapped tokens. Returns base64-encoded unsigned transactions for signing.

Inputs: appId (required), amount (required), sender (required), decimals.

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 33 tools

    Disambiguation2/5

    Several clusters are hard to tell apart: get_pool / get_pool_details / get_pool_stats / get_pool_analytics / get_pools / get_all_pools_stats all sound like pool lookups, and get_prices / get_tickers / get_token_price / get_price_aggregated overlap on pricing. The on-chain vs API distinction is buried in descriptions rather than names, and get_token_stats vs get_pool_stats vs get_all_tokens_stats vs get_token_rankings invite misselection.

    Naming Consistency4/5

    Names follow a predictable get_/verb_noun snake_case convention (get_pool, add_liquidity_txn, remove_liquidity_txn, search_tokens, compare_pools) with a consistent _txn suffix for transaction builders. Minor deviations: deposit_nt200/deposit_nnt200 and the swap_txn oddity, but the overall pattern is readable and consistent.

    Tool Count2/5

    33 tools for a single DEX surface is heavy, and much of the excess is redundant analytics (five pool-stat variants, four price variants, three token-list/metadata variants). The domain is broad enough that trimming to ~15 well-differentiated tools would still cover swaps, liquidity, pricing, and wrapping.

    Completeness4/5

    The core lifecycle is covered end-to-end: discovery (pools/tokens), routing and quoting, swap/add/remove liquidity transaction builders, NT200/NNT200 wrapping, arbitrage detection, and even self-reporting. Gaps are secondary — no user LP position or transaction history lookup, and price-impact/slippage settings are only implicit in get_quote.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an agent to quote swaps and get unsigned transaction calldata for trading on Robinhood Chain, with best-price routing checked against a spending policy (caps, allowlists, slippage, price impact, pinned contracts, simulation) before anything is returned. Also provides simulation, hook-pool and hook-risk inspection, token price lookups, verified stock-token listing, and rolling spend status, while never holding keys, signing, or sending.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to discover freshly launched Robinhood Chain tokens and memecoins, screen them for rugs, honeypots and scam contracts, and quote, buy or sell across six DEX routers at the best route. Swaps are returned as unsigned transactions for the agent's own wallet to sign, so no keys or funds are ever custodied.
      16 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables Robinhood Chain trading agents to obtain quotes, policy-checked unsigned public-swap calldata, simulations, hook information, prices, and deployment discovery without holding keys or signing transactions.
      10
      MIT