itjung-source

yahoo-finance-mcp

Community itjung-source
Updated

MCP server for Thai SET/MAI stock data and financials via Yahoo Finance

yahoo-finance-mcp

MCP server for Thai SET/MAI stock data via Yahoo Finance API.

Tools

Tool Description
scan_uptrend_pullback Scan all SET/MAI stocks for 3-day uptrend pullback pattern (price > EMA200 & EMA90, 3 consecutive lower closes, today price ≥ yesterday & volume > yesterday)
get_stock_quote Get current price, EMA200, EMA90, volume, % change for a single stock
get_stock_history Get daily close + volume history for N days with EMA200/EMA90
get_income_statement Quarterly or annual income statement (revenue, gross profit, operating income, net income, EBITDA, EPS)
get_balance_sheet Quarterly or annual balance sheet (assets, liabilities, equity, D/E ratio)
get_cash_flow Quarterly or annual cash flow (operating, investing, financing CF, FCF, capex)
list_stocks List all stocks in local DB (SET/mai)

Requirements

  • Python 3.10+
  • mcp library
  • yfinance library
  • SQLite DB at C:/work/AI/SET/set_stocks.db (symbols from listedCompanies_th.csv)

Install

pip install -r requirements.txt

Claude Desktop / Claude Code Config

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "yahoo-finance": {
      "command": "python",
      "args": ["C:/work/AI/MCP/yahoo-finance-mcp/src/server.py"]
    }
  }
}

Claude Code:

claude mcp add yahoo-finance python "C:/work/AI/MCP/yahoo-finance-mcp/src/server.py"

Data Sources

  • Price / EMA / Volume: Yahoo Finance chart API (query2.finance.yahoo.com/v8/finance/chart)
  • Financials: Yahoo Finance via yfinance library
  • Symbol list: Local SQLite DB (931 symbols, SET + mai)

Notes

  • Thai stocks use .BK suffix on Yahoo Finance (e.g. PTT.BK, AOT.BK)
  • Quarterly financials: up to ~7 quarters history
  • Annual financials: up to ~5 years history
  • EMA is calculated from raw 2-year daily data (not from TradingView)

MCP Server · Populars

MCP Server · New

    WJZ-P

    Douyin Upload MCP Skill

    MCP Server

    Community WJZ-P
    pwno-io

    pwno-mcp

    MCP for Pwn

    Community pwno-io
    antoinebou12

    UML-MCP: Diagram Generation via MCP

    UML-MCP Server is a UML diagram generation tool based on MCP (Model Context Protocol), which can help users generate various types of UML diagrams through natural language description or directly writing PlantUML and Mermaid and Kroki https://uml-mcp.vercel.app/docs

    Community antoinebou12
    JeremyVyska

    BC Code Intelligence MCP Server

    BC Code Intelligence MCP Server - Persona-driven workflow orchestration for Business Central development. Provides 16+ MCP tools, layered knowledge system, and intelligent BC pattern analysis through Model Context Protocol.

    Community JeremyVyska
    noimank

    FNewsCrawler (该项目已放弃维护)

    一个专门为大模型设计的财经信息MCP(Model Context Protocol)服务,通过高效的爬虫技术从各大财经网站(同花顺、东方财富等)获取实时资讯,为AI模型提供准确、及时的财经数据支持。

    Community noimank