yahoo-finance-mcp
Provides access to Yahoo Finance data including real-time stock quotes, historical prices, financial statements, company info, symbol search, and news.
README
Yahoo Finance MCP Server
A Model Context Protocol (MCP) server that provides access to Yahoo Finance data including stock quotes, historical prices, financial statements, company information, symbol search, and news.
Installation
Claude Code
claude mcp add yfinance-mcp -- npx yfinance-mcp
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"yfinance-mcp": {
"command": "npx",
"args": ["yfinance-mcp"]
}
}
}
Available Tools
get_quote
Get real-time stock quote data including price, change, volume, and key metrics.
Parameters:
symbol(string, required): Stock ticker symbol (e.g., "AAPL", "GOOGL")
Example response:
{
"symbol": "AAPL",
"name": "Apple Inc.",
"price": 273.08,
"change": -0.68,
"changePercent": -0.25,
"volume": 20667651,
"marketCap": 4052613332992,
"peRatio": 36.56
}
get_historical
Get historical OHLCV (Open, High, Low, Close, Volume) price data.
Parameters:
symbol(string, required): Stock ticker symbolperiod(string, optional): Time period - "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "max" (default: "1mo")interval(string, optional): Data interval - "1d", "1wk", "1mo" (default: "1d")
get_financials
Get company financial statements (income statement, balance sheet, or cash flow).
Parameters:
symbol(string, required): Stock ticker symbolstatement(string, required): Type of statement - "income", "balance", "cashflow"quarterly(boolean, optional): Get quarterly data instead of annual (default: false)
get_company_info
Get company profile including sector, industry, description, and key statistics.
Parameters:
symbol(string, required): Stock ticker symbol
search_symbols
Search for stock symbols by company name or keywords.
Parameters:
query(string, required): Search query (company name or keywords)
get_news
Get latest news for a stock symbol.
Parameters:
symbol(string, required): Stock ticker symbol
Development
Run in development mode
pnpm dev
Run tests
pnpm test # Run tests in watch mode
pnpm test -- --run # Run tests once
Run tests with coverage
pnpm test:coverage
Lint and format
pnpm lint # Check for linting errors
pnpm lint:fix # Fix linting errors
pnpm format # Format code with Prettier
Build
pnpm build
Tech Stack
- TypeScript
- MCP SDK (
@modelcontextprotocol/sdk) - yahoo-finance2
- Zod for input validation
- Vitest for testing
- ESLint + Prettier for code quality
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.