Yahoo Finance MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Yahoo Finance MCP Serverget the latest stock info for AAPL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Yahoo Finance MCP Server
๐ A Model Context Protocol (MCP) server that lets your AI interact with Yahoo Finance - get comprehensive stock market data, news, financials, and more.
โจ Features
๐ Stock Data - Get comprehensive ticker information including company details, financials, and trading metrics
๐ฐ News Feed - Fetch recent news articles related to specific stock symbols
๐ Search - Find stocks, ETFs, and other financial instruments with news results
๐ Top Entities - Get top performing companies, ETFs, and mutual funds by sector
๐ Price History - Fetch historical price data with customizable periods and intervals
โก Options Chain - Get option chain data for stocks including calls and puts
๐ฐ Earnings - Access earnings data including upcoming earnings dates
๐ Proxy Support - Works with HTTP/HTTPS/SOCKS proxies
๐ Fast & Async - Non-blocking operations using asyncio
๐ง Easy Integration - Standard MCP protocol for AI assistants
Related MCP server: MCP YFinance Stock Server
๐ Quick Start
Prerequisites
Python 3.11 or higher
pip or uvx package manager
(Optional) Proxy server for better reliability
Installation
Using uvx (Recommended)
# Install with namespace
uvx yahoo-finance-serverUsing pip
pip install yahoo-finance-serverFrom source
git clone https://github.com/AgentX-ai/AgentX-mcp-servers.git
cd AgentX-mcp-servers/yahoo_finance_server
pip install -e .Configuration
Proxy Setup (Recommended)
For better reliability and to avoid rate limiting, set up a proxy:
# HTTP/HTTPS proxy
export PROXY_URL="http://proxy.example.com:8080"
# SOCKS proxy with auth
export PROXY_URL="socks5://user:pass@127.0.0.1:1080/"Running the Server
# Basic run (stdio transport)
yahoo-finance-server
# Run with proxy
PROXY_URL="http://127.0.0.1:7890" yahoo-finance-server
# Run with HTTP transport
yahoo-finance-server --transport http --host localhost --port 3000
# Run with HTTP transport and proxy
PROXY_URL="http://127.0.0.1:7890" yahoo-finance-server --transport http --host 0.0.0.0 --port 8080Transport Options
Stdio Transport (Default)
Best for development and AI assistant integration
Communication via stdin/stdout pipes
Usage:
yahoo-finance-serveroryahoo-finance-server --transport stdio
HTTP Transport
StreamableHttp transport (replaces deprecated SSE)
Allows web-based connections and remote access
Usage:
yahoo-finance-server --transport http --host localhost --port 3000Inspector URL:
http://localhost:3000
๐ ๏ธ API Reference
Available Tools
1. get-ticker-info
Get comprehensive stock information including company details, financials, and trading metrics.
{
"name": "get-ticker-info",
"arguments": {
"symbol": "AAPL"
}
}2. get-ticker-news
Get recent news articles for a stock symbol.
{
"name": "get-ticker-news",
"arguments": {
"symbol": "AAPL",
"count": 10
}
}3. search
Search for stocks, ETFs, and other financial instruments with related news.
{
"name": "search",
"arguments": {
"query": "Apple Inc",
"count": 10
}
}4. get-top-entities
Get top performing entities in a sector.
{
"name": "get-top-entities",
"arguments": {
"entity_type": "companies", // Options: "etfs", "mutual_funds", "companies", "growth_companies", "performing_companies"
"sector": "technology", // See supported sectors below
"count": 10
}
}Supported sectors:
basic-materials
communication-services
consumer-cyclical
consumer-defensive
energy
financial-services
healthcare
industrials
real-estate
technology
utilities
5. get-price-history
Get historical price data with customizable periods and intervals.
{
"name": "get-price-history",
"arguments": {
"symbol": "AAPL",
"period": "1y", // Options: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max
"interval": "1d" // Options: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo
}
}6. ticker-option-chain
Get option chain data for stocks.
{
"name": "ticker-option-chain",
"arguments": {
"symbol": "AAPL",
"option_type": "call", // Options: "call", "put", "both"
"date": "2024-01-19" // Optional: YYYY-MM-DD format
}
}7. ticker-earning
Get earnings data including historical and upcoming earnings.
{
"name": "ticker-earning",
"arguments": {
"symbol": "AAPL",
"period": "annual", // Options: "annual", "quarterly"
"date": "2023-12-31" // Optional: YYYY-MM-DD format
}
}๐งช Testing
Using MCP Inspector
With Stdio Transport (Default)
npx @modelcontextprotocol/inspector yahoo-finance-serverWith HTTP Transport
# Terminal 1: Start server with HTTP transport
yahoo-finance-server --transport http --host localhost --port 3000
# Terminal 2: Connect inspector to HTTP server
npx @modelcontextprotocol/inspector http://localhost:3000Manual Testing
python -c "
import asyncio
from yahoo_finance_server.helper import get_ticker_info
async def test():
info = await get_ticker_info('AAPL')
print(f'โ
Stock: {info[\"longName\"]}')
asyncio.run(test())
"๐ Requirements
Python 3.11+
yfinance==0.2.62
requests>=2.31.0
pandas>=2.0.0
mcp>=1.9.3
๐ค Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
๐ License
MIT License - see LICENSE file for details.
๐ Links
Homepage: GitHub Repository
Issues: Report Issues
MCP Documentation: Model Context Protocol
Made with โค๏ธ for the finance community
This server cannot be deployed
Maintenance
Related MCP Connectors
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Your agent needs markets โ prices and fundamentals for listed companies, the filings behind them, crypto, and what the prediction markets put the odds at. **What you can ask for** โข "Pull this company's income statement, cash flow and balance sheet for the last 8 quarters." โข "What did insiders buy or sell, and when?" โข "Snapshot prices for these 50 tickers, then the OHLC history for the three that moved." โข "What are the current odds on this event across Kalshi and Polymarket?" โข "Screen for companies matching these financial criteria." **How to use it** Point any MCP client at https://mcp.aisa.one/finance/mcp and sign in with OAuth โ there is no key to create or paste. 49 tools: prices and snapshots, income statements, balance sheets and cash flows, metrics and ratios, earnings and analyst estimates, filings and line-item search, insider trades, macro interest rates, news, a screener; CoinGecko spot prices, market tables, OHLC, per-venue tickers and trending; Kalshi and Polymarket markets and trades; plus EDINET filings for Japan. **Why this rather than the source** Equities, crypto and event markets behind one account, so a cross-asset question is one conversation. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Read the number here, then ask the same agent what X is saying about the ticker today โ without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/marketpulse/mcp ยท /crypto-market-data/mcp ยท /prediction-market-data/mcp ยท /stock-pulse/mcp for one slice each.
Your agent needs company financials it can compute on โ statements, ratios, earnings, estimates, filings and insider activity as structured data, not a PDF. **What you can ask for** โข "Give me 8 quarters of income statement, balance sheet and cash flow for this ticker." โข "What do analysts estimate for next quarter, and how did the last four surprise?" โข "Find this exact line item across every filing." โข "Who bought or sold as an insider in the last 90 days?" โข "Screen for profitable companies under this valuation with growing revenue." **How to use it** Point any MCP client at https://mcp.aisa.one/marketpulse/mcp and sign in with OAuth โ there is no key to create or paste. 21 tools: prices and snapshots, income statements, balance sheets, cash-flow statements, financial metrics and snapshots, earnings, analyst estimates, company facts, filings and filing items, line-item search, a screener, insider trades, macro interest rates, news, plus EDINET documents and filing digests for Japanese issuers. **Why this rather than the source** Statements as fields you can compute on, and a screener in the same place. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Read the fundamentals here, then ask the same agent what social is saying about the ticker โ without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/finance/mcp for equities, crypto and prediction markets in one place.
Your agent needs the two halves of a move at once โ what people are posting about a ticker right now, and what the price and the news actually did. **What you can ask for** โข "What is X saying about $NVDA today, and what did the stock do?" โข "Show the chatter and the price move for these five tickers side by side." โข "Which tickers are being talked about most right now?" โข "Pull the news and the snapshot behind this spike." **How to use it** Point any MCP client at https://mcp.aisa.one/stock-pulse/mcp and sign in with OAuth โ there is no key to create or paste. 4 tools: a combined stock-pulse call that joins X/Twitter chatter to the tickers mentioned, plus advanced tweet search, price snapshots and financial news. **Why this rather than the source** One call instead of four, with the join already done. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Spot the move here, then ask the same agent for the filings or the fundamentals behind it โ without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/finance/mcp for equities, crypto and prediction markets in one place.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access real-time financial data, historical stock prices, company information, financial statements, options data, market news, and analyst recommendations through Yahoo Finance. Built with FastMCP v2 for efficient HTTP streaming and comprehensive market analysis tools.3-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to retrieve real-time stock data, manage watchlists, and perform comprehensive technical analysis using Yahoo Finance API. Provides 18+ tools for stock price tracking, trend analysis, volatility assessment, and financial indicators through MCP integration.MIT
- FlicenseAqualityDmaintenanceProvides financial data from Yahoo Finance via MCP, enabling AI agents to access real-time stock info, historical prices, financial statements, and market analysis.1014-
- AlicenseAqualityDmaintenanceEnables querying stock data, financial information, news, and historical prices from Yahoo Finance through a set of MCP tools.5MIT