使用说明
evmscope
EVM区块链智能工具包。7个链上的26个工具——用作CLI或MCP服务器。代币价格、天然气比较、掉期报价、收益率、蜜罐检测、桥接路由、交易模拟、NFT查找、治理建议、投资组合跟踪等。
为什么选择evmscope?
像Claude和GPT这样的AI代理无法访问实时区块链数据。询问“ETH价格是多少?”或“显示此钱包的余额”,你会得到“我无法访问实时数据”
evmscope通过MCP协议让AI代理直接访问26个链上工具来解决这个问题——代币价格、钱包余额、DeFi收益率、鲸鱼跟踪、蜜罐检测等等。没有API密钥,没有设置,只需连接即可。
这是给谁的?
| 用户 | 用例 |
|---|---|
| AI代理开发人员 | 连接为MCP服务器,提供AI链上分析功能 |
| 加密货币交易员和研究人员 | 直接从终端查询令牌、钱包和协议 |
| DeFi用户 | 安全工具——蜜罐检测、批准状态检查、鲸鱼追踪 |
特性
- 26工具 --价格、气体比较、掉期报价、收益率、蜜罐检测、桥接路由、交易模拟、事件日志、代币持有者、批准状态、TVL、鲸鱼跟踪、余额、代币信息、ENS、交易状态、交易解码、ABI查找、地址ID、NFT信息、NFT元数据、治理建议、区块信息、代币转移、投资组合
- 7个EVM链 --以太坊、多边形、Arbitrum、Base、乐观主义、雪崩、BSC
- 49个内置代币 --ETH、USDC、USDT、WETH、LINK、UNI、AAVE、ARB、OP、PEPE等
- 30+标记地址 --交易所、DeFi协议、网桥、鲸鱼钱包
- 零配置 -不需要API密钥。使用免费的公共API开箱即用
- 只读 --没有交易执行。资金损失风险为零
- 双模式 --CLI用于直接终端使用,MCP服务器用于AI代理集成
快速开始
命令行界面
npx evmscope price ETH
npx evmscope gas
npx evmscope balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
npx evmscope portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
npx evmscope compare-gas
npx evmscope tvl Aave
npx evmscope swap ETH USDC 1.0
npx evmscope block latest
npx evmscope transfers 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
npx evmscope honeypot 0x...
跑 npx evmscope --help 查看全部22个命令。加 --json 用于原始JSON输出。
MCP服务器
以MCP服务器启动(无参数):
npx evmscope
克劳德代码
claude mcp add evmscope -- npx -y evmscope
克劳德桌面版
添加到 claude_desktop_config.json:
{
"mcpServers": {
"evmscope": {
"command": "npx",
"args": ["-y", "evmscope"]
}
}
}
光标
添加到 .cursor/mcp.json:
{
"mcpServers": {
"evmscope": {
"command": "npx",
"args": ["-y", "evmscope"]
}
}
}
工具
getTokenPrice
获取当前代币价格、24小时变化、市值和交易量。
// Input
{ "token": "ETH", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"symbol": "ETH",
"name": "Ethereum",
"priceUsd": 1929.20,
"change24h": -2.34,
"marketCap": 232000000000,
"volume24h": 12500000000
}
}
获取汽油价格
用美元估算获得慢速/正常/快速等级的当前天然气价格。
// Input
{ "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"slow": { "maxFeePerGas": "18.5", "maxPriorityFeePerGas": "1.2", "estimatedCostUsd": 0.75 },
"normal": { "maxFeePerGas": "20.0", "maxPriorityFeePerGas": "1.5", "estimatedCostUsd": 0.81 },
"fast": { "maxFeePerGas": "22.5", "maxPriorityFeePerGas": "2.25", "estimatedCostUsd": 0.91 },
"baseFee": "17.3",
"lastBlock": 19234567
}
}
获取余额
获取具有美元价值的原生代币+ERC-20代币余额。
// Input
{ "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"address": "0xd8dA...",
"nativeBalance": { "symbol": "ETH", "balanceFormatted": "1.234", "valueUsd": 2382.50 },
"tokenBalances": [
{ "symbol": "USDC", "balanceFormatted": "1.0", "valueUsd": 1.00 }
],
"totalValueUsd": 2383.50
}
}
getTokenInfo
获取ERC-20令牌元数据(名称、符号、小数、总供应量)。
// Input
{ "token": "USDC", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"totalSupply": "26000000000"
}
}
解析器
将ENS名称解析为地址,反之亦然(仅限以太坊主网)。
// Input
{ "nameOrAddress": "vitalik.eth" }
// Output
{
"success": true,
"data": {
"name": "vitalik.eth",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"avatar": "https://...",
"resolved": "name_to_address"
}
}
getTx状态
获取交易状态、收据、确认和天然气使用情况。
// Input
{ "txHash": "0xabc...def", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"hash": "0xabc...def",
"status": "success",
"blockNumber": 19234567,
"confirmations": 42,
"from": "0x1234...",
"to": "0x5678...",
"value": "1.5",
"gasUsed": "21000",
"effectiveGasPrice": "20.0",
"timestamp": 1741521600
}
}
decodeTx
将事务解码为结构化JSON——函数名、参数、事件日志。
// Input
{ "txHash": "0xabc...def", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"hash": "0xabc...def",
"from": "0x1234...",
"to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"value": "1.0",
"status": "success",
"function": {
"name": "swapExactETHForTokens",
"signature": "swapExactETHForTokens(uint256,address[],address,uint256)",
"args": { "amountOutMin": "1000000", "path": ["0xC02a...", "0xA0b8..."] }
},
"events": [
{ "name": "Transfer", "address": "0xA0b8...", "args": { "from": "0x...", "to": "0x...", "value": "1000000" } }
],
"gasUsed": "150000",
"gasPrice": "20.0"
}
}
getContractABI
查找已验证合约的ABI(Etherscan→ 酸味回退)。
// Input
{ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"address": "0xA0b8...",
"abi": [...],
"source": "etherscan",
"contractName": "FiatTokenV2_2",
"isContract": true,
"functionCount": 42,
"eventCount": 8
}
}
识别地址
识别一个地址——交易所、DeFi协议、鲸鱼钱包或EOA。
// Input
{ "address": "0x28C6c06298d514Db089934071355E5743bf21d60", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"address": "0x28C6...",
"label": "Binance Hot Wallet",
"category": "exchange",
"protocol": null,
"isContract": false,
"tags": ["cex", "binance"]
}
}
比较气体
同时比较所有7个EVM链的天然气费用,按最低成本排序。
// Input
{}
// Output
{
"success": true,
"data": {
"chains": [
{ "chain": "base", "baseFeeGwei": "0.01", "estimatedCostUsd": 0.0001 },
{ "chain": "arbitrum", "baseFeeGwei": "0.1", "estimatedCostUsd": 0.004 },
{ "chain": "optimism", "baseFeeGwei": "0.05", "estimatedCostUsd": 0.002 },
{ "chain": "polygon", "baseFeeGwei": "30.0", "estimatedCostUsd": 0.01 },
{ "chain": "ethereum", "baseFeeGwei": "20.0", "estimatedCostUsd": 0.81 }
],
"cheapest": "base",
"mostExpensive": "ethereum"
}
}
获取批准状态
检查ERC-20令牌批准(允许)状态。通过风险水平评估自动检查主要的DeFi协议。
// Input
{ "owner": "0xd8dA...", "token": "USDC", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"owner": "0xd8dA...",
"token": "USDC",
"tokenAddress": "0xA0b8...",
"approvals": [
{ "protocol": "Uniswap V3 (router)", "spender": "0xE592...", "allowance": "unlimited", "isUnlimited": true }
],
"riskLevel": "moderate"
}
}
getProtocolTVL
通过DefiLama获取DeFi协议TVL(总值锁定)——链分解,24h/7d变化。
// Input
{ "protocol": "Aave" }
// Output
{
"success": true,
"data": {
"protocol": "Aave",
"slug": "aave",
"totalTvlUsd": 12000000000,
"change24h": 1.5,
"change7d": -3.2,
"chainBreakdown": [
{ "chain": "Ethereum", "tvlUsd": 8000000000, "percentage": 66.67 },
{ "chain": "Polygon", "tvlUsd": 2000000000, "percentage": 16.67 }
]
}
}
获取鲸鱼运动
跟踪大型代币转移(鲸鱼移动)。对外汇存款/取款方向进行分类。
// Input
{ "token": "USDC", "chain": "ethereum", "minValueUsd": 100000, "limit": 10 }
// Output
{
"success": true,
"data": {
"token": "USDC",
"tokenAddress": "0xA0b8...",
"movements": [
{ "txHash": "0xabc...", "from": "0x1234...", "to": "0x28C6...", "fromLabel": null, "toLabel": "Binance Hot Wallet", "value": "500000.00", "valueUsd": 500000, "direction": "exchange_deposit", "timestamp": 1710000000 }
],
"summary": { "totalMovements": 1, "totalValueUsd": 500000, "netExchangeFlow": 500000 }
}
}
getSwapQuote
通过ParaSwap获取DEX掉期报价——最优路线、天然气成本、自动ETH→WETH转换。
// Input
{ "tokenIn": "ETH", "tokenOut": "USDC", "amountIn": "1.0", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"tokenIn": { "symbol": "ETH", "address": "0xEeee...", "amount": "1.000000" },
"tokenOut": { "symbol": "USDC", "address": "0xA0b8...", "amount": "1929.200000" },
"exchangeRate": 1929.2,
"priceImpact": null,
"source": "UniswapV3",
"estimatedGasUsd": "3.50"
}
}
获取收益率
从DefiLama获取DeFi收益率(APY)。按协议、链、最小TVL过滤。
// Input
{ "protocol": "aave-v3", "chain": "Ethereum", "minTvl": 1000000 }
// Output
{
"success": true,
"data": {
"pools": [
{ "project": "aave-v3", "symbol": "USDC", "chain": "Ethereum", "apy": 5.2, "tvlUsd": 500000000, "stablecoin": true }
],
"count": 10
}
}
getContractEvents
通过自动ABI解码获取合约事件日志。
// Input
{ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain": "ethereum", "limit": 5 }
// Output
{
"success": true,
"data": {
"events": [
{ "name": "Transfer", "args": { "from": "0x...", "to": "0x...", "value": "1000000" }, "txHash": "0x...", "blockNumber": 19234567 }
],
"count": 5,
"fromBlock": 19233567,
"toBlock": 19234567
}
}
getTokenHolders
获得顶级代币持有者。以太坊使用Ethplorer,其他链通过Etherscan传输聚合。
// Input
{ "token": "USDC", "chain": "ethereum", "limit": 10 }
// Output
{
"success": true,
"data": {
"token": "0xA0b8...",
"holders": [
{ "address": "0x...", "balance": "1000000", "share": 15.5 }
],
"totalHolders": 12345
}
}
模拟器x
通过eth_call+estimateGas模拟交易。以美元返回天然气估算值,并在失败时还原原因。
// Input
{ "from": "0x1234...", "to": "0x5678...", "data": "0xa9059cbb...", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"success": true,
"gasEstimate": "65000",
"gasEstimateUsd": 2.50,
"returnData": "0x0000...0001",
"error": null
}
}
检查蜜罐
通过honeypot.is检测蜜罐(骗局)代币。返回买卖税、风险水平和标志。
// Input
{ "token": "0x...", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"isHoneypot": false,
"riskLevel": "safe",
"buyTax": 0,
"sellTax": 0,
"flags": [],
"tokenName": "USD Coin",
"tokenSymbol": "USDC"
}
}
getBridgeRoutes
通过LI.FI获取跨链桥接路线。比较费用、时间和输出金额。
// Input
{ "fromChain": "ethereum", "toChain": "arbitrum", "token": "USDC", "amount": "100" }
// Output
{
"success": true,
"data": {
"routes": [
{ "bridge": "Stargate", "estimatedTime": 60, "feeUsd": 0.50, "gasCostUsd": 2.10, "amountOut": "99.50", "amountOutUsd": 99.50 }
],
"bestRoute": { "bridge": "Stargate", "..." : "..." }
}
}
获取NFTInfo
获取钱包的ERC-721 NFT余额和令牌列表。
// Input
{ "address": "0xd8dA...", "contractAddress": "0x...", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"chain": "ethereum",
"contractAddress": "0x...",
"owner": "0xd8dA...",
"totalBalance": 3,
"nfts": [
{ "tokenId": "1234", "tokenURI": "ipfs://..." }
]
}
}
getNFT 元数据
获取特定NFT令牌的元数据(名称、图像、属性)。
// Input
{ "contractAddress": "0x...", "tokenId": "1234", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"contractAddress": "0x...",
"tokenId": "1234",
"tokenURI": "ipfs://...",
"metadata": {
"name": "Cool NFT #1234",
"description": "A very cool NFT",
"image": "ipfs://...",
"attributes": [
{ "trait_type": "Background", "value": "Blue" }
]
}
}
}
获取治理建议
从Snapshot获取治理建议(活动、关闭或全部)。
// Input
{ "protocol": "uniswap", "state": "active" }
// Output
{
"success": true,
"data": {
"space": "uniswapgovernance.eth",
"state": "active",
"proposals": [
{
"title": "Proposal Title",
"state": "active",
"author": "0x1234...",
"start": "2025-01-01",
"end": "2025-01-07",
"votes": 1500,
"quorum": 1000,
"choices": ["For", "Against"],
"scores": [75.5, 24.5]
}
]
}
}
获取区块信息
按编号或最新日期显示区块详细信息(时间戳、气体、交易、验证器)。
// Input
{ "blockNumber": 19234567, "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"number": 19234567,
"timestamp": 1741521600,
"gasUsed": "12345678",
"gasLimit": "30000000",
"baseFeePerGas": "20.0",
"transactionCount": 150,
"miner": "0x1234..."
}
}
getTokenTransfers
钱包地址的最近ERC-20代币转移历史。
// Input
{ "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chain": "ethereum", "limit": 5 }
// Output
{
"success": true,
"data": {
"transfers": [
{ "token": "USDC", "from": "0x1234...", "to": "0xd8dA...", "value": "1000.00", "direction": "in", "txHash": "0xabc...", "timestamp": 1741521600 }
],
"count": 5
}
}
getPortfolio
完整的钱包组合,包含原生+ERC-20余额和美元价值。
// Input
{ "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chain": "ethereum" }
// Output
{
"success": true,
"data": {
"address": "0xd8dA...",
"native": { "symbol": "ETH", "balance": "1.234", "valueUsd": 2382.50 },
"tokens": [
{ "symbol": "USDC", "balance": "1000.00", "valueUsd": 1000.00, "percentage": 29.6 }
],
"totalValueUsd": 3382.50
}
}
支撑链
| 链 | 链ID | 本地令牌 |
|---|---|---|
| 以太坊 | 1 | ETH |
| 多边形 | 137 | POL |
| Arbitrum | 42161 | 以太坊 |
| 基数 | 8453 | ETH |
| 乐观情绪 | 10 | ETH |
| 雪崩 | 43114 | AVAX |
| BSC | 56 | BNB |
环境变量(可选)
所有环境变量都是可选的。evmscope无需任何配置即可工作。
| 变量 | 目的 | 默认值 |
|---|---|---|
EVMSCOPE_RPC_URL |
自定义RPC端点(所有链) | 公共RPC |
EVMSCOPE_RPC_URL_ETHEREUM |
以太坊特定的RPC端点 | 回退到RPC_URL |
EVMSCOPE_RPC_URL_POLYGON |
特定于多边形的RPC端点 | 回退到RPC_URL |
EVMSCOPE_RPC_URL_ARBITRUM |
Arbitrum特定的RPC端点 | 回退到RPC_URL |
EVMSCOPE_RPC_URL_BASE |
特定于基础的RPC端点 | 回退到RPC_URL |
EVMSCOPE_RPC_URL_OPTIMISM |
特定于乐观的RPC端点 | 回退到RPC_URL |
EVMSCOPE_RPC_URL_AVALANCHE |
特定于雪崩的RPC端点 | 回退到RPC_URL |
EVMSCOPE_RPC_URL_BSC |
BSC特定的RPC端点 | 回退到RPC_URL |
EVMSCOPE_COINGECKO_KEY |
CoinGecko API密钥(更高的费率限制) | 免费等级 |
EVMSCOPE_ETHERSCAN_KEY |
Etherscan API密钥(更高的速率限制) | 免费层 |
EVMSCOPE_POLYGONSCAN_KEY |
Polygonscan API密钥 | 返回到ETHERSCAN_key |
EVMSCOPE_ARBISCAN_KEY |
Arbiscan API密钥 | 回退到ETHERSCAN_key |
EVMSCOPE_BASESCAN_KEY |
Basescan API密钥 | 回退到ETHERSCAN_key |
EVMSCOPE_OPTIMISTIC_KEY |
乐观的Etherscan API密钥 | 回到Etherscan_key |
EVMSCOPE_SNOWTRACE_KEY |
Snowtrace API密钥(雪崩) | 回退到ETHERSCAN_key |
EVMSCOPE_BSCSCAN_KEY |
BscScan API密钥(BSC) | 回退到ETHERSCAN_key |
EVMSCOPE_ETHPLORER_KEY |
Ethplorer API密钥(令牌持有者) | freekey |
EVMSCOPE_LIFI_KEY |
LI.FI API密钥(桥接路由) | 公共访问 |
EVMSCOPE_DEBUG |
启用调试日志记录(设置为 1) |
已禁用 |
内置数据库
| 数据库 | 内容 |
|---|---|
tokens.json |
49种具有多链地址和CoinGecko ID的主要代币 |
signatures.json |
36个通用功能签名(ERC-20、DEX、借出、NFT) |
labels.json |
30个标签地址(交易所、桥梁、鲸鱼钱包) |
protocols.json |
10个具有多链合约地址的DeFi协议 |
路线图
- v0.1 (已完成)--5个工具:价格、交易费用、余额、代币信息、ENS
- v0.5 (已完成)--+4个工具:decodeTx、getTxStatus、getContractABI、identyAddress
- v1.0 (已完成)--+5个工具:compareGas、getApprovalStatus、getProtocolTVL、getWhaleMovements、getSwapQuote
- v1.5 (已完成)--+6个工具:simulateTx、getYieldRates、getTokenHolders、getContractEvents、checkHoneypot、getBridgeRoutes
- v1.5.1 (已完成)——代码质量+安全重构:7个新的共享模块、每链RPC URL、缓存大小限制、统一地址验证、CLI模块化
- v1.6.0 (已完成)--+3个工具:getNFTInfo、getNFTMetadata、getGovernanceProposals。+2条链:雪崩、BSC
- v1.7.0 (已完成)--+3个工具:getBlockInfo、getTokenTransfers、getPortfolio。安全强化(v1.6.1)
