Skip to main content
Glama
akki91
by akki91

MCP Badge

MCP-сервер Ankr API

MCP-сервер (Model Context Protocol) для работы с данными блокчейна через API Ankr.

Обзор

MCP-сервер Ankr получает данные из блокчейна через API Ankr. Он реализует протокол MCP, позволяя LLM запрашивать данные блокчейна в более чем 20 сетях.

Related MCP server: Base Network MCP Server

Функции

Сервер предоставляет 21 инструмент по всем категориям Ankr Advanced API:

Операции с токенами

  • Получить балансы токенов (get_token_balances): Получает все балансы токенов для кошелька в определенном блокчейне

  • Получить валюты (get_currencies): Перечисляет все доступные валюты в блокчейне

  • Получить цену токена (get_token_price): Получает текущую цену в USD для любого токена

  • Получить держателей токена (get_token_holders): Перечисляет адреса держателей токена

  • Получить количество держателей токена (get_token_holders_count): Получает исторические данные о количестве держателей

  • Получить переводы токенов (get_token_transfers): Получает историю переводов токенов для адресов

  • Получить историю цен токена (get_token_price_history): Получает исторические данные о цене с течением времени

  • Объяснить цену токена (explain_token_price): Разбирает, как формируется цена токена

Операции с NFT

  • Получить NFT по владельцу (get_nfts_by_owner): Получает все NFT, принадлежащие кошельку

  • Получить метаданные NFT (get_nft_metadata): Получает метаданные (имя, изображение, характеристики) для конкретного NFT

  • Получить держателей NFT (get_nft_holders): Получает всех держателей коллекции NFT

  • Получить переводы NFT (get_nft_transfers): Получает историю переводов NFT

Операции запросов

  • Получить статистику блокчейна (get_blockchain_stats): Получает статистику сети (транзакции, время блока и т.д.)

  • Получить блоки (get_blocks): Получает полные данные блока для диапазона блоков

  • Получить логи (get_logs): Получает исторические данные журналов событий

  • Получить транзакции по хешу (get_transactions_by_hash): Ищет транзакцию по хешу

  • Получить транзакции по адресу (get_transactions_by_address): Получает все транзакции для адреса

  • Получить взаимодействия (get_interactions): Перечисляет все сети, с которыми взаимодействовал кошелек

  • Получить исторический баланс счета (get_account_balance_historical): Получает баланс на момент высоты блока в прошлом

  • Получить внутренние транзакции по блоку (get_internal_transactions_by_block): Получает внутренние транзакции в блоке

  • Получить внутренние транзакции по родительскому хешу (get_internal_transactions_by_parent_hash): Получает внутренние транзакции из родительской транзакции

Установка

npm install @akki91/ankr-mcp

Использование

Настройка окружения

Установите свой токен API ANKR, войдя на портал документации API ANKR.

export ANKR_API_TOKEN=your_api_token_here

Запуск сервера

Сервер можно запустить напрямую из командной строки:

npx @akki91/ankr-mcp

Использование с инструментами LLM

Этот сервер реализует протокол Model Context Protocol (MCP), что позволяет использовать его в качестве поставщика инструментов для совместимых моделей ИИ.

Интеграция с моделями ИИ

Чтобы интегрировать этот сервер с приложениями ИИ, поддерживающими MCP, добавьте следующее в конфигурацию сервера вашего приложения:

{
  "mcpServers": {
    "ankr-mcp": {
      "command": "npx",
      "args": [
        "@akki91/ankr-mcp"
      ],
      "env": {
        "ANKR_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Интеграция инструментов Ankr MCP в Claude Desktop

Следуйте приведенным ниже инструкциям, чтобы обновить настройки и убедиться, что ваш MCP-сервер доступен в Claude Desktop.

Шаг 1: Доступ к настройкам в Claude Desktop

  1. Запустите Claude Desktop.

  2. В главном меню перейдите в Settings (Настройки).

Шаг 2: Обновление настроек разработчика

  1. Откройте Developer Settings (Настройки разработчика).

  2. Отредактируйте файл конфигурации, содержащий определения ваших MCP-серверов.

  3. Если MCP-серверы уже указаны, добавьте конфигурацию Ankr MCP в существующий список. В противном случае скопируйте и вставьте всю конфигурацию выше для сервера Ankr MCP.

Шаг 3: Перезапуск Claude Desktop

  1. Закройте меню Developer Settings.

  2. Перезапустите Claude Desktop, чтобы применить изменения.

Шаг 4: Проверка интеграции

  1. После перезапуска Claude Desktop нажмите на значок инструментов (Tools Icon), расположенный прямо под полем ввода чата.

  2. Убедитесь, что список инструментов, предоставляемых сервером Ankr MCP, виден и доступен.

Выполнив эти шаги, вы интегрируете конфигурацию Ankr MCP в Claude Desktop, что позволит вам получать доступ к его инструментам непосредственно через интерфейс.

Примеры запросов для чата

Вот примеры запросов, которые вы можете использовать с этим MCP-сервером в Claude или любой совместимой модели ИИ:

Запросы по токенам

What are the token balances for 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum?
What's the current price of USDC on Ethereum?
Show me the price history of ETH over the last 30 days.
How many holders does the LINK token have on Ethereum?
Show me recent token transfers for vitalik.eth on Polygon.

Запросы по NFT

What NFTs does 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 own?
Get me the metadata for Bored Ape #1234.
Who holds NFTs from the CryptoPunks collection?
Show me recent NFT transfers for this wallet on Ethereum.

Запросы по блокчейну и транзакциям

What are the current stats for Ethereum and Polygon?
Which blockchains has wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 interacted with?
Look up transaction 0x1234abcd... and decode the logs.
Show me the latest blocks on Arbitrum with transactions included.
What were the internal transactions in Ethereum block 19000000?
What was my wallet balance at block 17000000?

Разработка

Сборка из исходного кода

# 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

Запуск тестов

npm test

Режим отладки

Отладка для этого проекта поддерживается с помощью MCP Inspector

npm run debug

Источники

Этот проект вдохновлен списком серверов, созданных здесь

Верификация

Available Tools

1 tool
get_token_balances_on_networkB

Gets all token balances for a given address on a specific network

ParametersJSON Schema
NameRequiredDescriptionDefault
addressYesThe address to check token balances for
networkYesThe blockchain network (e.g., "ethereum", "base")

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Gets' which implies a read operation, but fails to describe critical behaviors such as rate limits, authentication requirements, error handling, or what 'all token balances' entails (e.g., pagination, format). This leaves significant gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 simple parameters) and no output schema, the description is minimally adequate but incomplete. It lacks details on behavioral aspects and output format, which are important for a read operation with no annotations to rely on.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters. The description adds no additional semantic context beyond what the schema provides, such as examples or constraints, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Gets') and the resource ('all token balances for a given address on a specific network'), making the purpose specific and understandable. However, since there are no sibling tools mentioned, it cannot distinguish from alternatives, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It simply states what the tool does without context for usage decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev1.0.0
    • First observedget_token_balances_on_network

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined and distinct by default.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'get_token_balances_on_network' follows a clear verb_noun pattern.

Tool Count2/5

One tool is too few for a server named 'Ankr API MCP Server', which suggests a broader API scope. This minimal set severely limits functionality and likely leaves significant gaps in coverage for blockchain-related operations.

Completeness1/5

The tool surface is severely incomplete for an API server. It only provides token balances, missing essential operations like querying transactions, network status, smart contract interactions, or other common blockchain API functions, leading to dead ends for agents.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers