Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_crypto_latest_news

Retrieve cryptocurrency news updates from the Yahoo Finance MCP Server to stay informed on market trends and developments.

Instructions

获取加密货币最新新闻列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
pageNo

Implementation Reference

  • The handler function that executes the tool logic: fetches latest crypto news from Financial Modeling Prep API using page and limit parameters, returns JSON string or error message.
    async def get_crypto_latest_news(page: int = 0, limit: int = 20) -> str:
        """获取最新加密货币新闻"""
    
        api_key = os.environ.get("FMP_API_KEY")
        if not api_key:
            return "Error: FMP_API_KEY environment variable not set."
    
        url = "https://financialmodelingprep.com/stable/news/crypto-latest"
        try:
            resp = requests.get(
                url,
                params={"page": page, "limit": limit, "apikey": api_key},
                timeout=10,
            )
            resp.raise_for_status()
            data = resp.json()
        except Exception as e:
            return f"Error: getting latest crypto news: {e}"
        return json.dumps(data)
  • server.py:1257-1260 (registration)
    Registers the get_crypto_latest_news tool using the @fmp_server.tool decorator with name and description.
    @fmp_server.tool(
        name="get_crypto_latest_news",
        description="""获取加密货币最新新闻列表。""",
    )

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/16Coffee/finance-mcp'

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