Bankless Onchain MCP Server

Query Onchain data, like ERC20 tokens, transaction history, smart contract state.

Local serverstdio

What is the Bankless Onchain MCP server?

Query Onchain data, like ERC20 tokens, transaction history, smart contract state. That is what the bankless onchain mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

MCP (Model Context Protocol) server for blockchain data interaction through the Bankless API.

The Bankless Onchain MCP Server provides a framework for interacting with on-chain data via the Bankless API. It implements the Model Context Protocol (MCP) to allow AI models to access blockchain state and event data in a structured way.

The tools it exposes

The server publishes 5 tools. What each one is for:

  • read_contract — Read contract state from a blockchain
  • Input — - network (string, required): The blockchain network (e.g., "ethereum", "polygon")
  • get_proxy — Gets the proxy address for a given network and contract
  • get_events — Fetches event logs for a given network and filter criteria
  • build_event_topic — Builds an event topic signature based on event name and arguments

What it needs from you

Configuration is passed through the environment: BANKLESS_API_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Getting it running

@bankless/onchain-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

This sits in the monitoring and observability group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Bankless Onchain's toolset — read_contract, Input, get_proxy and 2 more — is a fair guide to whether it matches your workflow.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
read_contractRead contract state from a blockchain
Input- network (string, required): The blockchain network (e.g., "ethereum", "polygon")
get_proxyGets the proxy address for a given network and contract
get_eventsFetches event logs for a given network and filter criteria
build_event_topicBuilds an event topic signature based on event name and arguments

How to install the Bankless Onchain MCP server

{
  "mcpServers": {
    "onchain": {
      "command": "npx",
      "args": ["-y", "@bankless/onchain-mcp"],
      "env": {
        "BANKLESS_API_TOKEN": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
BANKLESS_API_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Bankless Onchain to read contract.
  • Use Bankless Onchain to Input.
  • Use Bankless Onchain to get proxy.

Frequently asked questions

It connects Bankless Onchain to MCP-compatible AI assistants such as Claude and Cursor, exposing 5 tools (read_contract, Input, get_proxy, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Bankless Onchain directly.