Bankless Onchain MCP Server
Bringing the bankless onchain API to MCP
Overview
The Bankless Onchain MCP Server is a framework designed for interacting with on-chain data through the Bankless API, implementing the Model Context Protocol (MCP) to facilitate access to blockchain state and event data.
To use the server, set your Bankless API token and run the server using the command: npx @bankless/onchain-mcp. You can then make API calls to interact with blockchain data.
- Read contract state from various blockchain networks. - Retrieve proxy implementation contract addresses. - Fetch the ABI for a contract. - Get source code for verified contracts. - Fetch event logs based on topics. - Retrieve transaction history and details.
- Accessing smart contract data for decentralized applications.
- Analyzing transaction history for user addresses.
- Fetching event logs for specific blockchain events.
- Integrating with AI models for enhanced blockchain interactions.
Add to your AI client
Use these steps to connect Bankless Onchain MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"onchain-mcp-bankless": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-onchain-mcp-bankless"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"onchain-mcp-bankless": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-onchain-mcp-bankless"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"onchain-mcp-bankless": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-onchain-mcp-bankless"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"onchain-mcp-bankless": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-onchain-mcp-bankless"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"onchain-mcp-bankless": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-onchain-mcp-bankless"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"onchain-mcp-bankless": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-onchain-mcp-bankless"
]
}
}
}FAQ
What is the Model Context Protocol (MCP)?
MCP is a protocol that allows AI models to access and interact with blockchain data in a structured manner.
How do I obtain a Bankless API token?
You can obtain your Bankless API token by following the instructions on the Bankless documentation site.
Is the Bankless Onchain MCP Server free to use?
Yes, the server is open-source and free to use.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3195,"uuid":"c9d7efb3-711a-4dbf-9575-e401b0f0d751","name":"onchain-mcp","title":"Bankless Onchain MCP Server","description":"Bringing the bankless onchain API to MCP","avatar_url":"https://avatars.githubusercontent.com/u/118560591?v=4","created_at":"2025-03-18T03:32:13.642Z","updated_at":"2025-03-18T14:32:51.990Z","status":"created","author_name":"Bankless","author_avatar_url":"https://avatars.githubusercontent.com/u/118560591?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/bankless/onchain-mcp","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/6cd0120cc4c5ac11d28b2c60f76033b52db98dac641de3b2644bb054b449d60c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667","type":null,"metadata":"{\"star\":\"44\",\"license\":\"\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-18 23:03:29\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]