MCP Yahoo Finance
Provides a way to run the MCP Yahoo Finance server in a Docker container for more isolated deployment
References the original and current repositories, along with acknowledgments to the original creator and contributors
Includes configuration information for running on Linux systems with appropriate paths
Provides specific configuration paths for the Claude Desktop client on macOS systems
Used as part of the data processing infrastructure for financial calculations and visualizations
Leveraged for financial data manipulation and analysis, particularly for stock price time series
Used to generate interactive financial visualizations and technical analysis charts
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Yahoo Finance show me the current stock price for Apple"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Yahoo Finance
A Model Context Protocol (MCP) server for Yahoo Finance interaction. This server provides tools to get pricing, company information, and generate financial visualizations.
This project is a fork and extension of maxscheijen/mcp-yahoo-finance, with added visualization capabilities.
Features
Financial Data: Get current stock prices, historical prices, dividends, income statements, and more
Visual Analytics: Generate beautiful visualizations for market sentiment, portfolio tracking, and technical analysis
Easy Integration: Works with Claude Desktop, VS Code, Cursor, and other MCP clients
Related MCP server: Yahoo Finance MCP Server
Setup Instructions
1. Clone the Repository
Clone this repository to your local machine:
git clone https://github.com/leoncuhk/mcp-yahoo-finance.git
cd mcp-yahoo-finance2. Install Dependencies
Install the required dependencies using pip:
pip install -r requirements.txtIf the requirements.txt file is missing, you can install dependencies directly:
pip install mcp yfinance pandas matplotlib seaborn plotly kaleido numpy pillow base64io3. Configure MCP Client
Claude Desktop
Add this to your claude_desktop_config.json (create it if it doesn't exist):
macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}You can also use docker:
{
"mcpServers": {
"yahoo-finance": {
"command": "docker",
"args": ["run", "-i", "--rm", "IMAGE"]
}
}
}VSCode
Add this to your .vscode/mcp.json:
{
"servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}Cursor
Add this to your Cursor MCP configuration:
{
"mcp-servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}4. Restart your MCP client
After configuring, restart Claude Desktop or your preferred MCP client to load the server.
Available Tools
Basic Financial Data
get_current_stock_price: Get the current stock price for a symbol
get_stock_price_by_date: Get the stock price for a specific date
get_stock_price_date_range: Get stock prices for a date range
get_historical_stock_prices: Get historical stock data with customizable periods
get_dividends: Get dividend information for a stock
get_income_statement: Get income statement data
get_cashflow: Get cashflow statement data
get_earning_dates: Get earning dates information
get_news: Get recent news for a stock
Visualization Tools
generate_market_dashboard: Create a market sentiment dashboard with real-time index performance
generate_portfolio_report: Generate a portfolio performance tracking report
generate_stock_technical_analysis: Create a technical analysis report for a stock
Visualization Examples
Market Sentiment Dashboard

Portfolio Tracking

Stock Technical Analysis

Example Prompts
Here are some example prompts to try with Claude:
Basic Financial Data
"What is the current stock price of Apple?"
"What is the difference in stock price between Apple and Google?"
"How much did the stock price of Apple change between 2025-01-01 and 2025-3-31?"
Visualization Requests
"Generate a market sentiment dashboard showing the performance of major indices."
"Create a portfolio tracking report for tech stocks AAPL, MSFT, GOOGL, AMZN, and NVDA."
"Show me a technical analysis chart for Tesla stock with moving averages and support/resistance levels."
"Generate a market sentiment dashboard with S&P 500, Dow Jones, and NASDAQ."
"Can you create a portfolio report for my energy stocks: XOM, CVX, BP, COP, and SLB?"
"I need a detailed technical analysis for NVDA stock showing RSI and volume patterns."
Testing
To test the visualization capabilities:
cd tests
python test_visualization.pyThis will generate example visualization images in the examples directory.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
Original project by Max Scheijen
Extended with visualization capabilities inspired by tooyipjee
Available Tools
10 toolsget_cashflowC
Get cashflow for a given stock symbol.
Inputs: symbol (required), freq.
get_current_stock_priceC
Get the current stock price based on stock symbol.
Inputs: symbol (required).
get_dividendsC
Get dividends for a given stock symbol.
Inputs: symbol (required).
get_earning_datesC
Get earning dates.
Inputs: symbol (required), limit.
get_historical_stock_pricesC
Get historical stock prices for a given stock symbol.
Inputs: symbol (required), period, interval.
get_income_statementC
Get income statement for a given stock symbol.
Inputs: symbol (required), freq.
get_newsC
Get news for a given stock symbol.
Inputs: symbol (required).
get_recommendationsC
Get analyst recommendations for a given symbol.
Inputs: symbol (required).
get_stock_price_by_dateB
Get the stock price for a given stock symbol on a specific date.
Inputs: symbol (required), date (required).
get_stock_price_date_rangeC
Get the stock prices for a given date range for a given stock symbol.
Inputs: symbol (required), start_date (required), end_date (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools are clearly distinct, focusing on specific financial data types like cashflow, dividends, or news. However, there is some overlap between get_current_stock_price, get_stock_price_by_date, and get_stock_price_date_range, which could cause confusion about which to use for price queries, though their descriptions help clarify the differences.
All tools follow a consistent verb_noun pattern with 'get_' prefix and snake_case, such as get_cashflow and get_historical_stock_prices. This predictability makes it easy for agents to understand and navigate the tool set without naming conflicts or inconsistencies.
With 10 tools, the server is well-scoped for financial data retrieval, covering key aspects like prices, financial statements, news, and recommendations. Each tool serves a distinct purpose without being overly broad or sparse, fitting typical needs in this domain.
The tool set provides comprehensive coverage for retrieving financial data, including core elements like prices, statements, and news. A minor gap is the lack of tools for updating or managing data (e.g., no create or delete operations), but this is reasonable for a read-only finance server focused on data access.
Maintenance
Related MCP Connectors
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Deterministic profitability and market-value analysis tools for AI agents — margins, ROA, ROE, ROCE, ROIC, EPS, P/E, P/B, dividend yield and payout ratio via Model Context Protocol. Useful for corporate finance, equity analysis, financial analysis, quantitative analysis, financial formulas and financial modeling.
Deterministic company valuation and corporate finance tools for AI agents — IRR, NPV, MOIC, DCF, WACC, enterprise value, EV multiples, CAPM, beta and sensitivity analysis via Model Context Protocol. Useful for financial analysis, equity analysis, quantitative analysis, financial projections, financial formulas and financial modeling.
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time financial data from Yahoo Finance to Large Language Models through the Model Context Protocol, enabling AI models to access stock prices, historical data, and company information.1MIT
- AlicenseAqualityCmaintenanceProvides access to real-time stock prices, financial statements, news, and options data via the Model Context Protocol. It enables AI assistants to retrieve comprehensive market data, including historical prices and analyst recommendations, through a standardized interface.957 PyPI2MIT
- FlicenseAqualityDmaintenanceProvides financial data tools including stock prices, news, forex, fundamentals, and corporate actions via the Tiingo API through the Model Context Protocol.115-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs and agentic workflows to access real-time and historical stock market data through the Model Context Protocol.226MIT