Ankr API MCP Server
The Ankr API MCP Server fetches blockchain data via the Ankr API and serves it using the Model Context Protocol (MCP) for integration with AI models. With this server, you can:
Fetch token balances: Retrieve all token balances for a specific wallet address on various blockchain networks (e.g., Ethereum, Base)
Integrate with LLMs: Use with AI models supporting MCP to enable natural language queries about blockchain data
Set up easily: Simple npm installation with straightforward environment configuration
Debug effectively: Access MCP Inspector during development for troubleshooting
Provides integration with npm for package installation and execution, allowing the Ankr MCP server to be distributed and run as an npm package
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ankr API MCP Serverget token balances for wallet 0x123...abc on Ethereum mainnet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Base Network MCP Server
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 blockchainGet Currencies (
get_currencies): Lists all available currencies on a blockchainGet Token Price (
get_token_price): Gets current USD price for any tokenGet Token Holders (
get_token_holders): Lists holder addresses for a tokenGet Token Holders Count (
get_token_holders_count): Gets historical holder count dataGet Token Transfers (
get_token_transfers): Gets token transfer history for addressesGet Token Price History (
get_token_price_history): Gets historical price data over timeExplain 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 walletGet NFT Metadata (
get_nft_metadata): Gets metadata (name, image, traits) for a specific NFTGet NFT Holders (
get_nft_holders): Gets all holders of an NFT collectionGet 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 rangeGet Logs (
get_logs): Gets historical event log dataGet Transactions by Hash (
get_transactions_by_hash): Looks up a transaction by hashGet Transactions by Address (
get_transactions_by_address): Gets all transactions for an addressGet Interactions (
get_interactions): Lists all chains a wallet has interacted withGet Account Balance Historical (
get_account_balance_historical): Gets balance at a past block heightGet Internal Transactions by Block (
get_internal_transactions_by_block): Gets internal txns in a blockGet Internal Transactions by Parent Hash (
get_internal_transactions_by_parent_hash): Gets internal txns from a parent tx
Installation
npm install @akki91/ankr-mcpUsage
Environment Setup
Set your ANKR API token by logging into ANKR api docs portal.
export ANKR_API_TOKEN=your_api_token_hereRunning the Server
The server can be run directly from the command line:
npx @akki91/ankr-mcpUsage with LLM Tools
This server implements the Model Context Protocol (MCP), which allows it to be used as a tool provider for compatible AI models.
Integration with AI Models
To integrate this server with AI applications that support MCP, add the following to your app's server configuration:
{
"mcpServers": {
"ankr-mcp": {
"command": "npx",
"args": [
"@akki91/ankr-mcp"
],
"env": {
"ANKR_API_TOKEN": "your_api_token_here"
}
}
}
}Integrating Ankr MCP Tools in Claude Desktop
Follow the instructions below to update your settings and ensure that your MCP server is available within Claude Desktop.
Step 1: Access Settings in Claude Desktop
Launch Claude Desktop.
From the main menu, navigate to Settings.
Step 2: Update Developer Settings
Open the Developer Settings.
Edit the configuration file that contains your MCP server definitions.
If MCP servers are already listed, append your Ankr MCP configuration to the existing list. Otherwise, copy and paste the entire above configuration for the Ankr MCP server.
Step 3: Restart Claude Desktop
Close the Developer Settings menu.
Restart Claude Desktop to apply the changes.
Step 4: Verify Integration
Once Claude Desktop has restarted, click on the Tools Icon located just below the chat prompt.
Verify that the list of tools provided by the Ankr MCP server is visible and accessible.
By following these steps, your Ankr MCP configuration should now be integrated into Claude Desktop, allowing you to access its tools directly through the interface.
Sample Chat Prompts
Here are example prompts you can use with this MCP server in Claude or any compatible AI:
Token Queries
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 Queries
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.Blockchain & Transaction Queries
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?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 buildRunning Tests
npm testDebug Mode
Debugging for this project is supported using MCP Inspector
npm run debugSources
This project is inspired from list of servers created here
Verification
Available Tools
1 toolget_token_balances_on_networkB
Gets all token balances for a given address on a specific network
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The address to check token balances for | |
| network | Yes | The blockchain network (e.g., "ethereum", "base") |
TDQS
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.
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.
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.
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.
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.
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.
TDQS
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.
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.
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.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server giving AI agents one-connection access to crypto & DeFi data: DeFi protocol TVL, stableco
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that connects Claude for Desktop with blockchain functionality, allowing users to check balances and send tokens on EVM and Solana chains through natural language interactions.
- AlicenseBqualityDmaintenanceAn MCP server that enables LLMs to perform blockchain operations on the Base network through natural language commands, including wallet management, balance checking, and transaction execution.4273MIT
- AlicenseAqualityDmaintenanceAn MCP server that empowers AI agents to inspect any wallet’s balance and onchain activity across major EVM chains and Solana chain.39MIT
- AlicenseBqualityDmaintenanceAn MCP server providing comprehensive access to Ethereum blockchain data across 72+ networks via Etherscan's V2 API. It enables users to check balances, track transactions, analyze smart contracts, and monitor gas prices through natural language.24261MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/akki91/ankr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server