FlowTruxFlowTrux/Docs
Docsmcp

Stocks MCP Server

Access financial market data including quotes, history, and technical indicators

The Stocks MCP server provides real-time and historical financial market data. It supports two data providers: Polygon.io (recommended) and Finnhub.

Provider Comparison

FeaturePolygon.ioFinnhub
Daily quotes and historyYesYes
Technical indicatorsYesYes
Market moversYesYes
NewsYesYes
Intraday barsYes (Starter+ plan)No
Real-time snapshotsYes (Starter+ plan)No
Intraday VWAPYes (Starter+ plan)No
Intraday indicatorsYes (Starter+ plan)No

Polygon.io's Starter plan or higher is required for real-time and intraday data.

Setup

  1. Get an API key from Polygon.io or Finnhub.
  2. Go to Settings > MCP Servers > Add Server.
  3. Select Stocks.
  4. Choose your Provider (Polygon or Finnhub).
  5. Paste your API Key.
  6. Click Save.

Configure only one provider. If you need to switch providers, update the existing configuration.

Daily Data Tools

These tools work with both Polygon.io and Finnhub.

get_stock_quotes

Get current stock prices.

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols (e.g., ["AAPL", "TSLA"])

get_stock_history

Get historical daily OHLCV (Open, High, Low, Close, Volume) data.

ParameterTypeRequiredDescription
symbolstringYesTicker symbol
fromstringYesStart date (YYYY-MM-DD)
tostringYesEnd date (YYYY-MM-DD)

get_technical_indicators

Calculate technical indicators (RSI, SMA, EMA) on daily data.

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols

get_market_summary

Get prices for major indices (SPY, QQQ, DIA). No required parameters.

get_top_gainers

Get today's top gaining stocks. No required parameters.

get_top_losers

Get today's top losing stocks. No required parameters.

get_market_movers

Get combined top gainers and losers. No required parameters.

get_stock_news

Get recent news articles for stocks.

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols

get_ticker_details

Get company information, market cap, and sector.

ParameterTypeRequiredDescription
symbolstringYesTicker symbol

get_stock_fundamentals

Get fundamental data including P/E ratio, sector, and company description.

ParameterTypeRequiredDescription
symbolstringYesTicker symbol

Intraday Data Tools (Polygon.io Only)

These tools require a Polygon.io Starter plan or higher.

get_intraday_bars

Get OHLCV candle data at various intervals.

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols
intervalstringNoCandle interval: 1min, 5min, 15min, 30min, 1hour

get_realtime_snapshot

Get real-time price data including pre-market and after-hours pricing.

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols

get_intraday_vwap

Get today's Volume Weighted Average Price with analysis.

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols

get_intraday_indicators

Calculate RSI and EMA on intraday data (5-minute or 15-minute intervals).

ParameterTypeRequiredDescription
symbolsarrayYesArray of ticker symbols

Example Workflow

A stock monitoring workflow:

  1. Trigger -- Cron schedule (every hour during market hours)
  2. Agent -- Check prices and indicators, tools: stocks:get_stock_quotes, stocks:get_technical_indicators
  3. Logic -- If RSI > 70 or RSI < 30 (overbought/oversold signal)
  4. Agent -- Generate alert message, tools: telegram:send_message