Labsco
akki91 logo

Ankr API MCP Server

โ˜… 2

from akki91

Access blockchain data using the Ankr API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

MCP Badge

Ankr API MCP Server

MCP (Model Context Protocol) server for blockchain data through the Ankr API.

Overview

The Ankr MCP Server fetches on-chain data via the Ankr API. It implements the MCP to allow LLMs to query blockchain data across 20+ chains.

Features

The server provides 21 tools across all Ankr Advanced API categories:

Token Operations

  • Get Token Balances (get_token_balances): Gets all token balances for a wallet on a specific blockchain
  • Get Currencies (get_currencies): Lists all available currencies on a blockchain
  • Get Token Price (get_token_price): Gets current USD price for any token
  • Get Token Holders (get_token_holders): Lists holder addresses for a token
  • Get Token Holders Count (get_token_holders_count): Gets historical holder count data
  • Get Token Transfers (get_token_transfers): Gets token transfer history for addresses
  • Get Token Price History (get_token_price_history): Gets historical price data over time
  • Explain Token Price (explain_token_price): Breaks down how a token price is derived

NFT Operations

  • Get NFTs by Owner (get_nfts_by_owner): Gets all NFTs owned by a wallet
  • Get NFT Metadata (get_nft_metadata): Gets metadata (name, image, traits) for a specific NFT
  • Get NFT Holders (get_nft_holders): Gets all holders of an NFT collection
  • Get NFT Transfers (get_nft_transfers): Gets NFT transfer history

Query Operations

  • Get Blockchain Stats (get_blockchain_stats): Gets chain statistics (transactions, block time, etc.)
  • Get Blocks (get_blocks): Gets full block data for a block range
  • Get Logs (get_logs): Gets historical event log data
  • Get Transactions by Hash (get_transactions_by_hash): Looks up a transaction by hash
  • Get Transactions by Address (get_transactions_by_address): Gets all transactions for an address
  • Get Interactions (get_interactions): Lists all chains a wallet has interacted with
  • Get Account Balance Historical (get_account_balance_historical): Gets balance at a past block height
  • Get Internal Transactions by Block (get_internal_transactions_by_block): Gets internal txns in a block
  • Get Internal Transactions by Parent Hash (get_internal_transactions_by_parent_hash): Gets internal txns from a parent tx

Development

Building from Source

# Clone the repository
git clone https://github.com/akki91/ankr-mcp.git
cd ankr-mcp

# Install dependencies
npm install

# Build the project
npm run build

Running Tests

npm test

Debug Mode

Debugging for this project is supported using MCP Inspector

npm run debug

Sources

This project is inspired from list of servers created here

Verification

MseeP.ai Security Assessment Badge