# Ankr Agent RPC

> Ankr Agent RPC is a freemium MCP server for developer tools. Read blockchain data on 200+ networks with decoded, token-efficient responses for agents. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI
- **Website:** https://www.ankr.com/web3-api/agent-rpc/
- **Repository:** https://github.com/w3tech/agent-rpc-mcp-public
- **MCP Registry name:** io.github.w3tech/agent-rpc-mcp
- **Categories:** developer tools, analytics and data
- **Listing updated:** 2026-11-14

## About

The core idea is a compact response format. Reads go out with the TORPC header Accept-Token-Tier: 2, so field names are shortened, hex becomes decimal, noisy fields such as logsBloom are dropped and contract calls and event logs come back as named arguments. The README reports a token-weighted saving of 48.4% at tier 2 and 35.3% at tier 1 in a live run over 21 methods and 25 Ethereum mainnet blocks, with eth_getTransactionByHash saving 69.0% and scalar reads 9 to 19%.

Tools split into three groups. Raw RPC with tier 2 decoding covers getTransaction, getLogs (wide ranges are chunk-scanned and paged) and getBlock. Indexed tools cover balances with USD values, multi-chain balances, wallet activity, NFTs, token holders, token prices and price history, cross-chain interactions, contract resolution including EIP-1967 proxies, and a search that resolves hashes, addresses or block numbers. expandResult continues any paged result, and listChains reports supported chains and tiers.

An Ankr API key is required; the README says a free one is available from Ankr. Use the hosted endpoint with an x-ankr-api-key header or run the npm package over stdio, so the server holds no credential of yours.

## Features

- **Token-tier responses:** Tier 2 decodes ABI data and trims fields so responses use fewer tokens than raw JSON-RPC.
- **Decoded transactions and logs:** getTransaction and getLogs return named arguments instead of raw hex.
- **Wallet and token data:** Balances with USD, NFTs, token holders, prices and price history by address or token.
- **Cross-chain lookups:** getAccountBalance and getInteractions span many chains at once.
- **Contract resolution:** resolveContract reports whether an address is a contract, ERC-20 metadata and EIP-1967 proxy status.
- **Paged results:** expandResult continues any paged response from its cursor.
- **Hosted or local:** Use mcp.ankr.com/rpc with your key header, or run the npm package over stdio.

## Good for

- Decode a transaction and its logs without reading raw hex
- Check an address's balances across several chains
- Look up the holders of an ERC-20 token
- Fetch historical USD prices for a token
- Reduce token spend when an agent reads a lot of chain data

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http agent-rpc-mcp https://mcp.ankr.com/rpc
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://mcp.ankr.com/rpc
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "agent-rpc-mcp": {
      "url": "https://mcp.ankr.com/rpc"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "agent-rpc-mcp": {
      "type": "http",
      "url": "https://mcp.ankr.com/rpc"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "agent-rpc-mcp": {
      "serverUrl": "https://mcp.ankr.com/rpc"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "agent-rpc-mcp": {
      "type": "http",
      "url": "https://mcp.ankr.com/rpc"
    }
  }
}
```

## Tools

- `getTransaction`: Transaction and receipt by hash, ABI-decoded.
- `getLogs`: Decoded event logs; wide block ranges are chunk-scanned and paged.
- `getBlock`: Block header, optionally with decoded transactions.
- `getBalances`: Native coin and ERC-20 balances with USD.
- `getAccountBalance`: Balances across many chains at once.
- `getWalletActivity`: An address's transaction history, paged.
- `getNFTs`: NFTs held by an address.
- `getTokenHolders`: Holders of an ERC-20, paged.
- `getTokenPrice`: USD price with chain, asset and as_of provenance.
- `getTokenPriceHistory`: Historical price series for a token.
- `getInteractions`: Which chains an address has touched.
- `resolveContract`: Is-contract check, best-effort ERC-20 metadata and EIP-1967 proxy detection.
- `searchChain`: Resolves a transaction or block hash, an address or a block number.
- `expandResult`: Continues any paged result from its cursor.
- `listChains`: Lists supported chains, max TORPC tier and indexer availability.

## FAQ

### Do I need an API key?

Yes. The registry marks ANKR_API_KEY as required, and the README says a free key can be created at Ankr's RPC page.

### How much does tier 2 save?

The README reports 48.4% fewer tokens in a live run over 21 methods and 25 Ethereum mainnet blocks, counted with o200k_base.

### Can it send transactions or change my account?

The listed tools are reads. Account changes belong to the separate Ankr Management MCP.

### How do I connect without installing?

Point your client at https://mcp.ankr.com/rpc and send the key in the x-ankr-api-key header or as a bearer token.

### Is Ankr Agent RPC free?

Ankr Agent RPC has a free plan, with paid plans for more usage or features.

### How do I add Ankr Agent RPC to Claude Code?

Run this command in your terminal: claude mcp add --transport http agent-rpc-mcp https://mcp.ankr.com/rpc

### What are the best alternatives to Ankr Agent RPC?

The closest alternatives to Ankr Agent RPC are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/ankr-agent-rpc
