Stocks MCP Server
Stock quotes, history, fundamentals, news, technical indicators and commodities from Finnhub or Polygon.io
The Stocks MCP server provides 17 tools for market data: quotes, daily history, fundamentals, news, technical indicators, market movers, portfolio valuation, intraday data and commodities. Each configuration uses one data provider - Finnhub or Polygon.io - chosen when you add it.
Provider Comparison
| Feature | Polygon.io | Finnhub |
|---|---|---|
| Quotes, daily history, fundamentals, news | Yes | Yes |
| Technical indicators on daily data | Yes | Yes |
| Market movers, portfolio value | Yes | Yes |
| Intraday bars, real-time snapshot, VWAP, intraday indicators | Yes (paid Polygon plan) | No |
| Commodities and forex | Yes | No |
Intraday tools fail on a Finnhub configuration - Finnhub returns daily data only. Polygon's free tier allows roughly 5 calls a minute; for batch work, put a Delay action between requests or use a paid Polygon plan.
Setup
- Get an API key from Polygon.io or Finnhub.
- Go to Resources > MCP Servers > Add Server (OWNER or ADMIN).
- Choose Stocks (Finnhub / Polygon).
- Give it a Name, pick the Provider (
finnhuborpolygon) and paste the API Key. - Under Available in workspaces, pick the workspaces, then click Add Server.
To use both providers, add two configurations with different names.
Tickers are uppercase strings (AAPL, TSLA). Tools that take symbols expect an array, even for one symbol: ["AAPL"].
Daily Data Tools
These work with both providers.
get_stock_quotes
Get current stock quotes for multiple symbols. Returns price, change, volume.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols (e.g., ['AAPL', 'MSFT', 'GOOGL']) |
get_stock_history
Get historical price data for a stock (daily OHLCV data)
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock ticker symbol (e.g., 'AAPL') |
days | number | No | Number of days of history (default: 30, max: 365) |
get_stock_fundamentals
Get fundamental data for a stock (market cap, P/E ratio, sector, description)
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock ticker symbol. |
get_ticker_details
Get detailed information about a ticker including market cap, sector, description.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock ticker symbol (e.g., 'AAPL') |
get_stock_news
Get recent news articles for stocks. Returns headlines, summaries, and links.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols (e.g., ['AAPL', 'MSFT']) |
limit | number | No | Number of news articles per ticker (default: 3, max: 5) |
get_technical_indicators
Get technical indicators for stocks (RSI, SMA, EMA)
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols. |
indicators | array of string | No | Indicators to calculate (default: all) Any of: rsi, sma_50, sma_200, ema_50, ema_200. |
get_market_summary
Get market summary including major indices (S&P 500, NASDAQ, DOW)
No parameters.
get_top_gainers
Get top gaining stocks today. Filters by market cap to exclude penny stocks.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Number of stocks to return (default: 10, max: 20) |
min_market_cap | number | No | Minimum market cap in billions USD (default: 2) |
get_top_losers
Get top losing stocks today. Filters by market cap to exclude penny stocks.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Number of stocks to return (default: 10, max: 20) |
min_market_cap | number | No | Minimum market cap in billions USD (default: 2) |
get_market_movers
Get combined top gainers and losers. Filters by market cap.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Number of stocks per category (default: 5) |
min_market_cap | number | No | Minimum market cap in billions USD (default: 2) |
calculate_portfolio_value
Calculate total portfolio value and performance based on holdings.
| Parameter | Type | Required | Description |
|---|---|---|---|
holdings | array of object | Yes | Holdings, each { symbol, shares, avg_cost }. |
Intraday Data Tools (Polygon.io only)
get_intraday_bars
Get intraday OHLCV bars (candles) for today at the chosen timeframe.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols (e.g., ['AAPL', 'TSLA']) |
timeframe | string | No | Candle timeframe (default: 5min) One of: 1min, 5min, 15min, 30min, 1hour. |
limit | number | No | Number of bars per symbol to return (default: 50, max: 500) |
get_realtime_snapshot
Get real-time market snapshot including current price, today's change, volume, and pre/post market data. Best for 'what is happening right now' queries.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols. |
get_intraday_vwap
Get today's VWAP (Volume Weighted Average Price) and the current price's position relative to it.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols. |
get_intraday_indicators
Get technical indicators calculated on intraday timeframes (5min, 15min). Includes RSI, EMA-9, EMA-20, SMA-20 for short-term trading signals.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of stock ticker symbols. |
timeframe | string | No | Timeframe for indicator calculation (default: 15min) One of: 5min, 15min, 1hour. |
indicators | array of string | No | Indicators to calculate (default: all) Any of: rsi, ema_9, ema_20, sma_20. |
Commodities and Forex Tools (Polygon.io only)
These use Polygon's forex ticker format: C:XAUUSD (gold), C:XAGUSD (silver), C:CLUSD (crude oil WTI), C:BRUSD (Brent oil), C:NGUSD (natural gas), C:EURUSD (EUR/USD).
get_commodity_quotes
Get current prices for commodities, forex pairs and precious metals (ticker format above). Polygon only.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbols | array of string | Yes | Array of commodity/forex tickers (e.g., ['C:XAUUSD', 'C:BRUSD', 'C:CLUSD']) |
get_commodity_history
Get historical daily prices for commodities, forex pairs and precious metals. Polygon only.
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Commodity/forex ticker (e.g., 'C:XAUUSD', 'C:BRUSD') |
days | number | No | Number of days of history (default: 30, max: 365) |
Example Workflow
A price alert:
- Trigger - Schedule (every hour during market hours).
- Action - MCP tool
stocks:get_technical_indicatorswithsymbols["AAPL", "MSFT"]. - Agent - Read the indicators and decide whether anything is overbought or oversold, with the
telegram:send_messagetool to send an alert.