build_event_topic
Builds an event topic signature based on event name and arguments
Resolve a contract's proxy and ABI, read its state, and pull an address's transaction history without a block-explorer tab.
LABSCO SUMMARY
get_proxy is the tool that decides whether the rest of the session is wasted — the address you were handed is often not where the logic lives, and read_contract against the wrong one fails in a way that reads like a network problem. The read path is complete but literal: read_contract asks you to spell out inner struct types rather than infer them from the ABI it can already fetch.
An onchain read client with ten tools: contract state and metadata, event logs, transactions, token balances and blocks, each scoped to a named network.
A Bankless API token in BANKLESS_API_TOKEN, and npx on your PATH.
One command plus a key — npx @bankless/onchain-mcp, then supply credentials
USE CASES
Resolve the proxy first — the address you were handed often is not where the logic lives — then pull the ABI and call the method with its input and output types spelled out.
Pull the transaction history, optionally narrowed to one contract, method id or starting block, then open the transactions that matter and check what the address currently holds.
Build the topic signature from the event name and its argument types, then filter logs by address and block range around it.
Verified source next to the ABI answers what the methods do, not just what they are called — worth doing before read_contract, and before anything that spends.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
build_event_topicBuilds an event topic signature based on event name and arguments
get_abiGets the ABI for a given contract on a specific network
get_block_infoGets detailed information about a specific block by number or hash
get_eventsFetches event logs for a given network and filter criteria
get_proxyGets the proxy address for a given network and contract
get_sourceGets the source code for a given contract on a specific network
get_token_balances_on_networkGets all token balances for a given address on a specific network
get_transaction_history_for_userGets transaction history for a user and optional contract
get_transaction_infoGets detailed information about a specific transaction
read_contractRead contract state from a blockchain. important:
In case of a tuple, don't use type tuple, but specify the inner types (found in the source) in order. For nested structs, include the substructs types.
Example: struct DataTypeA { DataTypeB b; //the liquidity index. Expressed in ray uint128 liquidityIndex; }
struct DataTypeB { address token; }
results in outputs for function with return type DataTypeA (tuple in abi): outputs: [{"type": "address"}, {"type": "uint128"}]
BEFORE YOU INSTALL
10 tools when we connected.
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the 10 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx @bankless/onchain-mcp{
"mcpServers": {
"bankless": {
"command": "npx",
"args": [
"@bankless/onchain-mcp"
],
"env": {
"BANKLESS_API_TOKEN": "<YOUR_BANKLESS_API_TOKEN>"
}
}
}
}