MCPSERV.CLUB
9nate-drake

Yfinance MCP Server

MCP Server

Real-time and historical financial data via Yahoo Finance API

Stale(50)
0stars
2views
Updated Apr 29, 2025

About

The Yfinance MCP Server supplies Claude Desktop with stock prices, historical performance, ownership and analyst targets using the yfinance library. It enables conversational financial queries in real time.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

MCP Yfinance Demo

MCP Yfinance is a lightweight Model Context Protocol (MCP) tool that bridges the popular Python library yFinance with AI assistants such as Claude Sonnet. By wrapping yFinance’s data‑retrieval capabilities in an MCP command, the server allows a language model to request real‑time or historical market data without leaving its conversational context. The tool returns a Pandas DataFrame to the MCP host, which can then be consumed by downstream logic or visualized directly in the assistant’s output.

The primary problem this server solves is the friction that developers face when integrating live financial data into AI workflows. Traditional approaches require separate API calls, manual parsing, and handling of rate limits—all of which add latency and complexity. MCP Yfinance abstracts these details behind a single, declarative command (). The AI can simply ask for “Apple’s stock history” and receive structured, tabular data ready for analysis or visualization. This eliminates boilerplate code and lets developers focus on higher‑level business logic.

Key features of the server include:

  • Seamless Data Delivery – Returns a Pandas DataFrame, preserving column metadata (Open, High, Low, Close, Volume, etc.) for immediate use by the host or other tools.
  • Command‑line Extension – Designed to be registered as a command‑line extension in MCP hosts like Goose, making setup straightforward and portable across environments.
  • Time‑bound Operations – Supports configurable timeouts, ensuring that long‑running queries do not stall the AI session.
  • Extensibility – While currently focused on daily price history, the underlying wrapper can be expanded to support additional yFinance endpoints (e.g., quotes, dividends, earnings).

In practice, developers can employ MCP Yfinance in a variety of scenarios: automated portfolio monitoring dashboards that pull the latest prices, conversational agents that answer “What was Tesla’s price on March 1st?”, or research pipelines that aggregate historical data for statistical analysis. Because the tool hands off a structured DataFrame, downstream ML models can ingest the data directly without conversion steps.

Integrating MCP Yfinance into an AI workflow is straightforward. The LLM issues a tool call, the MCP host invokes the Python wrapper, and the resulting DataFrame is passed back into the model’s context. From there, the assistant can generate summaries, plot charts, or trigger additional MCP tools (e.g., a statistical analysis module). This tight coupling reduces round‑trip latency and keeps the user experience fluid.

Overall, MCP Yfinance stands out as a practical, low‑overhead bridge between AI assistants and real‑time financial data. Its simplicity, combined with the power of yFinance’s comprehensive market coverage, makes it an attractive starting point for developers looking to embed stock analytics into conversational agents or automated decision systems.