雅虎财经
STDIO雅虎财经数据查询服务器
雅虎财经数据查询服务器
A simple MCP server for Yahoo Finance using yfinance. This server provides a set of tools to fetch stock data, news, and other financial information.
get_ticker_info
symbol (string): The stock symbol.get_ticker_news
symbol (string): The stock symbol.search
query (string): The search query (ticker symbol or company name).search_type (string): Type of search results to retrieve (options: "all", "quotes", "news").get_top
sector (string): The sector to get.top_type (string): Type of top companies to retrieve (options: "top_etfs", "top_mutual_funds", "top_companies", "top_growth_companies", "top_performing_companies").top_n (number, optional): Number of top entities to retrieve (default 10).get_price_history
symbol (string): The stock symbol.period (string, optional): Time period to retrieve data for (e.g. '1d', '1mo', '1y'). Default is '1mo'.interval (string, optional): Data interval frequency (e.g. '1d', '1h', '1m'). Default is '1d'.chart_type (string, optional): Type of chart to generate. If not specified, returns price data as markdown table. Options:
chart_type is not specified: Returns historical price data as a markdown tablechart_type is specified: Returns a base64-encoded WebP image for efficient token usageYou can use this MCP server via uv (Python package installer), Docker, or local development.
{ "mcpServers": { "yfmcp": { "command": "uvx", "args": ["yfmcp@latest"] } } }
Add the following configuration to your MCP server configuration file:
{ "mcpServers": { "yfmcp": { "command": "docker", "args": ["run", "-i", "--rm", "narumi/yfinance-mcp"] } } }
For local development, add the following configuration to your MCP server configuration file:
{ "mcpServers": { "yfmcp": { "command": "uv", "args": [ "run", "--directory", "/path/to/yfinance-mcp", "yfmcp" ] } } }
Replace /path/to/yfinance-mcp with the actual path to your local repository.