Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_historical_chain_tvl_by_chain

Retrieve historical Total Value Locked data for a specific blockchain, excluding liquid staking and double-counted TVL, to analyze DeFi ecosystem growth over time.

Instructions

GET /api/v2/historicalChainTvl/{chain}

Get historical TVL (excludes liquid staking and double counted tvl) of a chain. Parameters: chain: chain slug (e.g., 'Ethereum')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes

Implementation Reference

  • Handler function for get_historical_chain_tvl_by_chain tool. Registered via @mcp.tool() decorator. Fetches historical TVL data for a specific chain from DefiLlama API using the shared make_request helper.
    @mcp.tool() async def get_historical_chain_tvl_by_chain(chain: str) -> str: """GET /api/v2/historicalChainTvl/{chain} Get historical TVL (excludes liquid staking and double counted tvl) of a chain. Parameters: chain: chain slug (e.g., 'Ethereum') """ result = await make_request('GET', f'/api/v2/historicalChainTvl/{chain}') return str(result)
  • Shared utility function used by the tool (and others) to perform HTTP requests to the DefiLlama Pro API.
    async def make_request(method: str, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Any: """Make a request to the DefiLlama API.""" try: response = await client.request(method, endpoint, params=params) response.raise_for_status() return response.json() except Exception as e: return f"Error: {str(e)}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xReisearch/crypto-mcp-beta'

If you have feedback or need assistance with the MCP directory API, please join our Discord server