Skip to main content

No project description provided

Project description

Yahoo Finance MCP Server

A simple MCP server for Yahoo Finance using yfinance. This server provides a set of tools to fetch stock data, news, and other financial information.

Tools

  • yfinance_get_ticker_info

    • Retrieve stock data including company info, financials, trading metrics and governance data.
    • Inputs:
      • symbol (string): The stock symbol.
  • yfinance_get_ticker_news

    • Fetches recent news articles related to a specific stock symbol with title, content, and source details.
    • Inputs:
      • symbol (string): The stock symbol.
  • yfinance_search

    • Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles.
    • Inputs:
      • query (string): The search query (ticker symbol or company name).
      • search_type (string): Type of search results to retrieve (options: "all", "quotes", "news").
  • yfinance_get_top

    • Get top entities (ETFs, mutual funds, companies, growth companies, or performing companies) in a sector.
    • Inputs:
      • sector (string): The sector to get.
      • top_type (string): Type of top companies to retrieve (options: "top_etfs", "top_mutual_funds", "top_companies", "top_growth_companies", "top_performing_companies").
      • top_n (number, optional): Number of top entities to retrieve (default 10).
  • yfinance_get_price_history

    • Fetch historical price data for a given stock symbol over a specified period and interval. Can return data as a markdown table or generate professional financial charts using mplfinance, including candlestick charts with volume bars, VWAP overlays, and volume profile analysis.
    • Inputs:
      • symbol (string): The stock symbol.
      • period (string, optional): Time period to retrieve data for (e.g. '1d', '1mo', '1y'). Default is '1mo'.
      • interval (string, optional): Data interval frequency (e.g. '1d', '1h', '1m'). Default is '1d'.
      • chart_type (string, optional): Type of chart to generate. If not specified, returns price data as markdown table. Options:
        • "price_volume": Candlestick chart with volume bars
        • "vwap": Volume Weighted Average Price chart with VWAP overlay
        • "volume_profile": Candlestick chart with volume profile showing volume distribution by price level (displayed as a histogram on the right side)
    • Output:
      • If chart_type is not specified: Returns historical price data as a markdown table
      • If chart_type is specified: Returns a base64-encoded WebP image for efficient token usage

Usage

You can use this MCP server via uv (Python package installer), Docker, or local development.

Via uv

  1. Install uv
  2. Add the following configuration to your MCP server configuration file:
{
  "mcpServers": {
    "yfmcp": {
      "command": "uvx",
      "args": ["yfmcp@latest"]
    }
  }
}

Via Docker

Add the following configuration to your MCP server configuration file:

{
  "mcpServers": {
    "yfmcp": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
    }
  }
}

Local Development

For local development, add the following configuration to your MCP server configuration file:

{
  "mcpServers": {
    "yfmcp": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/yfinance-mcp",
        "yfmcp"
      ]
    }
  }
}

Replace /path/to/yfinance-mcp with the actual path to your local repository.

Demo Chatbot

The demo chatbot has moved to a dedicated repository:

https://github.com/narumiruna/yfinance-mcp-demo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yfmcp-0.8.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file yfmcp-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: yfmcp-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for yfmcp-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86d7e920934a3a24da244868f9f4a4ef24df202107d26fc0d48a4e5f3e9a09ab
MD5 5bc654f28d240e5bd2d46322b6d81a0f
BLAKE2b-256 b2d905409da423e124ea42a256f029467eb69382745db76f1a680e711aa440ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page