MCP cover image
See in Github
2025-04-06

雅虎金融库存数据的非官方MCP服务器。

1

Github Watches

1

Github Forks

0

Github Stars

yfinance-mcp-server

日本語版

Important Note: This is an unofficial MCP server.

A Message Control Protocol (MCP) server for accessing Yahoo Finance data. This server provides a simple interface to retrieve stock market data through yfinance.

Features

  • Get historical stock data with customizable periods and intervals
  • Easy to use with any MCP client
  • Built with TypeScript for type safety and better developer experience

Usage

Example Cursor MCP Client.

{
  "mcpServers": {
    "yfinance": {
      "command": "npx",
      "args": [
        "@onori/yfinance-mcp-server"
      ]
    }
  }
}

getStockHistory

Retrieves historical stock data for a given symbol.

Parameters:

  • symbol (required): The stock symbol (e.g., "AAPL" for Apple Inc.)
  • period (required): Time period to fetch data for (e.g., "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max")
  • interval (optional): Data interval ("1d", "1wk", "1mo")

Example MCP request:

> (Request) 
Please use the `getStockHistory` tool to fetch the daily stock data for AAPL for the past week (`period`='1w', `interval`='1d'). Then, render the results as a markdown table.

> (Response Example)
I'll help you fetch Apple's stock data and format it nicely as a markdown table.
First, I'll call the getStockHistory tool to fetch the data:

Let me format this data into a more readable markdown table:

| Date | Open | High | Low | Close | Volume |
|------|------|------|-----|-------|---------|
| Mar 31, 2025 | $217.01 | $225.62 | $216.23 | $222.13 | 65.30M |
| Apr 1, 2025 | $219.81 | $223.68 | $218.90 | $223.19 | 36.41M |
| Apr 2, 2025 | $221.32 | $225.19 | $221.02 | $223.89 | 35.91M |
| Apr 3, 2025 | $205.54 | $207.49 | $201.25 | $203.19 | 103.42M |
| Apr 4, 2025 | $193.89 | $199.88 | $187.34 | $188.38 | 125.57M |

Some notable observations from this data:
- The stock showed significant volatility over this period
- There was a sharp decline in the last two trading days
- Trading volume increased substantially during the declining days, with the highest volume (125.57M shares) on April 4th
- The stock price range was from a high of $225.62 to a low of $187.34 during this period
Would you like any specific analysis of this data or would you like to see different metrics?

Development

To set up the development environment:

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Start the development server:
npm run dev

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

ISC License (ISC)

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

    Reviews

    2 (1)
    Avatar
    user_deetG1PP
    2025-04-18

    yfinance-mcp-server by onori is an exceptional tool for financial data enthusiasts and developers. Its seamless integration and user-friendly interface make accessing Yahoo Finance data incredibly easy. Highly recommend for anyone in need of reliable finance data extraction! Check it out on GitHub!