Back to MCP Directory
Onchain
Model Context Protocol moderate risk

Onchain

The Bankless Onchain MCP Server provides a secure interface for AI models to interact with blockchain data via the Bankless API, enabling on-chain data analysis and smart contract interaction.

Connections & Capabilities

Connects To

GitHub

Capabilities

read

Quickstart

Install

npm install @bankless/onchain-mcp

Config

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

Exposed MCP Tools (4)

safe
read_contract

Reads the state of a smart contract on a specified blockchain network.

Read-only operation, no modification of contract state.

safe
get_proxy

Retrieves the implementation contract address for a given proxy contract.

Read-only operation, no modification of contract state.

safe
get_events

Fetches event logs for a contract based on specified filter criteria.

Read-only operation, retrieves existing event data.

safe
build_event_topic

Generates an event topic signature from an event name and argument types.

Pure computation, no external interaction.

Safety Assessment

The server is relatively safe for read operations on blockchain data. However, the lack of sandboxing and reliance on external APIs introduce some risks. It is crucial to protect the Bankless API token and validate the data retrieved.

  • Read-only contract state access
  • Event log retrieval with filtering
  • No direct modification of blockchain state
  • API key authentication
  • Rate limiting to prevent abuse
  • Potential for data exposure if API key is compromised
  • Reliance on Bankless API security
  • Risk of incorrect data interpretation by AI models
  • No sandboxing of contract interactions
  • Vulnerable to supply chain attacks via npm dependencies