Get the FREE Ultimate OpenClaw Setup Guide →

yfinance

MCP server from narumiruna/yfinance-mcp

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio narumiruna-yfinance-mcp uvx yfmcp@latest

How to use

This MCP server exposes Yahoo Finance data and insights through a set of tools built on the yfinance library. The available tools let you fetch detailed ticker information, recent news, perform search queries across Yahoo Finance, retrieve top entities by sector, and obtain historical price data with optional chart visualizations. You can access these tools by calling the corresponding MCP endpoints through your MCP gateway (uv, docker, or local development) using the yfmcp server configuration.

How to install

Prerequisites:

  • Python environment and uv (the MCP runtime) installed on your system.
  • Access to the internet to install python packages via uvx.

Recommended install steps:

  1. Install uv if you haven't:
# On macOS
brew install uv

# On Debian/Ubuntu
pipx install uvx
  1. Install and run the Yahoo Finance MCP server via uv:
# Install the MCP server package (as shown in README usage)
uvx install yfmcp@latest

# Run the server (local development example will vary by setup)
uv run yfmcp
  1. Alternative: Run via Docker
# Pull and run the container directly
docker run -i --rm narumi/yfinance-mcp
  1. Alternative: Local development (via uv) with a local path to the repo
uv run --directory /path/to/yfinance-mcp yfmcp

Notes:

  • Ensure your environment variables for API access (if any) are set as needed. The repository README references demo environment setup for Chainlit; adapt variables to your deployment if you enable the demo tooling.

Additional notes

Tips and notes:

  • The yfinance_get_price_history tool can return either a markdown table of historical data (default) or a base64-encoded WebP image when chart_type is provided. Use chart_type values: price_volume, vwap, or volume_profile.
  • The yfinance_get_ticker_info tool returns company info, financials, trading metrics, and governance data for a given symbol.
  • For large queries (e.g., top entities or extensive price history), consider paging or limiting inputs to avoid long response times.
  • If you encounter network or package resolution issues with uvx, ensure Python and pipx are up to date and that your environment can access PyPI.
  • The Docker deployment uses the narumi/yfinance-mcp image; verify tag compatibility with your uvx-based workflows if mixing runtimes.

Related MCP Servers

Sponsor this space

Reach thousands of developers