No project description provided
Project description
Yahoo Finance MCP Server
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.
Tools
-
get_ticker_info
- Retrieve stock data including company info, financials, trading metrics and governance data.
- Inputs:
symbol(string): The stock symbol.
-
get_ticker_news
- Fetches recent news articles related to a specific stock symbol with title, content, and source details.
- Inputs:
symbol(string): The stock symbol.
-
search
- Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles.
- Inputs:
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
- Get top entities (ETFs, mutual funds, companies, growth companies, or performing companies) in a sector.
- Inputs:
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
- Fetch historical price data for a given stock symbol over a specified period and interval.
- Inputs:
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'.
-
get_chart
- Generate a financial chart using mplfinance showing candlestick price data with volume bars, optionally with VWAP (Volume Weighted Average Price) overlay or volume profile. Returns a base64-encoded WebP image for efficient token usage.
- Inputs:
symbol(string): The stock symbol.chart_type(string, optional): Type of chart to generate. Options:- "price_volume" (default): Candlestick chart with volume bars
- "vwap": Volume Weighted Average Price chart with VWAP overlay
- "volume_profile": Candlestick chart with volume profile showing volume distribution by price level (displayed as a histogram on the right side)
period(string, optional): Time period to retrieve data for (e.g. '1d', '5d', '1mo'). For intraday charts, use '1d' or '5d'. Default is '1d'.interval(string, optional): Data interval frequency. For day charts, use '1m', '2m', '5m', '15m', '30m', '60m', or '1h'. Default is '5m'.
- Output: JSON object containing:
image_base64: Base64-encoded WebP image stringsymbol: The stock symbolchart_type: The chart type usedperiod: The time periodinterval: The data intervaldata_points: Number of data points in the chartformat: Image format (always "webp")
Usage
You can use this MCP server either via uv (Python package installer) or Docker.
Via uv
- Install uv
- Add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "uvx",
"args": ["yfmcp@latest"]
}
}
}
Via Docker
Add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yfmcp-0.5.0-py3-none-any.whl.
File metadata
- Download URL: yfmcp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ae7e529fb701b8c21bfe996c6975b59f67d0f40f63e677c8d5e58477939d478
|
|
| MD5 |
093e40c578917e08c3fe7629eb849a3e
|
|
| BLAKE2b-256 |
dd3e6ec2e7b2b6c2535bcb6ec8f7017ece7d6c346eff9d478af1eb3026eb27ed
|