关于 Chainlist MCP Server
Chainlist MCP Server 为 AI Agent 提供来自 Chainlist.org 的 EVM 链信息。它支持按链 ID 查询或按关键词搜索,并以结构化 Markdown 返回 RPC 端点和区块浏览器等信息。
主要功能
- 01按 ID 查询区块链
- 02按关键词搜索区块链
- 03不区分大小写的部分匹配
- 04缓存 Chainlist API 数据
- 05以 Markdown 表格展示 RPC 和浏览器
适用场景
- 01查询已知链 ID 的详情
- 02通过名称片段查找区块链
- 03查看 RPC 端点和区块浏览器
MCP 相关
该 MCP 服务向兼容客户端提供 `getChainById` 和 `getChainsByKeyword`。结果包含链信息,例如 RPC 端点、区块浏览器和原生代币。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Chainlist MCP Server
一个 MCP 服务,可让 AI Agent 快速获取经过验证的 EVM 链信息,包括 RPC URL、链 ID、区块浏览器和原生代币,数据来源于 Chainlist.org。
功能
- 高效获取数据:缓存 Chainlist API 数据,以尽量减少请求。
- 灵活搜索:
getChainsByKeyword使用正则表达式进行不区分大小写的关键词匹配。 - 结构化输出:以 Markdown 格式响应,并将
rpc和explorers制成表格,便于阅读。
安装
先决条件
- Python:版本 3.10 或更高。
- uv:推荐用于管理 Python 项目和依赖项(通过
pip install uv安装,或参阅 uv 文档)。
步骤
-
克隆仓库:
git clone https://github.com/kukapay/chainlist-mcp.git cd chainlist-mcp -
安装依赖项:
uv sync -
安装到 Claude Desktop:
将此服务安装为 Claude Desktop 应用:
uv run mcp install cli.py --name "Chainlist MCP"配置文件示例:
{ "mcpServers": { "Chainlist MCP": { "command": "uv", "args": [ "--directory", "/path/to/chainlist-mcp", "run", "main.py" ] } } }将
/path/to/chainlist-mcp替换为实际的安装路径。
使用方法
此服务通过 MCP 协议提供两个工具,可通过兼容 MCP 的客户端或 MCP Inspector 使用。
工具
getChainById
- 说明:根据链 ID 获取区块链详情。
- 参数:
chain_id(整数):区块链的唯一标识符(例如,Ethereum Mainnet 的 ID 为 1)。
- 返回值:包含链详情的 Markdown 字符串或错误消息。
提示词示例(在 MCP 客户端中):
Get the details for the blockchain with chain ID 1.
响应示例:
**Chain Details**
- **Name**: Ethereum Mainnet
- **Chain ID**: 1
- **Native Currency**: Ether (ETH, 18 decimals)
- **TVL**: 134376951329.85631
**RPC Endpoints**:
| URL | Tracking |
|----------------------------------------------|----------|
| https://eth.llamarpc.com | none |
| https://go.getblock.io/... | none |
...
**Explorers**:
| Name | URL | Standard |
|------------|----------------------------|----------|
| etherscan | https://etherscan.io | EIP3091 |
...
getChainsByKeyword
- 说明:按关键词搜索区块链(不区分大小写的部分匹配)。
- 参数:
keyword(字符串):要搜索的关键词或部分名称(例如,'eth')。limit(整数,可选):结果的最大数量(默认值:5)。
- 返回值:列出最多
limit个匹配链的 Markdown 字符串或错误消息。
提示词示例(在 MCP 客户端中):
Find blockchains with 'eth' in their name, limit to 2 results.
响应示例:
**Matching Chains**
### Chain 1
**Chain Details**
- **Name**: Ethereum Mainnet
- **Chain ID**: 1
- **Native Currency**: Ether (ETH, 18 decimals)
- **TVL**: 134376951329.85631
**RPC Endpoints**:
| URL | Tracking |
|----------------------------------------------|----------|
| https://eth.llamarpc.com | none |
...
**Explorers**:
| Name | URL | Standard |
|------------|----------------------------|----------|
| etherscan | https://etherscan.io | EIP3091 |
...
### Chain 2
**Chain Details**
- **Name**: Ethereum Goerli
- **Chain ID**: 5
- **Native Currency**: Ether (ETH, 18 decimals)
- **TVL**: N/A
**RPC Endpoints**:
| URL | Tracking |
|----------------------------------------------|----------|
| https://goerli.infura.io/... | yes |
...
**Explorers**:
| Name | URL | Standard |
|------------|----------------------------|----------|
| etherscan | https://goerli.etherscan.io | EIP3091 |
...
许可证
本项目根据 MIT License 授权。详情请参阅 LICENSE 文件。
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。