yfinance-mcp-ts
Click on "Install 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., "@yfinance-mcp-tsshow me the latest price 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.
Features
20 MCP Tools — stock quotes, financials, options, screeners, research, and market data
LLM-Optimized Output — compact text/markdown responses with auto-aggregation and size guards
Browser Impersonation — TLS fingerprinting bypass via impit for 100% success rate
Proxy Rotation — round-robin rotation with automatic failure tracking and cooldown
Retry with Backoff — exponential backoff with jitter for rate limits and transient errors
300+ Screeners — predefined stock screeners (day gainers, most actives, growth stocks, etc.)
Premium Support — optional Yahoo Finance Premium authentication via Puppeteer
Related MCP server: yfinance
Installation
npm install yfinance-mcp-tsMCP Server Setup
Claude Desktop / Claude Code
Add to your config (~/.config/claude/claude_desktop_config.json on macOS/Linux, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"yfinance": {
"command": "npx",
"args": ["yfinance-mcp-ts"]
}
}
}With proxy rotation:
{
"mcpServers": {
"yfinance": {
"command": "npx",
"args": ["yfinance-mcp-ts"],
"env": {
"YFINANCE_PROXY_LIST": "http://user:pass@proxy1.com:8080\nhttp://user:pass@proxy2.com:8080"
}
}
}
}You can also run the server manually:
npm run mcp # production
npm run mcp:dev # development (ts-node)
npx yfinance-mcp-ts # from npmAvailable Tools
Tool | Description |
Stock Data | |
| Current price, market cap, volume |
| P/E ratio, 52-week range, dividend yield |
| Company info, sector, employees |
| Historical OHLCV data |
| Income statement, balance sheet, cash flow |
| Options chain with Greeks |
| Forward P/E, PEG, beta, EPS |
| Analyst recommendations |
| EPS estimates and actuals |
Screeners | |
| List all 300+ screeners |
| Run a screener |
| Get screener details |
Research | |
| Upcoming earnings announcements |
| Upcoming and recent IPOs |
| Upcoming and recent stock splits |
Market Data | |
| Search by name or symbol |
| Major indices (S&P 500, Dow, NASDAQ) |
| Trending stocks |
| Currency pairs and exchange rates |
| Supported countries list |
All tools return compact text by default. Add format: "json" to any call for raw JSON output.
Environment Variables
Variable | Description | Default |
|
|
|
| Enable HTTP/3 (impit only) |
|
| Ignore TLS certificate errors |
|
| Request timeout (ms) |
|
| Newline-separated proxy URLs | — |
| Failures before marking proxy unhealthy |
|
| Cooldown before retrying unhealthy proxy (ms) |
|
| Enable automatic retry |
|
| Max retry attempts |
|
| Initial retry delay (ms) |
|
| Max retry delay (ms) |
|
Library Usage
Ticker
import { Ticker } from 'yfinance-mcp-ts';
const ticker = new Ticker('AAPL');
// or multiple: new Ticker('AAPL MSFT GOOG') / new Ticker(['AAPL', 'MSFT'])
await ticker.getPrice();
await ticker.getSummaryDetail();
await ticker.getSummaryProfile();
await ticker.getKeyStats();
await ticker.getEarnings();
await ticker.getRecommendationTrend();
// Historical data
await ticker.getHistory({ period: '1mo', interval: '1d' });
await ticker.getHistory({ start: '2024-01-01', end: '2024-12-31', interval: '1wk' });
// Financial statements ('a' = annual, 'q' = quarterly)
await ticker.getIncomeStatement('a');
await ticker.getBalanceSheet('q');
await ticker.getCashFlow('a');
await ticker.getFinancials('income', 'a'); // type: 'income' | 'balance' | 'cash' | 'cashflow'
// Options
await ticker.getOptionChain();
// All available modules at once
await ticker.getAllModules();Method | Description |
| Current price and market data |
| Summary statistics |
| Company profile |
| Detailed company info |
| Key statistics |
| Financial KPIs |
| Earnings data |
| Earnings trend |
| Upcoming events |
| Analyst recommendations |
| ESG metrics |
| Major shareholders |
| Insider holdings |
| Insider transactions |
| Institutional ownership |
| Fund ownership |
| SEC filings |
| Quote type info |
| Upgrade/downgrade history |
| Historical OHLCV data |
| Dividend history |
| Income statement |
| Balance sheet |
| Cash flow statement |
| Valuation measures |
| All financial data |
| Full options chain |
| Quick quotes |
| Similar stocks |
| Technical analysis |
| Recent news |
| Company executives |
Fund-specific: getFundHoldingInfo(), getFundTopHoldings(), getFundSectorWeightings(), getFundBondHoldings(), getFundEquityHoldings(), getFundBondRatings(), getFundPerformance(), getFundProfile()
Screener
import { Screener } from 'yfinance-mcp-ts';
const screener = new Screener();
screener.availableScreeners; // list all 300+ screener IDs
screener.getScreenerInfo('day_gainers'); // screener metadata
await screener.getScreeners('day_gainers', 25); // run with result count
await screener.getScreeners('day_gainers most_actives', 10); // multipleResearch
import { Research } from 'yfinance-mcp-ts';
const research = new Research();
await research.getEarnings('2024-01-01', '2024-01-31');
await research.getSplits('2024-01-01', '2024-12-31');
await research.getIPOs('2024-01-01', '2024-12-31');
// Premium only
await research.getReports(100, { sector: 'Technology', investment_rating: 'Bullish' });
await research.getTrades(100, { trend: 'Bullish', term: 'Short term' });Standalone Functions
import { search, getMarketSummary, getTrending, getCurrencies, getValidCountries } from 'yfinance-mcp-ts';
await search('Apple', { quotesCount: 10, newsCount: 5 });
await search('AAPL', { firstQuote: true });
await getMarketSummary('united states');
await getTrending('united states');
await getCurrencies();
getValidCountries(); // ['united states', 'france', 'germany', ...]Configuration
const ticker = new Ticker('AAPL', {
country: 'united states', // 14 supported countries
timeout: 30000,
httpClient: 'impit', // 'impit' (default) or 'axios'
retry: {
enabled: true,
maxRetries: 3,
initialDelay: 1000,
maxDelay: 30000,
},
proxyRotation: {
proxyList: 'http://proxy1:8080\nhttp://proxy2:8080',
maxFailures: 3,
cooldownMs: 300000,
},
// Premium auth (requires puppeteer)
username: 'your@email.com',
password: 'password',
});Supported countries: united states, australia, canada, france, germany, hong kong, india, italy, spain, united kingdom, brazil, new zealand, singapore, taiwan
Requirements
Node.js >= 20.0.0
TypeScript >= 5.0 (for development)
puppeteer>= 21.0.0 (optional, for premium features)https-proxy-agent/socks-proxy-agent(optional, for proxy support)
License
MIT
Credits
TypeScript port of yahooquery by Doug Guthrie.
Disclaimer
Not affiliated with Yahoo, Inc. Data is for personal use only. Review Yahoo's terms of service before using in production.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anconina/yfinance-mcp-ts'
If you have feedback or need assistance with the MCP directory API, please join our Discord server