CY

citizenhicks/yahoo-finance-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4 stars 7 forks 质量 54 趋势 12

this is deployed on FastMCP

概览

A Model Context Protocol (MCP) server that provides Yahoo Finance data through FastMCP v2 with HTTP streaming support. This server enables AI assistants to access real-time financial data, historical prices, company information, and market analysis tools. The server is primarily built for ThinkingSand AI agents, but can be deployed locally as well. - : Current prices, historical data, and company information - : Income statements, balance sheets, and cash flow data - : Option chains, expiration dates, and pricing data - : Latest financial news and analysis - : Holder information and insider transactions - : Recommendations and upgrades/downgrades - : Fast, efficient data delivery with FastMCP v2 - Python 3.11 or higher - uv package manager Create a .env file (copy from .env.example): The server will start on http://127.0.0.1:8000 by default and display: - : Stock symbol (e.g.

README

以下为原文 README 节选,完整内容请查看原文。

Yahoo Finance MCP Server

A Model Context Protocol (MCP) server that provides Yahoo Finance data through FastMCP v2 with HTTP streaming support. This server enables AI assistants to access real-time financial data, historical prices, company information, and market analysis tools. The server is primarily built for ThinkingSand AI agents, but can be deployed locally as well.

Features

  • Real-time Stock Data: Current prices, historical data, and company information
  • Financial Statements: Income statements, balance sheets, and cash flow data
  • Options Trading: Option chains, expiration dates, and pricing data
  • Market News: Latest financial news and analysis
  • Institutional Data: Holder information and insider transactions
  • Analyst Coverage: Recommendations and upgrades/downgrades
  • HTTP Streaming: Fast, efficient data delivery with FastMCP v2

Available Tools

Tool Description Parameters
get_historical_stock_prices Historical stock price data ticker, period, interval
get_stock_info Comprehensive company and stock information ticker
get_yahoo_finance_news Latest news articles for a stock ticker
get_stock_actions Dividend and stock split history ticker
get_financial_statement Financial statements (income, balance, cashflow) ticker, financial_type
get_holder_info Institutional and insider holder data ticker, holder_type
get_option_expiration_dates Available options expiration dates ticker
get_option_chain Option chain data for calls and puts ticker, expiration_date, option_type
get_recommendations Analyst recommendations and upgrades ticker, recommendation_type, months_back

Installation & Setup

Prerequisites

  • Python 3.11 or higher
  • uv package manager
# Clone the repository
git clone https://github.com/citizenhicks/yahoo-finance-mcp.git
cd yahoo-finance-mcp

# Install dependencies
uv sync

# Run the server
uv run python server.py

Configuration

Environment Variables

Create a .env file (copy from .env.example):

# Server configuration
HOST=127.0.0.1      # Server host
PORT=8000           # Server port
LOG_LEVEL=INFO      # Logging level

Starting the Server

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "yahoo-finance": { "command": "uv", "args": ["run", "python", "/path/to/yahoo-finance-mcp/server.py"], "env": { "HOST": "127.0.0.1", "PORT": "8000" } } } }