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.
claude mcp add --transport stdio alex2yang97-yahoo-finance-mcp uv run server.py
How to use
The Yahoo Finance MCP Server provides a suite of tools to access detailed financial data from Yahoo Finance through the Model Context Protocol. You can retrieve historical stock prices, current stock information, companyDetails, news, dividends and splits history, as well as various financial statements and options data. Tools include get_historical_stock_prices, get_stock_info, get_yahoo_finance_news, get_stock_actions, get_financial_statement, get_holder_info, get_option_expiration_dates, get_option_chain, and get_recommendations. After starting the server, you can query these tools via your MCP client to obtain structured data for your analyses and insights.
How to install
Prerequisites:
- Python 3.11 or higher
- git
- Access to install Python packages (pip)
Installation steps:
-
Clone the repository: git clone https://github.com/Alex2Yang97/yahoo-finance-mcp.git cd yahoo-finance-mcp
-
Create and activate a virtual environment: python -m venv .venv
On macOS/Linux
source .venv/bin/activate
On Windows
.venv\Scripts\activate
-
Install the package in editable mode (from the project root): uv pip install -e .
-
Run the MCP server (development mode): uv run server.py
Prerequisites note:
- Ensure you have network access to Yahoo Finance data sources (via yfinance or similar dependencies listed in pyproject.toml).
- Install dependencies as defined in pyproject.toml (mcp, yfinance, pandas, pydantic, etc.).
Additional notes
Environment and configuration tips:
- If running Claude for Desktop integration, you may need to provide the absolute path to the project directory in the Claude config, as shown in the README.
- If uv fails to start due to port or directory issues, ensure you are in the project root and that server.py is accessible.
- You can customize tool behavior through the underlying code and environment variables (e.g., API keys or rate limits) as needed for production deployments.
- The mcpServers key can be renamed to match your deployment label; the important part is the command and arguments used to start the server.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
zotero
Model Context Protocol (MCP) server for the Zotero API, in Python
yfinance
MCP server from narumiruna/yfinance-mcp
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.