0.1.1 • Published 9 months ago
aapi-mcp-server v0.1.1
Ankr Advanced API MCP Server ⚡
This is a Model Context Protocol (MCP) server that provides tools for interacting with Ankr's Advanced APIs. It enables AI models to fetch blockchain data and perform various operations.
Tools
getAccountBalance: Fetch token balances across multiple blockchains for any address or ENS namegetTokenPrice: Get current price for any token (native or ERC20) on supported blockchains
Supported Blockchains
- Mainnets: Ethereum, BSC, Polygon, Arbitrum, Avalanche, Base, Fantom, Gnosis, Linea, Optimism, and more
- Testnets: Ethereum Sepolia, Ethereum Holesky, Base Sepolia, Avalanche Fuji, and others
Setup
Prerequisites
- Ankr API Key
- Create a free account at ankr.com/rpc
Configuring Cursor 🖥️
- Open Cursor Settings
- Navigate to Features > MCP Servers
- Click on the "+ Add New MCP Server" button
- Fill out the following information:
- Name: Enter a nickname for the server (e.g., "Ankr AAPI MCP")
- Type: Select "command" as the type
- Command:
env ANKR_API_KEY=<YOUR_KEY> npx -y aapi-mcp-server

Use with Claude Desktop
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "aapi-mcp-server"],
"env": {
"ANKR_API_KEY": "<YOUR_KEY>"
}
}
}
}Local development
Install dependencies
pnpm iRun local SSE server
export ANKR_API_KEY="YOUR-ANKR-KEY"
pnpm dev:sseHosted MCP Server
The hosted MCP server is a managed SSE endpoint that provides authenticated access over the internet.
Endpoint
https://your-domain.com/{apiKey}/sseAuthentication
- Replace
{apiKey}with your key - The server uses this key to authenticate requests to Ankr Advanced API
- Obtain your API key at ankr.com/rpc
Example
# Connect to the SSE endpoint
curl -N https://your-domain.com/your-ankr-api-key/sseThe server validates your API key and establishes a persistent SSE connection for real-time blockchain data access.