An MCP server implementation wrapping Ankr Advanced API. FastMCP is a Model Context Protocol (MCP) server that provides access to Ankr's Advanced API for blockchain data. It allows LLMs to interact with blockchain data across multiple chains including Ethereum, BSC, Polygon, Avalanche, and more. - Complete wrapper for all Ankr Advanced API endpoints - NFT API: Get NFT metadata, holders, transfers,
Add this skill
npx mdskills install tumf/web3-mcpWell-structured blockchain API wrapper with comprehensive tool coverage and clear setup
1# Web3 MCP23[](https://github.com/tumf/web3-mcp/actions/workflows/test.yml)4[](https://codecov.io/gh/tumf/web3-mcp)5[](https://badge.fury.io/py/web3-mcp)6[](https://opensource.org/licenses/MIT)78An MCP server implementation wrapping Ankr Advanced API.910## Overview1112FastMCP is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that provides access to Ankr's Advanced API for blockchain data. It allows LLMs to interact with blockchain data across multiple chains including Ethereum, BSC, Polygon, Avalanche, and more.1314## MCP Client Setting1516```json17{18 "mcpServers": {19 "web3": {20 "command": "uvx",21 "args": [22 "web3-mcp"23 ],24 "env": {25 "ANKR_ENDPOINT": "https://rpc.ankr.com/...",26 }27 }28 }29}30```3132## Features3334- Complete wrapper for all Ankr Advanced API endpoints35- NFT API: Get NFT metadata, holders, transfers, and ownership information36- Query API: Access blockchain statistics, blocks, logs, and transaction data37- Token API: Get token balances, prices, holders, and transfer history38- Support for multiple blockchain networks3940## Installation4142```bash43# Clone the repository44git clone https://github.com/tumf/web3-mcp.git45cd web3-mcp4647# Install with uv48uv pip install -e .49```5051## Configuration5253Set the following environment variables:5455```bash56# Required57export ANKR_ENDPOINT="your_ankr_rpc_endpoint"5859# Optional but recommended for authenticated requests60export ANKR_PRIVATE_KEY="your_private_key"61```6263## Usage6465### Running the server6667```python68from web3_mcp.server import init_server6970# Initialize MCP server71mcp = init_server(72 name="Ankr MCP",73 endpoint="your_ankr_endpoint", # Optional, defaults to ANKR_ENDPOINT env var74 private_key="your_private_key" # Optional, defaults to ANKR_PRIVATE_KEY env var75)7677# Run server78mcp.run()79```8081### Using with FastMCP CLI8283```bash84# Set environment variables first85export ANKR_ENDPOINT="your_ankr_endpoint"86export ANKR_PRIVATE_KEY="your_private_key"8788# Run the server89python -m web3_mcp90```9192## API Categories9394### NFT API9596- `get_nfts_by_owner`: Get NFTs owned by a wallet address97- `get_nft_metadata`: Get metadata for a specific NFT98- `get_nft_holders`: Get holders of a specific NFT collection99- `get_nft_transfers`: Get transfer history for NFTs100101### Query API102103- `get_blockchain_stats`: Get blockchain statistics104- `get_blocks`: Get blocks information105- `get_logs`: Get blockchain logs106- `get_transactions_by_hash`: Get transactions by hash107- `get_transactions_by_address`: Get transactions by address108- `get_interactions`: Get wallet interactions with contracts109110### Token API111112- `get_account_balance`: Get token balances for a wallet113- `get_currencies`: Get available currencies114- `get_token_price`: Get token price information115- `get_token_holders`: Get token holders116- `get_token_holders_count`: Get token holders count117- `get_token_transfers`: Get token transfer history118119## License120121MIT122
Full transparency — inspect the skill content before installing.