Bankless OnchainSAFE
Bringing the bankless onchain API to MCP
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
This project is no longer receiving updates
[](https://opensource.org/licenses/MIT)
MCP (Model Context Protocol) server for blockchain data interaction through the Bankless API.
Overview
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.
https://github.com/user-attachments/assets/95732dff-ae5f-45a6-928a-1ae17c0ddf9d
Features
The server provides the following onchain data operations:
Contract Operations
- Read Contract State (
read_contract): Read state from smart contracts on various blockchain networks. - Parameters: network, contract address, method, inputs, outputs
- Returns: Contract call results with typed values
- Get Proxy (
get_proxy): Retrieve proxy implementation contract addresses. - Parameters: network, contract address
- Returns: Implementation contract address
- Get ABI (
get_abi): Fetch the ABI (Application Binary Interface) for a contract. - Parameters: network, contract address
- Returns: Contract ABI in JSON format
- Get Source (
get_source): Retrieve the source code for a verified contract. - Parameters: network, contract address
- Returns: Source code, ABI, compiler version, and other contract metadata
Event Operations
- Get Events (
get_events): Fetch event logs for a contract based on topics. - Parameters: network, addresses, topic, optional topics
- Returns: Filtered event logs
- Build Event Topic (
build_event_topic): Generate an event topic signature from event name and argument types. - Parameters: network, event name, argument types
- Returns: Event topic hash
Transaction Operations
4b2d6c3b1078OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add onchain-mcp --env BANKLESS_API_TOKEN=${BANKLESS_API_TOKEN} -- npx -y @bankless/[email protected]{
"mcpServers": {
"onchain-mcp": {
"command": "npx",
"args": [
"-y",
"@bankless/[email protected]"
],
"env": {
"BANKLESS_API_TOKEN": "${BANKLESS_API_TOKEN}"
}
}
}
}Exposed tools (10)
10 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
build_event_topic | read | Builds an event topic signature based on event name and arguments |
get_abi | read | Gets the ABI for a given contract on a specific network |
get_block_info | read | Gets detailed information about a specific block by number or hash |
get_events | read | Fetches event logs for a given network and filter criteria |
get_proxy | read | Gets the proxy address for a given network and contract |
get_source | read | Gets the source code for a given contract on a specific network |
get_token_balances_on_network | read | Gets all token balances for a given address on a specific network |
get_transaction_history_for_user | read | Gets transaction history for a user and optional contract |
get_transaction_info | read | Gets detailed information about a specific transaction |
read_contract | read | Read contract state from a blockchain. important: In case of a tuple, don |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (5 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
@types/node, @types/node-fetch, axios, node-fetch, universal-user-agent, zod, zod-to-json-schema, @types/jest
Gates applied: no_behavioural_pass, no_license.
4b2d6c3b1078full audit observations/trust-audit/mcp-server/bankless__bankless-onchain.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 4b2d6c3b1078 | SAFE | B | 89 | first audit |
Questions
What is the Bankless Onchain MCP server?
Bringing the bankless onchain API to MCP
What tools does Bankless Onchain expose?
10 in total: 10 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Bankless Onchain safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Bankless Onchain need?
It reads BANKLESS_API_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Bankless Onchain run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @bankless/onchain-mcp at 1.0.6.
How current is this page?
The grade is for one exact copy of the source (4b2d6c3b1078), read on 2026-10-07. The repository is watched and re-audited when it changes.