Provides tools to get financial data (stock prices, company information) and generate financial visualizations through the Model Context Protocol.
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.
Clone this repository to your local machine:
git clone https://github.com/leoncuhk/mcp-yahoo-finance.git cd mcp-yahoo-finance
Install the required dependencies using pip:
pip install -r requirements.txt
If the requirements.txt file is missing, you can install dependencies directly:
pip install mcp yfinance pandas matplotlib seaborn plotly kaleido numpy pillow base64io
Add this to your claude_desktop_config.json
(create it if it doesn't exist):
~/Library/Application Support/Claude/claude_desktop_config.json
%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"] } } }
Add this to your .vscode/mcp.json
:
{ "servers": { "yahoo-finance": { "command": "uvx", "args": ["mcp-yahoo-finance"] } } }
Add this to your Cursor MCP configuration:
{ "mcp-servers": { "yahoo-finance": { "command": "uvx", "args": ["mcp-yahoo-finance"] } } }
After configuring, restart Claude Desktop or your preferred MCP client to load the server.
Here are some example prompts to try with Claude:
To test the visualization capabilities:
cd tests python test_visualization.py
This will generate example visualization images in the examples
directory.
This project is licensed under the MIT License - see the LICENSE file for details.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!