Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_crypto_news

Search for cryptocurrency-related news by providing specific crypto symbols. This tool connects to the Yahoo Finance MCP Server to deliver targeted financial updates.

Instructions

搜索加密货币相关新闻。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolsYes

Implementation Reference

  • The main handler function that fetches cryptocurrency news from the Financial Modeling Prep API using the provided symbols, handles errors, and returns JSON data.
    async def get_crypto_news(symbols: str) -> 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" try: resp = requests.get(url, params={"symbols": symbols, "apikey": api_key}, timeout=10) resp.raise_for_status() data = resp.json() except Exception as e: return f"Error: getting crypto news for {symbols}: {e}" return json.dumps(data)
  • server.py:1236-1239 (registration)
    The decorator that registers the 'get_crypto_news' tool with the MCP server, including its name and description.
    @fmp_server.tool( name="get_crypto_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