infura-mcp
by deflang·★ 1·综合分 31
通过 Infura API 使用自然语言查询以太坊区块链数据的 MCP 服务器。
概述
infura-mcp 是一个专业的 MCP 服务器,通过 Infura 的 API 提供对以太坊区块链数据的访问。它提供了一套全面的工具,用于查询区块链信息,包括账户、余额、交易、区块等。服务器支持只读和写入操作,后者默认禁用以保障安全。它支持 HTTP 流式传输和容器化选项,使其适用于各种部署场景。
试试问 AI
装完之后,这里有 6 个你可以让 AI 做的事:
什么时候选它
当您需要通过自然语言查询访问以太坊区块链数据,并且已经使用或愿意设置 Infura API 密钥时,选择此 MCP 服务器。
什么时候不要选它
如果您需要支持以太坊以外的区块链,需要不需要手动启用的健壮写入操作,或者担心对 Infura 基础设施的潜在供应商锁定问题,请避免使用此服务器。
此 server 暴露的工具
从 README 抽取出 12 个工具eth_get_balanceGet the balance of an Ethereum address
eth_get_block_by_hashRetrieve block information by its hash
eth_get_block_by_numberRetrieve block information by its number
eth_get_transaction_by_hashGet details of a transaction by its hash
eth_get_transaction_receiptGet receipt information for a transaction
eth_get_logsFilter logs from the Ethereum blockchain
eth_send_raw_transactionSend a raw transaction to the Ethereum network
eth_gas_estimateEstimate gas required for a transaction
eth_get_fee_historyGet historical fee data for blocks
eth_sync_statusCheck if the node is syncing and progress
eth_get_protocol_versionGet the Ethereum protocol version
eth_get_web3_client_versionGet the client software version
可对比工具
安装
安装
- 从 PyPI 安装包:
pip install infura-mcp- 通过 Claude Desktop 配置,将以下内容添加到 config.json:
{
"mcpServers": {
"infura": {
"command": "npx",
"args": [
"-y",
"infura-mcp"
],
"env": {
"INFURA_API_KEY": "your-api-key-here",
"WRITE_TOOLS_ENABLED": false
}
}
}
}- 或使用 Docker 运行:
docker run -d --name infura-mcp-server -p 3000:3000 -e INFURA_API_KEY="your-infura-api-key" sumiteshn/infura-mcp:latestFAQ
- 这个项目是否与 Infura 有关联?
- 不,这个项目没有得到 Infura 的任何赞助或支持。它是一个使用 Infura API 的独立实现。
- 如何启用写入工具?
- 在您的配置中将 WRITE_TOOLS_ENABLED 环境变量设置为 true。请注意,出于安全考虑,写入工具默认是禁用的。
- 支持哪些区块链网络?
- 该服务器支持通过 Infura API 可用的所有网络,包括以太坊主网和各种测试网络。
infura-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。