
yfinance MCP Server
Finance mcp server- Get up-to-date prices and news about stocks and cryptocurrencies
what is yfinance MCP Server?
The yfinance MCP Server is a Model Context Protocol server that provides accurate and up-to-date prices and news about stock and cryptocurrency tickers.
how to use yfinance MCP Server?
To use the yfinance MCP Server, you can either install it locally using pip or run it using Docker. After installation, you can interact with the server to get stock prices and news by sending requests with the appropriate ticker symbols.
key features of yfinance MCP Server?
- Get real-time prices for stocks and cryptocurrencies.
- Retrieve the latest news articles related to specific tickers.
- Supports both local installation and Docker deployment.
use cases of yfinance MCP Server?
- Fetching the current price of Bitcoin or Apple stocks.
- Getting the latest news articles about a specific cryptocurrency.
- Integrating with other applications to provide financial data.
FAQ from yfinance MCP Server?
- Can I get prices for any stock or cryptocurrency?
Yes! You can get prices for a wide range of stocks and cryptocurrencies by using their ticker symbols.
- Is there a limit to the number of news articles I can retrieve?
By default, the server retrieves up to 5 articles, but you can specify a different count in your request.
- How do I run the server using Docker?
You can build and run the Docker container using the provided commands in the documentation.
yfinance MCP Server
Model Context Protocol server that allows LLMs to get accurate and up-to-date prices and news about stock/cryptocurrencies tickers.
Available Tools
get_price_tool
: Get the price of a stock/cryptocurrency ticker- Arguments:
ticker
(string): Required - Ticker name or alias (e.g., "BTC-USD", "AAPL")period
(string): Optional - Time period (e.g., "1d", "5d", "1mo"). Defaults to "1d"
- Arguments:
get_news_tool
: Get the news of a stock/cryptocurrency ticker.- Required arguments:
ticker
(string): Requiredcount
(string): Optional - Number of articles to retrieve (default: 5)
- Required arguments:
Installation
Installing via Smithery
To install yfinance-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Otman404/finance-mcp-server --client claude
Using uv
Install the package locally
uv pip install -e .
Run the server
finance-mcp-server
Using docker
# build the container
docker build -t finance-server .
# run the container
docker run -it finance-server
Configuration
Usage for Claude Desktop
Add the following to claude_desktop_config.json
uvx
"mcpServers": {
"finance": {
"command": "uvx",
"args": ["finance-mcp-server"]
}
}
docker
{
"mcpServers": {
"finance": {
"command": "docker",
"args": ["run", "-i", "--rm", "finance-server"]
}
}
}
5ire
Usage foruvx
{
"key": "finance",
"command": "uvx",
"args": ["finance-mcp-server"]
}
docker
{
"key": "finance-server",
"command": "docker",
"args": ["run", "-i", "--rm", "finance-server"]
}