Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_yield_pools

Retrieve comprehensive yield pool data with predictions to analyze DeFi investment opportunities.

Instructions

GET /yields/pools

Retrieve the latest data for all pools, including enriched information such as predictions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_yield_pools' MCP tool. Decorated with @mcp.tool() for registration, it fetches the latest yield pools data from the DefiLlama API endpoint '/yields/pools' and returns it as a string.
    @mcp.tool() async def get_yield_pools() -> str: """GET /yields/pools Retrieve the latest data for all pools, including enriched information such as predictions. """ result = await make_request('GET', '/yields/pools') return str(result)
  • Helper function used by get_yield_pools and other tools to perform HTTP requests to the DefiLlama 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)}"
  • Initialization of the FastMCP server instance where tools like get_yield_pools are registered via decorators.
    mcp = FastMCP("defillama")
  • Entry point that runs the MCP server, making all registered tools available.
    if __name__ == "__main__": mcp.run(transport='stdio')

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