peidaqi/yfinance-mcp-server
If you are the rightful owner of yfinance-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project implements a Model Context Protocol (MCP) server to enable interaction between Large Language Models (LLMs) and Yahoo Finance using the yfinance Python library.
MCP Server for Interacting with Yahoo Finance
The Model Context Protocol (MCP) is an open standard developed by Anthropic to enable seamless integration between Large Language Models (LLMs) and external tools, services, and data sources.
This project provides a simple implementation that allows LLM to interact with Yahoo Finance through the yfinance Python library.
The server uses fastmcp and runs within a Docker container to ensure portability.
Installation
- Using python & pip:
pip install .
- Alternative - using Docker:
docker build -t yfinance-mcp-server .
Configuration
- If installed using python & pip, add this item in MCP settings:
"mcpServers": {
"YahooFinanceServer": {
"command": "python",
"args": ["-m", "yfinance_mcp_server"]
}
}
- If installed using Docker, add this item in MCP settings:
"mcpServers": {
"YahooFinanceServer": {
"command": "docker",
"args": ["run", "-i", "yfinance-mcp-server"]
}
}
Example
In your LLM interface, e.g. Cline, you can ask something like:
What is MSFT's stock price on Jan 1, 2025?