loading…
Search for a command to run...
loading…
An MCP server that provides an interface for the Interactive Brokers API via the ib_async library. It enables users to manage accounts, access real-time and his
An MCP server that provides an interface for the Interactive Brokers API via the ib_async library. It enables users to manage accounts, access real-time and historical market data, and execute or monitor trades through TWS or IB Gateway.
MCP (Model Context Protocol) server wrapping ib_async for Interactive Brokers API.
cd ib-async-mcp
uv sync
uv run ib-async-mcp
Add to your MCP client configuration (e.g., .kiro/settings/mcp.json):
{
"mcpServers": {
"ib-async": {
"command": "uv",
"args": ["--directory", "/path/to/ib-async-mcp", "run", "ib-async-mcp"],
"env": {}
}
}
}
Or using uvx (after publishing):
{
"mcpServers": {
"ib-async": {
"command": "uvx",
"args": ["ib-async-mcp"],
"env": {}
}
}
}
connect - Connect to TWS/Gatewaydisconnect - Disconnectis_connected - Check connection statusget_accounts - List managed accountsget_account_values - Account values (balance, margin, etc.)get_account_summary - Account summaryget_portfolio - Portfolio with market valuesget_positions - All positionsget_pnl - Profit and losscreate_contract - Create a contractqualify_contracts - Qualify contracts (fill conId)get_contract_details - Detailed contract infosearch_symbols - Search for symbolsget_market_data - Real-time snapshotget_historical_data - Historical barsget_head_timestamp - Earliest available dataplace_order - Place new ordercancel_order - Cancel ordercancel_all_orders - Cancel all ordersget_open_orders - List open ordersget_open_trades - List open tradesget_executions - Execution reportsget_fills - Order fillswhat_if_order - Check margin impactget_option_chain - Option chaincalculate_implied_volatility - Calculate IVcalculate_option_price - Calculate option priceget_scanner_parameters - Available scanner paramsrun_scanner - Run market scannerget_news_providers - List news providersget_news_article - Get articleget_historical_news - Historical headlinesget_current_time - TWS server time# Connect first
connect(host="127.0.0.1", port=7497, client_id=1)
# Get account info
get_accounts()
get_portfolio()
# Get market data
get_market_data(contract_type="stock", symbol="AAPL")
# Get historical data
get_historical_data(
contract_type="stock",
symbol="SPY",
duration="5 D",
bar_size="1 hour"
)
# Place an order
place_order(
contract_type="stock",
symbol="AAPL",
action="BUY",
quantity=100,
order_type="limit",
limit_price=150.00
)
MIT
This software is not affiliated with Interactive Brokers Group, Inc. Use at your own risk.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"ib-async-mcp": {
"command": "npx",
"args": []
}
}
}