- Yahoo Fianace MCP
Yahoo Fianace MCP
Overview
What is Yahoo Finance MCP?
Yahoo Finance MCP is a Python-based Model Context Protocol (MCP) server built using FastMCP. It exposes a comprehensive set of tools derived from the yfinance library, allowing AI clients (like Claude Desktop) to easily access and query various types of financial data directly from Yahoo Finance.
How to use Yahoo Finance MCP?
To use Yahoo Finance MCP, clone the repository, set up a Python virtual environment using uv, and install the required dependencies (requirements.txt). Run the server by executing python main.py. Configure your MCP client (e.g., Claude Desktop) to connect to the server process using the specified command and args in the server configuration (pointing to the project's virtual environment Python and main.py). The client can then invoke specific financial data tools like get_news(symbol='AAPL') or get_income_statement(symbol='TSLA', freq='quarterly').
Key features of Yahoo Finance MCP?
- Direct MCP access to a wide range of Yahoo Finance data via the
yfinancelibrary. - Granular tools for specific data retrieval (e.g., price, history, financials, news, holders, options, ESG).
- Standard MCP server implementation using
FastMCPandstdiotransport. - Easy setup using
uvfor environment and dependency management. - Returns structured financial data, often as JSON strings, suitable for AI processing.
Use cases of Yahoo Finance MCP?
- Retrieving real-time or historical stock prices for specific tickers.
- Fetching fundamental financial data like income statements, balance sheets, and cash flow reports (annually or quarterly).
- Accessing company news, dividend history, analyst recommendations, and upcoming earnings dates.
- Querying holder information (major, institutional, mutual fund) and sustainability (ESG) scores.
- Getting options data like expiration dates and option chains.
FAQ from Yahoo Finance MCP?
- Is Yahoo Finance MCP free to use?
Yes, the project itself is open-source. It relies on the
yfinancelibrary which accesses publicly available data from Yahoo Finance. - Where does the financial data come from?
All data is sourced directly from Yahoo Finance via the
yfinancelibrary. Data accuracy and availability depend on Yahoo Finance itself. - What do I need to run this server?
You need Python and
uvinstalled. Clone the repository and follow the setup instructions in the README to install dependencies within a virtual environment. - Can I request data for any stock symbol?
You can request data for any symbol available on Yahoo Finance. Availability of specific data points (like options or certain historical intervals) may vary by symbol and market.
Server Config
{
"mcpServers": {
"yahoo_finance_engine": {
"command": "/path/to/your/yahoo-finance/.venv/bin/python",
"args": [
"/path/to/your/yahoo-finance/main.py"
]
}
}
}