1. Overview
Connect an MCP-compatible AI client to InsightSentry with @insightsentry/mcp.
The package also includes the insight CLI for terminal commands and scripts.
| Mode | Use it for |
|---|---|
| MCP server | AI assistants that need live market data or built-in InsightSentry docs. |
| insight CLI | Terminal lookups, scripts, file downloads, and JSON filtering. |
2. Setup
Prerequisites
Install Node.js 18 or newer and get your API key from the Dashboard.
Claude Code
claude mcp add insightsentry \
--env INSIGHTSENTRY_API_KEY=your-api-key \
-- npx -y @insightsentry/mcpCodex CLI
codex mcp add insightsentry \
--env INSIGHTSENTRY_API_KEY=your-api-key \
-- npx -y @insightsentry/mcpRun codex mcp list to verify the server was saved.
opencode
Choose a local server in the MCP wizard:
opencode mcp add
# Use these values when prompted:
# Name: insightsentry
# Type: local
# Command: npx -y @insightsentry/mcp
# Environment: INSIGHTSENTRY_API_KEY=your-api-keyRun opencode mcp list to confirm the server is configured.
OpenClaw
openclaw mcp set insightsentry '{"command":"npx","args":["-y","@insightsentry/mcp"],"env":{"INSIGHTSENTRY_API_KEY":"your-api-key"}}'Run openclaw mcp list to confirm the saved entry.
Other MCP Clients
Configure your client to run:
INSIGHTSENTRY_API_KEY=your-api-key npx -y @insightsentry/mcp3. Verify
Restart the client, then try:
"Use InsightSentry to find the symbol for Apple and get the latest quote."
"Use InsightSentry to collect up to 20 live Apple quote updates for 10 seconds."
Use search_symbols to find exact codes, such as NASDAQ:AAPL.
4. Optional CLI
Install the insight, insight-mcp, and mcp commands:
npm install -g @insightsentry/mcpAuthentication
The CLI can use INSIGHTSENTRY_API_KEY or a saved key from insight login. Environment variables take priority.
# Save a key for CLI use
insight login
# Or use a key only for the current shell
export INSIGHTSENTRY_API_KEY="your-api-key"
# Remove the saved key
insight logoutCommon Commands
# See available commands
insight --help
# Get help for a specific tool
insight <tool> --help
# Query quotes
insight get_quotes --codes "NASDAQ:AAPL,NASDAQ:MSFT"
# Download historical bars
insight download_history --symbol "NASDAQ:AAPL" --bar_type day \
--from 2024-01-01 --to 2024-06-30 --output_dir ./history
# Stream real-time quotes as NDJSON
insight stream_live --symbols "NASDAQ:AAPL,NASDAQ:MSFT" --type quote --max_messages 100 --duration_seconds 30 --quiet
# Append live news to a file for 30 minutes
insight stream_newsfeed --content "earnings" --output_file ./news.ndjson --append \
--duration_seconds 1800Most API tools also support --filter <jsonata> to transform JSON output before printing it.
Run stream commands without flags for guided setup. With flags, they never prompt. Data goes to stdout or --output_file; --tee writes to both. Status and errors go to stderr; --quiet suppresses status messages. Limit a run with --duration_seconds or --max_messages. Authenticate the terminal separately from your MCP client using insight login or INSIGHTSENTRY_API_KEY.
5. Tool Coverage
Use insight --help or your MCP client's tool list for arguments.
Use collect_live or collect_newsfeed for live MCP requests. Both return structured data and stop after 20 messages or 10 seconds by default. The maximum is 100 messages or 60 seconds, whichever comes first. A response-size limit may stop a call earlier. Check activated and stop_reason; activation_timeout means the subscription did not become active before the duration limit. Tool text is a short summary, while message data remains in the structured result.
Market data
| Tool | Purpose |
|---|---|
| search_symbols | Find InsightSentry symbol codes by name or ticker. |
| get_quotes | Get the latest quotes for up to 10 symbols. |
| get_symbol_series | Get recent OHLCV bars, with an optional latest-data wait. |
| get_symbol_history | Fetch deeper historical OHLCV ranges. |
| get_symbol_history_period | Get intraday history for a specific period. |
| get_sip_quotes | Get the latest SIP quotes for up to 10 symbols. |
| get_sip_series | Get recent SIP market-data series. |
| get_sip_history | Get SIP intraday history for a specific period. |
| collect_live | Collect a bounded sample of live quotes or series. |
| collect_newsfeed | Collect a bounded sample of live financial news. |
| get_symbol_info | Read symbol metadata, identifiers, crypto fields, splits, and option info. |
| get_symbol_session | Inspect trading sessions and market hours. |
| get_symbol_contracts | List futures contracts and settlement dates. |
| get_symbol_fundamentals | Get company valuation, income, and balance-sheet data. |
| get_fundamentals_series | Fetch historical fundamental indicators. |
| get_fundamentals_meta | Discover available fundamental and technical indicators. |
Screeners
| Tool | Purpose |
|---|---|
| screen_stocks | Filter stocks with custom fields, exchanges, and sort order. |
| screen_etfs | Filter ETFs with custom fields, exchanges, and sort order. |
| screen_bonds | Filter bonds with custom fields, countries, and sort order. |
| screen_crypto | Filter crypto assets with custom fields and sort order. |
| get_*_screener_params | Discover valid fields and filters for each screener. |
Options
| Tool | Purpose |
|---|---|
| get_options_contracts | Discover available option contract codes and metadata. |
| get_options_snapshot | Get latest option bars, quotes, trades, Greeks, and implied volatility in one response. |
| get_options_quotes | Get option quote rows with bid/ask, Greeks, and implied volatility. |
Calendars, news, and documents
| Tool | Purpose |
|---|---|
| get_dividends | Read current or historical monthly dividend calendar data. |
| get_earnings | Read current or historical monthly earnings calendar data. |
| get_ipos | Read current or historical monthly IPO calendar data. |
| get_events | Read current or historical monthly economic event calendar data. |
| get_newsfeed | Search financial news. |
| get_newsfeed_sources | Discover valid news source names. |
| get_documents | List SEC filings and transcripts for a symbol. |
| get_document | Read a specific document. |
Files and charts
| Tool | Purpose |
|---|---|
| download_history | Download date ranges as local CSV or JSON files. |
| render_chart | Render Chart.js configurations as PNG images. |
6. Docs Resources
Your MCP client can read these documentation resources:
| Resource | Content |
|---|---|
| insightsentry://docs | Documentation index with API guides and references. |
| insightsentry://docs/parameters | Common parameters for adjustments, sessions, and bars. |
| insightsentry://docs/ws | WebSocket connection, subscriptions, and data formats. |
| insightsentry://docs/mcp | CLI and MCP setup for AI assistants. |
| insightsentry://docs/screener | Screener fields, filters, and discovery patterns. |
| insightsentry://docs/options | Option chains, Greeks, and option code format. |
| insightsentry://docs/organization | Organization API members, plans, and credits. |
| insightsentry://docs/archive | Historical data endpoints, bar types, and archive ranges. |
| insightsentry://docs/futures-history | Futures contract month handling and history downloads. |
| insightsentry://docs/scalability | Scaling approaches with custom plans and data packages. |
| insightsentry://docs/enterprise | Enterprise WebSocket and Pub/Sub data packages. |
7. Examples
- "Find the correct InsightSentry symbol for Apple, then get the latest quote and company fundamentals."
- "Screen US stocks with market cap above $100B, sorted by volume."
- "Show the options chain for AAPL expiring next month."
- "Help me build a Python WebSocket client that streams real-time quotes."
- "Download AAPL minute bars from January through June 2024 as a merged CSV."