Skip to main content
Glama
narumiruna

Yahoo Finance MCP Server

get_ticker_news

Retrieve recent news articles for a specific stock symbol, including title, content, and source details, to stay informed about market developments.

Instructions

Fetches recent news articles related to a specific stock symbol with title, content, and source details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesThe stock symbol

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_ticker_news' tool, decorated with @mcp.tool() for registration in FastMCP. It takes a stock symbol, fetches the ticker using yfinance, retrieves news articles, and returns them as a string.
    @mcp.tool()
    def get_ticker_news(symbol: Annotated[str, Field(description="The stock symbol")]) -> str:
        """Fetches recent news articles related to a specific stock symbol with title, content, and source details."""
        ticker = yf.Ticker(symbol)
        news = ticker.get_news()
        return str(news)
  • The @mcp.tool() decorator registers the get_ticker_news function as an MCP tool.
    @mcp.tool()
  • Input schema defined via Annotated[str, Field(...)] for the symbol parameter; output is str.
    def get_ticker_news(symbol: Annotated[str, Field(description="The stock symbol")]) -> str:

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

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/narumiruna/yfinance-mcp'

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