Onchain MCP logo

Onchain MCP

by bankless

Access blockchain state, contract metadata, event logs, and transaction details through the Bankless API over MCP.

Install Onchain MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "bankless-onchain-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@bankless/onchain-mcp"
      ],
      "env": {
        "BANKLESS_API_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 10 tools correctly (24d ago).

Overview

bankless/onchain-mcp MCP server connects MCP-compatible AI applications to the Bankless API for blockchain data access. It reads contract state, resolves proxy implementations, retrieves ABIs and verified source, builds event topics, filters logs, and looks up transaction data. Use it for EVM contract inspection and on-chain queries when a Bankless API token is available.

Use cases

  • Read deployed contract state
  • Inspect proxy implementations
  • Fetch verified contract metadata
  • Filter contract event logs
  • Review address transaction history

Key features

  • Typed smart contract state reads
  • Proxy implementation lookup
  • ABI and verified source retrieval
  • Topic-based event log queries
  • Event signature topic generation
  • Transaction history and detail queries

Tools10

What Onchain MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

20/20 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · @bankless/onchain-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars78Stargazers on the source repository.
npm downloads280Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed10Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Onchain MCP works

What bankless/onchain-mcp does

The bankless/onchain-mcp MCP server exposes blockchain data operations through the Bankless API. It is intended for applications that support the Model Context Protocol and need structured access to contract state, contract metadata, event logs, or transaction records.

Contract operations include reading a method on a deployed contract, finding a proxy's implementation address, retrieving a contract ABI, and fetching source and related metadata for a verified contract. Contract reads require a network, address, method name, typed inputs, and expected output types.

Event operations retrieve logs for selected contract addresses using a primary topic and optional topic filters. The server can also calculate an event signature topic from an event name and its argument types. Transaction operations cover address history and detailed information for an individual transaction, including block, timestamp, addresses, value, gas, status, and receipt data.

How it works

The bankless/onchain-mcp MCP server runs as a command-line Node.js process and communicates with an MCP-compatible AI application. Requests are sent to the server as tool calls, with blockchain network names and operation-specific parameters. Results are returned as typed contract values, implementation addresses, JSON ABI data, source metadata, event log objects, or transaction records.

The event-topic workflow is useful when an application has an event signature but needs the corresponding topic hash before querying logs. Proxy-aware workflows can first resolve the implementation address, then inspect its ABI or verified source while continuing to call the proxy address for state reads.

The project reports validation, authentication, missing-resource, and rate-limit error types. It is no longer receiving updates, so developers should account for that maintenance status when evaluating it for a new production dependency.

Setup and configuration

Install the package from npm:

Terminal
npm install @bankless/onchain-mcp

Set the required BANKLESS_API_TOKEN environment variable with a token obtained from the Bankless API documentation. The server can then be started with:

Terminal
npx @bankless/onchain-mcp

For an MCP client configuration, use npx as the command, pass @bankless/onchain-mcp as an argument, and provide the token in the server's environment. Developers building from source can clone the repository, install dependencies, and run the documented build command.

Tools and capabilities

The bankless/onchain-mcp MCP server supports these documented operations:

  • Read contract state with typed arguments and outputs.
  • Retrieve proxy implementation addresses.
  • Fetch contract ABIs and verified source metadata.
  • Query event logs by address and topics.
  • Create keccak256 event signature topics.
  • Retrieve address transaction history and transaction details.

Networks and contract addresses are supplied per request. Examples in the project include Ethereum, Polygon, and Base, but the material does not define a complete supported-network list.

Limitations and notes

The server requires a valid Bankless API token and is subject to API authentication and rate limits. Invalid parameters and unavailable resources are also reported as distinct error conditions. Its documented contract-source operation applies to verified contracts.

The repository states that development has stopped. The README includes examples for contract reads, proxy lookup, event filtering, and topic construction; use of transaction operations is documented in the feature descriptions. Confirm current Bankless API availability and network coverage before depending on it.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Onchain MCP

bankless/onchain-mcp is an MCP server that connects AI applications to the Bankless API for blockchain data. Its main tools read smart contract state, resolve proxy implementations, retrieve contract ABI and source metadata, query event logs, build event topics, and obtain transaction history or transaction details.

Install it with `npm install @bankless/onchain-mcp`, then run it with `npx @bankless/onchain-mcp`. Before starting it, set `BANKLESS_API_TOKEN` to a valid Bankless API token. MCP clients can launch the package through an `npx` command configuration.

The server requires `BANKLESS_API_TOKEN`. Set it to the Bankless API token used for authentication, either in the shell environment or in the MCP client's server configuration.

Yes. It can fetch event logs by network, contract addresses, a primary topic, and optional additional topics. Its event-topic operation can calculate the keccak256 hash for an event signature from the event name and argument types.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOnchain MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bankless-onchain-mcp?style=directory)](https://allmcps.com/mcp/bankless-onchain-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/bankless-onchain-mcp"><img src="https://allmcps.com/api/badge/bankless-onchain-mcp?style=directory" alt="Onchain MCP on AllMCPs" /></a>