Skip to main content
Glama
leoncuhk

MCP Yahoo Finance

by leoncuhk

get_news

Retrieve relevant news articles for a specific stock symbol using the MCP Yahoo Finance server. Stay informed with financial updates directly tied to your investment interests.

Instructions

Get news for a given stock symbol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock symbol in Yahoo Finance format.

Implementation Reference

  • MCP tool handler for 'get_news', registered via @mcp_instance.tool() decorator. Delegates to the YahooFinance instance's get_news method.
    @mcp_instance.tool() def get_news(symbol: str) -> str: """Get news for a given stock symbol. Args: symbol (str): Stock symbol in Yahoo Finance format. """ return yf_instance.get_news(symbol)
  • Core helper function in YahooFinance class that fetches news headlines for a stock symbol using yfinance.Ticker and returns JSON dump.
    def get_news(self, symbol: str) -> str: """Get news for a given stock symbol. Args: symbol (str): Stock symbol in Yahoo Finance format. """ stock = Ticker(ticker=symbol, session=self.session) return json.dumps(stock.news, indent=2)

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/leoncuhk/mcp-yahoo-finance'

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