Bankless/onchain-mcp
If you are the rightful owner of onchain-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP (Model Context Protocol) server for blockchain data interaction through the Bankless API.
Tools
Functions exposed to the LLM to take actions
read_contract
Read 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"}]
get_proxy
Gets the proxy address for a given network and contract
get_abi
Gets the ABI for a given contract on a specific network
get_source
Gets the source code for a given contract on a specific network
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
get_transaction_history_for_user
Gets transaction history for a user and optional contract
get_transaction_info
Gets detailed information about a specific transaction
get_token_balances_on_network
Gets all token balances for a given address on a specific network
get_block_info
Gets detailed information about a specific block by number or hash
Prompts
Interactive templates invoked by user choice
No prompts
Resources
Contextual data attached and managed by the client