# Marketstack — how to use (mcp.ai)

Connect your Marketstack account and use 19 tools for developer tools straight from your AI agent. Connect with your own API key. Stock Data Real-Time, Intraday & Historical Market Data API providing access to 125,000+ tickers across 72+ stock exchanges worldwide.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_marketstack?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `marketstack_get_dividends`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/marketstack`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/marketstack/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/marketstack/get/dividends` — Tool to retrieve stock dividend data for one or more ticker symbols from Marketstack API. Use when you need historical dividend payment information for stocks, including dividend amounts and payment d
  - body: { sort?: string, limit?: integer, offset?: integer, date_to?: string, symbols: string, date_from?: string }
- `POST https://api.mcp.ai/api/marketstack/get/eod` — Tool to retrieve end-of-day (EOD) stock data for one or multiple ticker symbols. Returns OHLCV data (open, high, low, close, volume) along with adjusted prices, dividends, and split factors. Use when 
  - body: { sort?: string, limit?: integer, offset?: integer, date_to?: string, symbols: string, exchange?: string, date_from?: string }
- `POST https://api.mcp.ai/api/marketstack/get/exchange` — Tool to retrieve detailed information for a specific stock exchange by its MIC (Market Identifier Code). Use when you need comprehensive information about an exchange including its location, status, a
  - body: { mic: string }
- `POST https://api.mcp.ai/api/marketstack/get/exchange/intraday` — Tool to retrieve intraday stock data for symbols on a specific stock exchange (by MIC) at a chosen interval. Use when you need intraday prices scoped to a particular exchange.
  - body: { mic: string, sort?: string, limit?: integer, offset?: integer, date_to?: string, symbols: string, interval?: string, date_from?: string }
- `POST https://api.mcp.ai/api/marketstack/get/exchange/intraday/date` — Tool to retrieve intraday stock data for symbols on a specific stock exchange (by MIC) for a specific date. Use when you need the intraday series for a particular exchange and trading day.
  - body: { mic: string, date: string, limit?: integer, offset?: integer, symbols: string, interval?: string }
- `POST https://api.mcp.ai/api/marketstack/get/exchange/intraday/latest` — Tool to retrieve the latest available intraday data for symbols on a specific stock exchange (by MIC). Use when you need the most recent live price snapshot scoped to a particular exchange.
  - body: { mic: string, symbols: string, interval?: string }
- `POST https://api.mcp.ai/api/marketstack/get/intraday` — Tool to retrieve intraday (real-time and historical) stock data for one or multiple ticker symbols at a chosen interval (1min/5min/10min/15min/30min/1hour). Use when you need live prices or to build a
  - body: { sort?: string, limit?: integer, offset?: integer, date_to?: string, symbols: string, exchange?: string, interval?: string, date_from?: string, after_hours?: boolean }
- `POST https://api.mcp.ai/api/marketstack/get/intraday/date` — Tool to retrieve intraday stock data for one or multiple ticker symbols on a specific date. Use when you need the intraday series for a particular trading day.
  - body: { date: string, limit?: integer, offset?: integer, symbols: string, exchange?: string, interval?: string, after_hours?: boolean }
- `POST https://api.mcp.ai/api/marketstack/get/intraday/latest` — Tool to retrieve the latest available intraday data point(s) for one or multiple ticker symbols. Use when you need the most recent live price snapshot rather than a full intraday series.
  - body: { symbols: string, exchange?: string, interval?: string, after_hours?: boolean }
- `POST https://api.mcp.ai/api/marketstack/get/splits` — Tool to retrieve stock split data for one or more stock symbols from Marketstack. Use when you need historical split information including split factors and dates.
  - body: { sort?: string, limit?: integer, offset?: integer, date_to?: string, symbols: string, date_from?: string }
- `POST https://api.mcp.ai/api/marketstack/get/stock/price` — Tool to retrieve the real-time (last known) stock price for a ticker symbol. Use when you need an up-to-the-minute price quote, for example to display a live price in a stock widget.
  - body: { ticker: string, exchange?: string }
- `POST https://api.mcp.ai/api/marketstack/get/ticker/eod` — Tool to retrieve end-of-day stock price data for a specific ticker symbol. Use when you need historical daily price information including open, high, low, close, volume, and adjusted values.
  - body: { limit?: integer, offset?: integer, symbol: string, exchange?: string }
- `POST https://api.mcp.ai/api/marketstack/get/ticker/eod/latest` — Tool to retrieve end-of-day (EOD) stock data for the latest available date for a specific ticker. Use when you need the most recent trading day data for a stock symbol.
  - body: { limit?: integer, offset?: integer, symbol: string, exchange?: string }
- `POST https://api.mcp.ai/api/marketstack/get/ticker/info` — Tool to retrieve detailed information about stock tickers including exchange, sector, and industry data. Use when you need comprehensive company information for a ticker symbol.
  - body: { ticker: string }
- `POST https://api.mcp.ai/api/marketstack/get/ticker/intraday` — Tool to retrieve intraday stock data for a single ticker symbol at a chosen interval (1min/5min/10min/15min/30min/1hour). Use when you need a live price series for one stock, e.g. to render a 1D chart
  - body: { sort?: string, limit?: integer, offset?: integer, symbol: string, date_to?: string, exchange?: string, interval?: string, date_from?: string, after_hours?: boolean }
- `POST https://api.mcp.ai/api/marketstack/get/ticker/intraday/latest` — Tool to retrieve the latest available intraday bar for a single ticker symbol, including real-time bid/ask quote fields. Use when you need the most recent live price snapshot for one stock.
  - body: { limit?: integer, offset?: integer, symbol: string, exchange?: string }
- `POST https://api.mcp.ai/api/marketstack/list/currencies` — Tool to retrieve a list of all supported currencies from the Marketstack API. Use when you need to get information about available currencies for stock market data.
  - body: { limit?: integer, offset?: integer }
- `POST https://api.mcp.ai/api/marketstack/list/exchanges` — Tool to retrieve information about supported stock exchanges. Use when you need to list or search for stock exchanges from the 2700+ exchanges available in Marketstack.
  - body: { limit?: integer, offset?: integer, search?: string }
- `POST https://api.mcp.ai/api/marketstack/list/tickers` — Tool to get a list of all supported stock tickers. Use when you need to obtain the full list of tickers supported by Marketstack or search for specific tickers.
  - body: { limit?: integer, offset?: integer, search?: string, exchange?: string }

## Example prompts
- "What can I do in Marketstack?"
- "Show me a summary of my Marketstack account"

## More
- Page: https://mcp.ai/marketstack
- Agent spec (llms.txt): https://mcp.ai/marketstack/llms.txt
- Postman collection: https://mcp.ai/marketstack/postman.json
