FindBlock MCP

FindBlock MCP

An MCP server for retrieving block numbers by timestamp, enabling fast and precise on-chain data queries.

Category
访问服务器

README

FindBlock MCP

An MCP server for retrieving block numbers by timestamp, enabling fast and precise on-chain data queries.

GitHub License Python Version Status

Features

  • Block Timestamp Search: Find blocks before/after specific timestamps with optional inclusivity.
  • Chain Discovery: List and retrieve details for thousands of EVM chains.
  • RPC Proxying: Forward JSON-RPC calls to optimal endpoints for any chain.

Requirements

  • Python 3.10+
  • uv for dependency management (recommended)

Installation

  1. Clone & Install:

    git clone https://github.com/kukapay/findblock-mcp.git
    cd findblock-mcp
    uv sync 
    
  2. Install to Claude Desktop:

    Install the server as a Claude Desktop application:

    uv run mcp install main.py --name "Find Block"
    

    Configuration file as a reference:

    {
       "mcpServers": {
           "Find Block": {
               "command": "uv",
               "args": [ "--directory", "/path/to/findblock-mcp", "run", "main.py" ]
           }
       }
    }
    

    Replace /path/to/findblock-mcp with your actual installation path.

Usage

Once installed (e.g., in Claude Desktop), interact with the tools via natural language prompts. The LLM will automatically discover and invoke them. Below are detailed tool descriptions with parameters and examples.

Tools

1. find_block_before(chain_id: int, timestamp: int, inclusive: bool = False)

Locates the block immediately before (or at, if inclusive=True) a given UNIX timestamp. Returns Markdown-formatted block details including number, timestamp, hash, and parent hash.

Parameters:

  • chain_id (int, required): The EVM Chain ID.
  • timestamp (int, required): UNIX timestamp (seconds since epoch).
  • inclusive (bool, optional, default=False): Include the block at the exact timestamp if it matches.

Example Prompt:

Find the last Ethereum block before January 1, 2024.

Expected Output:

### Block Details (Before Timestamp)
- **Number:** 19300000
- **Timestamp:** 1704067199 (UNIX)
- **Hash:** `0xabc123...def456`
- **Parent Hash:** `0xdef789...ghi012`

2. find_block_after(chain_id: int, timestamp: int, inclusive: bool = False)

Locates the block immediately after (or at, if inclusive=True) a given UNIX timestamp. Returns Markdown-formatted block details including number, timestamp, hash, and parent hash.

Parameters:

  • chain_id (int, required): The EVM Chain ID.
  • timestamp (int, required): UNIX timestamp (seconds since epoch).
  • inclusive (bool, optional, default=False): Include the block at the exact timestamp if it matches.

Example Prompt:

What's the first Polygon block after March 15, 2023, 12:00 UTC?

Expected Output:

### Block Details (After Timestamp)
- **Number:** 45000000
- **Timestamp:** 1678867201 (UNIX)
- **Hash:** `0x123abc...456def`
- **Parent Hash:** `0x789ghi...012jkl`

3. list_chains()

Retrieves a list of all available EVM chains supported by FindBlock, formatted as a Markdown bullet list with chain names and IDs.

Parameters:

  • None

Example Prompt:

Show me a list of popular EVM chains I can query.

Expected Output:

### Available Chains

- **Ethereum** (Chain ID: 1)
- **Binance Smart Chain** (Chain ID: 56)
- **Polygon** (Chain ID: 137)
- **Avalanche C-Chain** (Chain ID: 43114)
- ... (truncated for brevity; full list includes 1,000+ chains)

4. get_chain(chain_id: int)

Fetches detailed information for a specific EVM chain by its Chain ID, returned as Markdown with name and ID.

Parameters:

  • chain_id (int, required): The EVM Chain ID (e.g., 1 for Ethereum Mainnet).

Example Prompt:

Tell me about Ethereum Mainnet.

Expected Output:

### Chain Details

- **Name:** Ethereum
- **Chain ID:** 1

5. rpc_call(chain_id: int, method: str, params: List[Any] = [], request_id: int = 1)

Proxies an EVM JSON-RPC request to the best-performing RPC endpoint for the specified chain. Supports any standard EVM method (e.g., eth_blockNumber, eth_getBalance). Returns Markdown with success results or error details.

Parameters:

  • chain_id (int, required): The EVM Chain ID.
  • method (str, required): The JSON-RPC method name.
  • params (List[Any], optional, default=[]): Array of parameters for the method.
  • request_id (int, optional, default=1): Unique ID for the request.

Example Prompt:

What's the current block number on Binance Smart Chain?

Expected Output (success case):

### RPC Result

**ID:** 42
**Result:** 
"0x1a2b3c4d"

License

This project is licensed under the MIT License - see the LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选