ib-mcp
v0.4.1Model Context Protocol (MCP) server exposing Interactive Brokers data via ib_async + FastMCP
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
lookup_contract Lookup Contract
Look up contract details by ticker symbol and optional exchange/currency
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Stock symbol (e.g., AAPL, GOOGL, etc.) |
currency | string | Currency (e.g., USD, EUR, etc.) |
exchange | string | Exchange (e.g., SMART, NYSE, NASDAQ, etc.) |
sec_type | string | Security type (e.g., STK, OPT, FUT, etc.) |
ticker_to_conid Ticker To Conid
Convert ticker symbol to contract ID (conid)
| Parameter | Type | Description |
|---|---|---|
symbol * | string | |
currency | string | |
exchange | string | |
sec_type | string |
get_historical_data Get Historical Data
Retrieve historical market data
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Stock symbol or conid |
bar_size | string | Bar size (e.g., '1 day', '1 hour', '5 mins') |
currency | string | |
data_type | string | Data type (TRADES, MIDPOINT, BID, ASK, FEE_RATE, OPTION_IMPLIED_VOLATILITY) |
duration | string | Duration (e.g., '1 M', '1 Y', '5 D') |
exchange | string | |
max_bars | integer | Maximum number of bars to retrieve |
search_contracts Search Contracts
Search for contracts by partial symbol or company name
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Search pattern (symbol or company name) |
get_historical_news Get Historical News
Retrieve historical news articles
| Parameter | Type | Description |
|---|---|---|
end_date * | string | End date (YYYY-MM-DD) |
start_date * | string | Start date (YYYY-MM-DD) |
symbol * | string | Stock symbol or conid |
currency | string | Currency (e.g., USD, EUR, etc.) |
exchange | string | Exchange (e.g., SMART, NYSE, NASDAQ, etc.) |
max_count | integer | Maximum number of articles to retrieve |
get_article Get Article
Retrieve a full news article by ID and provider code
| Parameter | Type | Description |
|---|---|---|
articleId * | string | Article ID returned from historical news |
providerCode * | string | Provider code returned from historical news |
as_markdown | boolean | Attempt to convert XML content to markdown if the article is XML |
truncate | integer | Optional max length of returned text (0 for no truncation) |
get_fundamental_data Get Fundamental Data
Retrieve fundamental data for a contract
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Stock symbol or conid |
currency | string | |
exchange | string | |
report_type | string | Report type (ReportsFinSummary, ReportsOwnership, ReportsFinStatements, RESC, CalendarReport) |
get_account_summary Get Account Summary
Retrieve account summary information
| Parameter | Type | Description |
|---|---|---|
account | string | Account name (empty for all accounts) |
get_positions Get Positions
Retrieve current positions
| Parameter | Type | Description |
|---|---|---|
account | string | Account name (empty for all accounts) |
get_contract_details Get Contract Details
Get detailed contract information including dividends and corporate actions
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Stock symbol or conid |
currency | string | |
exchange | string | |
sec_type | string |
get_option_chain Get Option Chain
List option-chain parameters (expirations and strikes) for an underlying via reqSecDefOptParams. Strikes are sorted ascending, filtered to [min_strike, max_strike] (0 = unbounded), then paginated (max_strikes per page, default 20; strike_offset moves the window); the output says how to fetch the next page. When several trading classes are returned (e.g. SPX and SPXW), pass trading_class to page one chain. Read-only; no market-data subscription required.
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Underlying symbol (e.g., XSP, SPX, AAPL) |
currency | string | Currency (e.g., USD) |
exchange | string | Underlying exchange (CBOE for indices, SMART for stocks) |
max_strike | number | Highest strike (0 = no bound) |
max_strikes | integer | Max strikes per page |
min_strike | number | Lowest strike (0 = no bound) |
sec_type | string | Underlying security type (IND, STK, ...) |
strike_offset | integer | Strike pagination offset |
trading_class | string | Filter to a single option trading class (optional) |
get_option_quotes Get Option Quotes
Fetch a batch of option quotes (bid/ask/last/close + model IV/delta) for a list of strikes on one expiry/right, via a brief streaming market-data subscription (delayed option data is not available as one-shot snapshots). Duplicate strikes are ignored; capped at 20 strikes per call to respect IB pacing. Defaults to delayed-frozen data (no OPRA subscription needed); set use_delayed=false for live data. Read-only.
| Parameter | Type | Description |
|---|---|---|
expiry * | string | Expiration date, format YYYYMMDD |
right * | string | Option right: P (put) or C (call) |
strikes * | array | Strike prices (max 20 per call) |
symbol * | string | Underlying symbol (e.g., XSP) |
currency | string | Currency (e.g., USD) |
exchange | string | Option exchange (e.g., SMART) |
trading_class | string | Option trading class (defaults to the symbol) |
use_delayed | boolean | Use delayed-frozen data (no OPRA needed) |
get_index_quote Get Index Quote
Get the spot quote (last/close/bid/ask) for an index via a brief streaming market-data subscription, delayed by default (no market-data subscription needed), handy for strike-from-spot math. Read-only.
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Index symbol or conid (e.g., XSP, SPX) |
currency | string | Currency (e.g., USD) |
exchange | string | Index exchange (e.g., CBOE) |
use_delayed | boolean | Use delayed-frozen data (no OPRA needed) |