0.1.1 • Published 9 months ago

aapi-mcp-server v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

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 name
  • getTokenPrice: 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

  1. Ankr API Key

Configuring Cursor 🖥️

  1. Open Cursor Settings
  2. Navigate to Features > MCP Servers
  3. Click on the "+ Add New MCP Server" button
  4. 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

Add Ankr AAPI MCP to Cursor

Use with Claude Desktop

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "aapi-mcp-server"],
      "env": {
        "ANKR_API_KEY": "<YOUR_KEY>"
      }
    }
  }
}

Local development

Install dependencies

pnpm i

Run local SSE server

export ANKR_API_KEY="YOUR-ANKR-KEY"
pnpm dev:sse

Hosted MCP Server

The hosted MCP server is a managed SSE endpoint that provides authenticated access over the internet.

Endpoint

https://your-domain.com/{apiKey}/sse

Authentication

  • 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/sse

The server validates your API key and establishes a persistent SSE connection for real-time blockchain data access.

0.1.1

9 months ago

0.1.0

9 months ago