yfinance
MCP server from narumiruna/yfinance-mcp
claude mcp add --transport stdio narumiruna-yfinance-mcp uvx yfmcp@latest
How to use
This MCP server exposes Yahoo Finance data and insights through a set of tools built on the yfinance library. The available tools let you fetch detailed ticker information, recent news, perform search queries across Yahoo Finance, retrieve top entities by sector, and obtain historical price data with optional chart visualizations. You can access these tools by calling the corresponding MCP endpoints through your MCP gateway (uv, docker, or local development) using the yfmcp server configuration.
How to install
Prerequisites:
- Python environment and uv (the MCP runtime) installed on your system.
- Access to the internet to install python packages via uvx.
Recommended install steps:
- Install uv if you haven't:
# On macOS
brew install uv
# On Debian/Ubuntu
pipx install uvx
- Install and run the Yahoo Finance MCP server via uv:
# Install the MCP server package (as shown in README usage)
uvx install yfmcp@latest
# Run the server (local development example will vary by setup)
uv run yfmcp
- Alternative: Run via Docker
# Pull and run the container directly
docker run -i --rm narumi/yfinance-mcp
- Alternative: Local development (via uv) with a local path to the repo
uv run --directory /path/to/yfinance-mcp yfmcp
Notes:
- Ensure your environment variables for API access (if any) are set as needed. The repository README references demo environment setup for Chainlit; adapt variables to your deployment if you enable the demo tooling.
Additional notes
Tips and notes:
- The yfinance_get_price_history tool can return either a markdown table of historical data (default) or a base64-encoded WebP image when chart_type is provided. Use chart_type values: price_volume, vwap, or volume_profile.
- The yfinance_get_ticker_info tool returns company info, financials, trading metrics, and governance data for a given symbol.
- For large queries (e.g., top entities or extensive price history), consider paging or limiting inputs to avoid long response times.
- If you encounter network or package resolution issues with uvx, ensure Python and pipx are up to date and that your environment can access PyPI.
- The Docker deployment uses the narumi/yfinance-mcp image; verify tag compatibility with your uvx-based workflows if mixing runtimes.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
yahoo-finance
This is a Model Context Protocol (MCP) server that provides comprehensive financial data from Yahoo Finance. It allows you to retrieve detailed information about stocks, including historical prices, company information, financial statements, options data, and market news.
zotero
Model Context Protocol (MCP) server for the Zotero API, in Python
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
sympy
A MCP server for symbolic manipulation of mathematical expressions
mcp-oi-wiki
🌟 Wiki of OI / ICPC for LLMs. (面向大模型的某大型游戏线上攻略,内含炫酷算术魔法)