{"id":26896380,"url":"https://github.com/narumiruna/yfinance-mcp","last_synced_at":"2026-05-01T13:33:17.016Z","repository":{"id":285220661,"uuid":"957440248","full_name":"narumiruna/yfinance-mcp","owner":"narumiruna","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-25T17:25:58.000Z","size":1456,"stargazers_count":125,"open_issues_count":0,"forks_count":42,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-25T18:30:40.334Z","etag":null,"topics":["finance","mcp","mcp-server","python","yahoo-finance"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/narumiruna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-03-30T11:35:19.000Z","updated_at":"2026-04-25T17:26:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"be7d7696-2cc9-441a-ae66-24589a4dd14f","html_url":"https://github.com/narumiruna/yfinance-mcp","commit_stats":null,"previous_names":["narumiruna/yfinance-mcp"],"tags_count":36,"template":false,"template_full_name":"narumiruna/mcp-server-template","purl":"pkg:github/narumiruna/yfinance-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narumiruna%2Fyfinance-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narumiruna%2Fyfinance-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narumiruna%2Fyfinance-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narumiruna%2Fyfinance-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narumiruna","download_url":"https://codeload.github.com/narumiruna/yfinance-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narumiruna%2Fyfinance-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","mcp","mcp-server","python","yahoo-finance"],"created_at":"2025-04-01T03:43:58.795Z","updated_at":"2026-05-01T13:33:16.991Z","avatar_url":"https://github.com/narumiruna.png","language":"Python","funding_links":[],"categories":["Finance","Finance \u0026 Market Data MCP Servers","サーバー実装","Finance \u0026 Fintech","🤖 AI/ML","Table of Contents","APIs and HTTP Requests","MCP 服务器精选列表","📂 By Category","Server Implementations"],"sub_categories":["Stock Data \u0026 Analytics","💰 \u003ca name=\"finance--fintech\"\u003e\u003c/a\u003e金融・フィンテック","How to Submit","Finance","💰 金融与加密货币","💰 Finance \u0026 Fintech","💰 \u003ca name=\"finance--fintech\"\u003e\u003c/a\u003eFinance \u0026 Fintech"],"readme":"# Yahoo Finance MCP Server\n\n[![PyPI version](https://img.shields.io/pypi/v/yfmcp)](https://pypi.org/project/yfmcp/)\n[![Python](https://img.shields.io/pypi/pyversions/yfmcp.svg)](https://pypi.org/project/yfmcp/)\n[![CI](https://github.com/narumiruna/yfinance-mcp/actions/workflows/python.yml/badge.svg)](https://github.com/narumiruna/yfinance-mcp/actions/workflows/python.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides AI assistants with access to Yahoo Finance data via [yfinance](https://github.com/ranaroussi/yfinance). Query stock information, financial news, sector rankings, and generate professional financial charts — all from your AI chat.\n\n\u003ca href=\"https://glama.ai/mcp/servers/@narumiruna/yfinance-mcp\"\u003e\n  \u003cimg width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@narumiruna/yfinance-mcp/badge\" /\u003e\n\u003c/a\u003e\n\n## Features\n\n- **Stock Data** — Company info, financials, valuation metrics, dividends, and trading data\n- **Financial Statements** — Income statement and balance sheet with historical data (EBIT, Invested Capital, etc.)\n- **Financial News** — Recent news articles and press releases for any ticker\n- **Search** — Find stocks, ETFs, and news across Yahoo Finance\n- **Sector Rankings** — Top ETFs, mutual funds, companies, growth leaders, and top performers by sector\n- **Price History** — Historical OHLCV data as markdown tables or professional charts\n- **Chart Generation** — Candlestick, VWAP, and volume profile charts returned as WebP images\n- **Options Data** — Option chains with calls, puts, strike prices, IV, and expiration dates\n\n## Tools\n\n### `yfinance_get_ticker_info`\n\nRetrieve comprehensive stock data including company info, financials, trading metrics, and governance data.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `symbol` | string | Yes | Stock ticker symbol (e.g. `AAPL`, `GOOGL`, `MSFT`) |\n\n**Returns:** JSON object with company details, price data, valuation metrics, trading info, dividends, financials, and performance indicators.\n\n### `yfinance_get_ticker_news`\n\nFetch recent news articles and press releases for a specific stock.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `symbol` | string | Yes | Stock ticker symbol |\n\n**Returns:** JSON array of news items with title, summary, publication date, provider, URL, and thumbnail.\n\n### `yfinance_search`\n\nSearch Yahoo Finance for stocks, ETFs, and news articles.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | string | Yes | Search query — company name, ticker symbol, or keywords |\n| `search_type` | string | Yes | `\"all\"` (quotes + news), `\"quotes\"` (stocks/ETFs only), or `\"news\"` (articles only) |\n\n**Returns:** Matching quotes and/or news results depending on `search_type`.\n\n### `yfinance_get_top`\n\nGet top-ranked financial entities within a market sector.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `sector` | string | Yes | Market sector (see [supported sectors](#supported-sectors) below) |\n| `top_type` | string | Yes | `\"top_etfs\"`, `\"top_mutual_funds\"`, `\"top_companies\"`, `\"top_growth_companies\"`, or `\"top_performing_companies\"` |\n| `top_n` | number | No | Number of results to return (default: `10`, max: `100`) |\n\n**Returns:** JSON array of top entities with relevant metrics.\n\n#### Supported Sectors\n\n`Basic Materials`, `Communication Services`, `Consumer Cyclical`, `Consumer Defensive`, `Energy`, `Financial Services`, `Healthcare`, `Industrials`, `Real Estate`, `Technology`, `Utilities`\n\n### `yfinance_get_price_history`\n\nFetch historical price data and optionally generate technical analysis charts.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `symbol` | string | Yes | Stock ticker symbol |\n| `period` | string | No | Time range — `1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max` (default: `1mo`) |\n| `interval` | string | No | Data granularity — `1m`, `2m`, `5m`, `15m`, `30m`, `60m`, `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo`, `3mo` (default: `1d`) |\n| `chart_type` | string | No | Chart to generate (omit for tabular data) |\n\n**Chart types:**\n\n| Value | Description |\n|-------|-------------|\n| `\"price_volume\"` | Candlestick chart with volume bars |\n| `\"vwap\"` | Price chart with Volume Weighted Average Price overlay |\n| `\"volume_profile\"` | Candlestick chart with volume distribution by price level |\n\n**Returns:**\n- Without `chart_type`: Markdown table with Date, Open, High, Low, Close, Volume, Dividends, and Stock Splits columns.\n- With `chart_type`: Base64-encoded WebP image for efficient token usage.\n\n### `yfinance_get_financials`\n\nFetch financial statements (income statement, balance sheet, and cash flow) with historical data.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `symbol` | string | Yes | Stock ticker symbol |\n| `frequency` | string | No | `\"annual\"` (yearly), `\"quarterly\"` (quarterly), or `\"ttm\"` (trailing twelve months). Default: `\"annual\"` |\n\n**Returns:** JSON object with income statement, balance sheet, and cash flow data for each reporting period.\n\n- **Income Statement fields**: EBIT, Net Income, Tax Provision, Pretax Income, Interest Expense, Total Revenue, Operating Income, EBITDA, Normalized Income\n- **Balance Sheet fields**: Stockholders Equity, Total Debt, Cash And Cash Equivalents, Invested Capital, Net Debt, Total Assets, Total Liabilities Net Minority Interest, Net Tangible Assets, Tangible Book Value\n- **Cash Flow fields**: Operating Cash Flow, Free Cash Flow, Capital Expenditure, Net Income From Continuing Operations, Depreciation And Amortization, Change In Working Capital, Cash Dividends Paid\n\n### `yfinance_get_option_dates`\n\nFetch available option expiration dates for a stock.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `symbol` | string | Yes | Stock ticker symbol (e.g. `AAPL`, `MSFT`) |\n\n**Returns:** JSON array of expiration dates in YYYY-MM-DD format.\n\n### `yfinance_get_option_chain`\n\nFetch option chain data (calls and puts) for a stock with available strike prices.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `symbol` | string | Yes | Stock ticker symbol |\n| `expiration_date` | string | No | Option expiration date in YYYY-MM-DD format. Omit to fetch all dates. |\n| `option_type` | string | No | `\"calls\"`, `\"puts\"`, or `\"all\"` (default: `\"all\"`) |\n\n**Returns:** JSON object keyed by expiration date, with calls and/or puts data including:\n- `contractSymbol`: Option contract identifier\n- `strike`: Strike price\n- `lastPrice`: Last traded price\n- `bid`/`ask`: Bid and ask prices\n- `volume`: Trading volume\n- `openInterest`: Open interest\n- `impliedVolatility`: IV\n- `inTheMoney`: Whether option is ITM\n- `contractSize`: Contract size (REGULAR)\n- `currency`: Currency (USD)\n\n## Usage\n\n### Via uv (recommended)\n\n1. [Install uv](https://docs.astral.sh/uv/getting-started/installation/)\n2. Add the following to your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"yfmcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"yfmcp@latest\"]\n    }\n  }\n}\n```\n\n### Via Docker\n\n```json\n{\n  \"mcpServers\": {\n    \"yfmcp\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"narumi/yfinance-mcp\"]\n    }\n  }\n}\n```\n\n### From Source\n\n1. Clone the repository and install dependencies:\n\n```bash\ngit clone https://github.com/narumiruna/yfinance-mcp.git\ncd yfinance-mcp\nuv sync\n```\n\n2. Add the following to your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"yfmcp\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"run\",\n        \"--directory\",\n        \"/path/to/yfinance-mcp\",\n        \"yfmcp\"\n      ]\n    }\n  }\n}\n```\n\nReplace `/path/to/yfinance-mcp` with the actual path to your cloned repository.\n\n## Development\n\n### Prerequisites\n\n- Python ≥ 3.12\n- [uv](https://docs.astral.sh/uv/) package manager\n\n### Setup\n\n```bash\nuv sync --extra dev\n```\n\n### Lint \u0026 Format\n\n```bash\nuv run ruff check .\nuv run ruff format .\n```\n\n### Type Check\n\n```bash\nuv run ty check src tests\n```\n\n### Test\n\n```bash\nuv run pytest -v -s --cov=src tests\n```\n\n## Demo Chatbot\n\nSee the demo chatbot in its dedicated repository: [yfinance-mcp-demo](https://github.com/narumiruna/yfinance-mcp-demo)\n\n## Contributors\n\n\u003ca href=\"https://github.com/narumiruna/yfinance-mcp/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=narumiruna/yfinance-mcp\" /\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarumiruna%2Fyfinance-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarumiruna%2Fyfinance-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarumiruna%2Fyfinance-mcp/lists"}