FlowTruxFlowTrux/Docs

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

FeaturePolygon.ioFinnhub
Quotes, daily history, fundamentals, newsYesYes
Technical indicators on daily dataYesYes
Market movers, portfolio valueYesYes
Intraday bars, real-time snapshot, VWAP, intraday indicatorsYes (paid Polygon plan)No
Commodities and forexYesNo

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

  1. Get an API key from Polygon.io or Finnhub.
  2. Go to Resources > MCP Servers > Add Server (OWNER or ADMIN).
  3. Choose Stocks (Finnhub / Polygon).
  4. Give it a Name, pick the Provider (finnhub or polygon) and paste the API Key.
  5. 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.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray of stock ticker symbols (e.g., ['AAPL', 'MSFT', 'GOOGL'])

get_stock_history

Get historical price data for a stock (daily OHLCV data)

ParameterTypeRequiredDescription
symbolstringYesStock ticker symbol (e.g., 'AAPL')
daysnumberNoNumber of days of history (default: 30, max: 365)

get_stock_fundamentals

Get fundamental data for a stock (market cap, P/E ratio, sector, description)

ParameterTypeRequiredDescription
symbolstringYesStock ticker symbol.

get_ticker_details

Get detailed information about a ticker including market cap, sector, description.

ParameterTypeRequiredDescription
symbolstringYesStock ticker symbol (e.g., 'AAPL')

get_stock_news

Get recent news articles for stocks. Returns headlines, summaries, and links.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray of stock ticker symbols (e.g., ['AAPL', 'MSFT'])
limitnumberNoNumber of news articles per ticker (default: 3, max: 5)

get_technical_indicators

Get technical indicators for stocks (RSI, SMA, EMA)

ParameterTypeRequiredDescription
symbolsarray of stringYesArray of stock ticker symbols.
indicatorsarray of stringNoIndicators 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.

ParameterTypeRequiredDescription
limitnumberNoNumber of stocks to return (default: 10, max: 20)
min_market_capnumberNoMinimum market cap in billions USD (default: 2)

get_top_losers

Get top losing stocks today. Filters by market cap to exclude penny stocks.

ParameterTypeRequiredDescription
limitnumberNoNumber of stocks to return (default: 10, max: 20)
min_market_capnumberNoMinimum market cap in billions USD (default: 2)

get_market_movers

Get combined top gainers and losers. Filters by market cap.

ParameterTypeRequiredDescription
limitnumberNoNumber of stocks per category (default: 5)
min_market_capnumberNoMinimum market cap in billions USD (default: 2)

calculate_portfolio_value

Calculate total portfolio value and performance based on holdings.

ParameterTypeRequiredDescription
holdingsarray of objectYesHoldings, 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.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray of stock ticker symbols (e.g., ['AAPL', 'TSLA'])
timeframestringNoCandle timeframe (default: 5min) One of: 1min, 5min, 15min, 30min, 1hour.
limitnumberNoNumber 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.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray of stock ticker symbols.

get_intraday_vwap

Get today's VWAP (Volume Weighted Average Price) and the current price's position relative to it.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray 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.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray of stock ticker symbols.
timeframestringNoTimeframe for indicator calculation (default: 15min) One of: 5min, 15min, 1hour.
indicatorsarray of stringNoIndicators 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.

ParameterTypeRequiredDescription
symbolsarray of stringYesArray 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.

ParameterTypeRequiredDescription
symbolstringYesCommodity/forex ticker (e.g., 'C:XAUUSD', 'C:BRUSD')
daysnumberNoNumber of days of history (default: 30, max: 365)

Example Workflow

A price alert:

  1. Trigger - Schedule (every hour during market hours).
  2. Action - MCP tool stocks:get_technical_indicators with symbols ["AAPL", "MSFT"].
  3. Agent - Read the indicators and decide whether anything is overbought or oversold, with the telegram:send_message tool to send an alert.