yahoo-finance-mcp
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-mcpGet the latest stock quote 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 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-mcpClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"yfinance-mcp": {
"command": "npx",
"args": ["yfinance-mcp"]
}
}
}Related MCP server: Stock Data MCP Server
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 devRun tests
pnpm test # Run tests in watch mode
pnpm test -- --run # Run tests onceRun tests with coverage
pnpm test:coverageLint and format
pnpm lint # Check for linting errors
pnpm lint:fix # Fix linting errors
pnpm format # Format code with PrettierBuild
pnpm buildTech Stack
TypeScript
MCP SDK (
@modelcontextprotocol/sdk)yahoo-finance2
Zod for input validation
Vitest for testing
ESLint + Prettier for code quality
License
MIT
Available Tools
6 toolsget_company_infoC
Get company profile including sector, industry, description, and key statistics
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must bear the full disclosure burden. It only states 'Get company profile,' implying a read operation, but provides no details on rate limits, authentication, data freshness, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the core purpose. While concise, it could be more structured with additional context, but no information is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of an output schema, the description provides a reasonable sense of the return data (sector, industry, description, key statistics). However, it omits details on error conditions and edge cases, making it minimally adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (one required parameter 'symbol'), so the baseline is 3. The description adds value by listing output fields, which aids in understanding the return value but does not elaborate on parameter meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a company profile and lists included fields (sector, industry, description, key statistics), indicating a specific verb and resource. It is distinct from siblings like get_financials and get_quote, though not explicitly differentiated beyond the tool names.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. There is no mention of context, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_financialsA
Get company financial statements (income statement, balance sheet, or cash flow)
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol | |
| statement | Yes | Type of financial statement | |
| quarterly | No | Get quarterly data instead of annual |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states 'Get', implying a read operation, but does not disclose whether it's read-only, return format, rate limits, authentication needs, or data freshness. Minimal behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear, front-loaded sentence with no extraneous information. Every word is necessary.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters and no output schema or annotations, the description is minimally adequate. It explains what the tool does but lacks details on return format, pagination, or data coverage, which are important for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all three parameters. The description adds no extra meaning beyond what the schema provides; it merely lists the statement types which are already in the enum. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: retrieving financial statements (income, balance, cash flow). It uses a specific verb 'get' and specifies the resource. It distinguishes from siblings like get_company_info (general info) and get_historical (price data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: when financial statements are needed. However, there is no explicit guidance on when to use this tool over siblings, no when-not-to-use instructions, and no prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_historicalB
Get historical OHLCV (Open, High, Low, Close, Volume) price data
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol (e.g., AAPL, GOOGL) | |
| period | No | Time period for historical data | 1mo |
| interval | No | Data interval | 1d |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description bears full burden. It only states data type (OHLCV) but lacks details on data freshness, pagination, or any caveats. The description is minimal and does not go beyond the obvious.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with key purpose. No unnecessary words. Could include more behavioral context without being wasteful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with three parameters and no output schema, the description is minimally adequate. It provides the core function but lacks return value description or any additional context that would aid an agent in using the results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with all parameters well-described in the schema. The description adds no additional parameter meaning beyond what the schema already provides, so it meets the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it retrieves historical OHLCV price data, with specific verb and resource. It distinguishes from siblings like get_quote and get_financials which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use or alternatives. While the purpose implies use for historical price data, there is no mention of when not to use or which sibling tool to use for other data types.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_newsC
Get latest news for a stock symbol
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only says 'Get latest news'. It fails to disclose behavioral traits such as what constitutes 'latest', rate limits, authentication needs, or whether it returns multiple articles. The description carries the full burden but falls short.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise at one sentence, but it lacks structure. It states the purpose without any additional details, which is acceptable but not exemplary.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has one parameter, no output schema, and multiple siblings, the description is incomplete. It does not mention the return format, pagination, or what 'latest' means, leaving significant gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter described as 'Stock ticker symbol'. The tool description adds no extra meaning beyond the schema, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get latest news for a stock symbol' clearly states the verb and resource, but does not differentiate from sibling tools like get_company_info or get_quote, which also operate on a stock symbol.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of conditions, prerequisites, or scenarios where this tool is preferred over siblings like get_financials or search_symbols.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_quoteB
Get real-time stock quote data including price, change, volume, and key metrics
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol (e.g., AAPL, GOOGL, MSFT) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; the description itself implies a read operation (real-time data) but does not explicitly state read-only nature, rate limits, or data freshness guarantees. For a simple query tool, this is minimally acceptable but could be more explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, front-loaded sentence that conveys purpose and returned fields without any filler. Every word contributes value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description adequately mentions the key data points returned (price, change, volume, key metrics) and real-time nature. Slightly missing details like data source or error behavior, but sufficient given low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers the single 'symbol' parameter with clear description, achieving 100% schema description coverage. The description adds no extra parameter semantics, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves real-time stock quote data with specific fields (price, change, volume, key metrics). It distinguishes itself from siblings like get_historical (historical data) and get_company_info (company details) by focusing on real-time quotes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidelines on when to use this tool versus alternatives like get_historical for past data or search_symbols for symbol lookup. The description does not advise on prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_symbolsC
Search for stock symbols by company name or keywords
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query (company name or keywords) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavior. It only states it is a search, but does not mention if data is read-only, rate limits, pagination, or result characteristics. The description is insufficient for understanding operational traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that immediately conveys the tool's purpose. Every word is necessary and there is no redundancy. It is optimally structured for quick parsing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with one parameter and no output schema, the description should indicate what is returned (e.g., list of symbols, company names) and any default behavior. Lacking this, the description is incomplete and leaves critical questions unanswered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds little beyond the input schema. The schema already describes the 'query' parameter as 'Search query (company name or keywords)'. The tool description essentially repeats that. With 100% schema coverage, the baseline is 3, and the description does not provide extra semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('search') and resource ('stock symbols') with criteria ('by company name or keywords'). It differentiates from sibling tools like get_company_info which provide data on a specific symbol. However, it does not specify the exact output format or whether partial matches are supported.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidelines are provided. The description does not indicate when to use this tool versus siblings such as get_quote or get_historical. There is no mention of alternatives or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.5- First observed
get_company_info - First observed
get_financials - First observed
get_historical - First observed
get_news - First observed
get_quote - First observed
search_symbols
TDQS
Scored across 6 tools
Each tool targets a distinct aspect of financial data: company profile, financial statements, historical prices, news, real-time quotes, and symbol search. No overlapping purposes.
All tool names follow a consistent verb_noun pattern (get_*, search_*), with clear and predictable naming conventions.
6 tools is well-scoped for a financial data server, covering core functionality without being excessive or insufficient.
Covers essential financial data (profile, financials, historical, quote, news, search), but lacks some common features like dividends, splits, or options data.
Maintenance
Related MCP Connectors
Scrape stock quotes, historical prices, and financial statements from Yahoo Finance.
Fetch current stock prices and key data for symbols across global markets. Look up companies like…
Financial statements, metrics, dividends, and price data for public companies.
Market data, financial statements, valuation, research, and news for investment workflows.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceProvides real-time stock market data and financial analysis through Yahoo Finance integration. Enables users to get quotes, historical prices, fundamentals, dividends, analyst forecasts, and growth projections for any stock symbol.4-
- FlicenseNot gradedqualityDmaintenanceProvides real-time stock market data through Yahoo Finance without requiring an API key. Get quotes, historical data, company information, financial statements, and ticker search capabilities.-
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive financial data from Yahoo Finance, enabling retrieval of stock prices, company information, financial statements, options data, analyst recommendations, and market news through natural language queries.MIT
- AlicenseNot gradedqualityCmaintenanceProvides real-time stock quotes, historical data, and stock search via Yahoo Finance, enabling AI assistants to access and analyze financial market data.30 npm19MIT