yfinance MCP Server logo

yfinance MCP Server

by 9nate-drake

This is a Model Context Protocol server that provides financial data to Claude Desktop using the yfinance (Yahoo Finance API). Most of the code was created by Claude.

View on GitHub

Last updated: N/A

What is yfinance MCP Server?

The yfinance MCP Server is a Model Context Protocol server designed to provide financial data to Anthropic's Claude Desktop application. It leverages the yfinance library to access Yahoo Finance's API, enabling Claude to answer financial queries.

How to use yfinance MCP Server?

  1. Clone the repository. 2. Install the required packages (mcp and yfinance). 3. Configure Claude Desktop by adding the yfinance server details to the claude_desktop_config.json file, specifying the path to the server.py file. 4. Restart Claude Desktop. 5. Look for the yfinance server in the 🔌 menu. 6. Ask financial questions related to stock prices, historical data, ownership, and analyst targets.

Key features of yfinance MCP Server

  • Provides real-time stock prices

  • Accesses historical stock data

  • Retrieves institutional ownership information

  • Fetches analyst price targets

  • Integrates with Claude Desktop via MCP

Use cases of yfinance MCP Server

  • Getting current stock prices for specific tickers

  • Analyzing historical stock performance over a period

  • Checking institutional ownership percentages of companies

  • Finding median price targets for stocks

  • Enabling Claude to answer complex financial questions

FAQ from yfinance MCP Server

What is yfinance?

yfinance is a Python library that allows you to access financial data from Yahoo Finance.

What is MCP?

MCP stands for Model Context Protocol. It's a protocol that allows Claude Desktop to communicate with external servers.

How do I find the path to my server.py file?

The path to your server.py file is the full file path on your computer where you cloned the repository. For example: C:\Users\YourName\mcp-yfinance\server.py

Why isn't the server showing up in Claude Desktop?

Make sure you have correctly configured the claude_desktop_config.json file with the correct path to server.py and that you have restarted Claude Desktop.

What kind of financial data can I access?

You can access a wide range of financial data, including stock prices, historical data, institutional ownership, analyst targets, and more, as provided by Yahoo Finance.