YFinance Trader

v1.0.0Finance & Fintechstable

An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop.

yfinance-trader-mcp-toolmcpai-integration
Share:
33
Stars
0
Downloads
0
Weekly
0/5

What is YFinance Trader?

YFinance Trader is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp (model context protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for claude desktop.

An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop.

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP (Model Context Protocol) tool that provides stock mar

Use Cases

Analyze stock market data through Claude Desktop using yfinance library integration.
Access trading and market analysis capabilities via conversational AI interface.
SaintDoresh

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx yfinance-trader-mcp-tool

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use YFinance Trader

YFinance Trader MCP Tool is a Python-based MCP server that wraps the yfinance library to give Claude Desktop (and other MCP clients) real-time and historical stock market data capabilities. It exposes tools for fetching live quotes, company overviews, daily historical OHLCV data, analyst recommendations, insider transactions, and symbol searches — including cryptocurrency tickers like BTC-USD. Investors and analysts who want to ask their AI assistant about stock prices, compare companies, or pull historical price series without leaving their chat interface will find this a lightweight, no-API-key-required bridge to Yahoo Finance data.

Prerequisites

  • Python 3.10 or later installed and available in your PATH
  • pip for installing Python dependencies
  • Claude Desktop (the primary supported MCP client for this tool)
  • The yfinance-trader repository cloned to your local machine
1

Clone the repository

Download the YFinance Trader MCP Tool source code to your local machine.

git clone https://github.com/SaintDoresh/YFinance-Trader-MCP-ClaudeDesktop.git
cd YFinance-Trader-MCP-ClaudeDesktop
2

Install Python dependencies

Install the required Python packages including yfinance and the MCP SDK.

pip install -r requirements.txt
3

Note the absolute path to main.py

You will need the absolute path to main.py when configuring Claude Desktop. Run the following command to get it.

# On macOS/Linux
pwd
# Then append /main.py to the output

# On Windows (PowerShell)
(Get-Item .\main.py).FullName
4

Add the server to Claude Desktop configuration

Open claude_desktop_config.json (on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json) and add the yfinance-trader server block, using the absolute path to main.py and your Python executable.

{
  "mcpServers": {
    "yfinance-trader": {
      "command": "python3",
      "args": ["/absolute/path/to/YFinance-Trader-MCP-ClaudeDesktop/main.py"]
    }
  }
}
5

Restart Claude Desktop

Close Claude Desktop completely and reopen it so it picks up the new MCP server configuration. The yfinance-trader server will start automatically on launch.

YFinance Trader Examples

Client configuration (Claude Desktop)

Add this block to claude_desktop_config.json on macOS at ~/Library/Application Support/Claude/claude_desktop_config.json, replacing the path with the real absolute path on your system.

{
  "mcpServers": {
    "yfinance-trader": {
      "command": "python3",
      "args": ["/Users/yourname/YFinance-Trader-MCP-ClaudeDesktop/main.py"]
    }
  }
}

Prompts to try

Once connected, use these prompts in Claude Desktop to query live and historical market data.

- "What is the current stock price and daily change for AAPL?"
- "Give me a company overview for Microsoft (MSFT) including P/E ratio and dividend yield."
- "Show me Tesla's historical price data for the last 3 months."
- "What are the analyst buy/hold/sell recommendations for Amazon (AMZN)?"
- "Search for the ticker symbol for Nvidia."
- "What is the current price of Bitcoin? Use the ticker BTC-USD."
- "Show me recent insider transactions for Meta (META)."

Troubleshooting YFinance Trader

Claude Desktop shows the server as failed to start

Verify that the path in the args array is the absolute path to main.py (not a relative path). Also confirm that the 'python3' command works in your terminal and points to Python 3.10+. On Windows, you may need to use 'python' instead of 'python3', or provide the full path to the Python executable.

ModuleNotFoundError for yfinance or other packages

Run 'pip install -r requirements.txt' again from the cloned project directory. If you have multiple Python environments, ensure you install dependencies in the same environment that the 'python3' command in your config points to. Consider using a virtual environment and pointing to its Python binary.

Stock data returns empty or stale results

yfinance pulls data from Yahoo Finance, which may rate-limit requests or return empty data for some tickers during off-market hours. Try a major ticker like AAPL first to verify the integration is working. Cryptocurrency tickers require the -USD suffix format (e.g., BTC-USD, ETH-USD).

Frequently Asked Questions about YFinance Trader

What is YFinance Trader?

YFinance Trader is a Model Context Protocol (MCP) server that mcp (model context protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for claude desktop. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install YFinance Trader?

Follow the installation instructions on the YFinance Trader GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with YFinance Trader?

YFinance Trader works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is YFinance Trader free to use?

Yes, YFinance Trader is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "yfinance-trader-mcp-tool": { "command": "npx", "args": ["-y", "yfinance-trader-mcp-tool"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use YFinance Trader?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides