Skip to main content

Webull Local MCP Server

Webull Local MCP Server enables AI assistants (Cursor, Claude Desktop, Kiro, etc.) to securely access Webull OpenAPI trading and market data capabilities via the Model Context Protocol (MCP).

Source code: webull-inc/webull-openapi-mcp


What is Webull Local MCP​

Webull Local MCP Server is a server built on the Model Context Protocol that wraps Webull OpenAPI capabilities into tools callable by AI assistants. With MCP, you can use natural language in your AI coding assistant to:

  • Query real-time and historical market data (stocks, options, futures, crypto, event contracts)
  • Look up instruments, fundamentals, financial statements, and institution/insider data
  • Search market news, use screeners, and manage watchlists
  • Browse and publish community posts and comments
  • View account balances and positions
  • Place, preview, modify, and cancel orders
  • Query order history and order details

Architecture Overview​


Prerequisites​

API Credentials (App Key and App Secret)​

Apply based on your account type:

Individual users: Individual Application Guide

Institutional users: Institution Application Guide

Other Requirements​


Setup Steps​

Step 1: Install​

Ensure Python 3.10+ and uvx are installed. No need to manually install Webull MCP Server — your AI client will automatically download and launch it via uvx.

Step 2: Configure AI Client​

Add the following configuration to your AI client's MCP config file. Replace your_app_key and your_app_secret with the credentials obtained in the prerequisites:

Edit .cursor/mcp.json:

{
"mcpServers": {
"webull": {
"command": "uvx",
"args": ["webull-openapi-mcp", "serve"],
"env": {
"WEBULL_APP_KEY": "your_app_key",
"WEBULL_APP_SECRET": "your_app_secret",
"WEBULL_REGION_ID": "us",
"WEBULL_ENVIRONMENT": "prod"
}
}
}
}
tip

For sandbox environment, set WEBULL_ENVIRONMENT to uat.

Step 3: Authenticate​

note

This step is only required if your account has Two-Factor Authentication enabled.

Complete a one-time authentication in the terminal before first use:

uvx webull-openapi-mcp auth

Authentication flow:

After approving the request in the Webull App, the token is saved locally. The token is valid for 15 days and auto-refreshes on use.

Step 4: Verify Connection​

Restart your AI client and try the following in a conversation:

Get my account list

If your account information is returned, Webull MCP is successfully connected.


Usage Examples​

Market Data​

Get a real-time snapshot for AAPL
Show me AAPL's daily bars for the last 5 days

Trading​

Buy 100 shares of AAPL at market price
Buy 10 shares of TSLA at market price

Available Endpoints​

EndpointDescription
add_watchlist_instrumentsAdd instruments to a watchlist.
cancel_orderCancel an unfilled order (stocks, options, futures, crypto, event contracts).
create_community_commentCreate a plain-text comment on a community post (write operation, publishes under your account; US only).
create_community_postCreate a plain-text community post, optionally tagged with a symbol (write operation, publishes under your account; US only).
create_watchlistCreate a new watchlist.
delete_watchlistDelete a watchlist and all its instruments (irreversible).
get_52_week_high_lowGet 52-week high/low stocks ranking.
get_account_balanceGet account balance (net liquidation, buying power, cash, market value, P&L).
get_account_listGet all linked accounts.
get_account_positionsGet account positions list.
get_analyst_ratingGet analyst rating for a security (strong buy/buy/hold/sell counts).
get_analyst_target_priceGet analyst consensus target price for a security.
get_balance_sheetGet balance sheet for a stock across periods.
get_cash_flowGet cash flow statement for a stock across periods.
get_community_hot_stocksList stocks ranked by community activity (US only).
get_community_post_detailGet detailed information for a community post, including attached tickers (US only).
get_community_postsList community posts for a symbol, with optional keyword search and pagination (US only).
get_company_profileGet company profile (business description, industry, CEO, employees, etc.).
get_crypto_barsGet cryptocurrency OHLCV bars.
get_crypto_instrumentsGet cryptocurrency instrument info.
get_crypto_snapshotGet cryptocurrency real-time snapshot.
get_event_barsGet event contract OHLCV bars.
get_event_categoriesGet event contract category list.
get_event_depthGet event contract order book depth.
get_event_eventsGet events within a series.
get_event_instrumentsGet event contract instruments by series.
get_event_seriesGet event contract series (recurring event templates).
get_event_snapshotGet event contract real-time snapshot.
get_event_tickGet event contract tick-by-tick trade data.
get_financial_alertGet financial alert (next report estimates vs last year).
get_financial_indicatorsGet financial indicators (key ratios/metrics) for a stock.
get_fund_allocationGet fund asset allocation by date.
get_fund_briefGet fund brief information.
get_fund_dividendsGet fund dividend history.
get_fund_filesGet fund files/documents.
get_fund_holdingsGet fund top 10 holdings.
get_fund_net_valueGet fund net value (NAV) history.
get_fund_performanceGet fund performance returns over multiple horizons.
get_fund_ratingGet fund rating history.
get_fund_splitsGet fund split history.
get_futures_barsGet futures OHLCV bars in batch.
get_futures_depthGet futures order book depth.
get_futures_footprintGet futures large order footprint (order flow).
get_futures_instrumentsGet futures instrument info.
get_futures_product_classGet all futures product classification groups.
get_futures_productsGet all futures products and product codes.
get_futures_snapshotGet futures real-time snapshot.
get_futures_tickGet futures tick-by-tick trade data.
get_gainers_losersGet top gainers or losers ranking by price change.
get_high_dividendGet high dividend stocks ranking.
get_income_statementGet income statement for a stock across periods.
get_insider_holdingsGet insider ownership statistics overview for a US stock.
get_insider_transactionsGet insider transaction records for a US stock (optional BUY/SELL filter).
get_institution_holding_changesGet a US institution's holding changes by position type (OPEN/CLOSE/CHANGE).
get_institution_holdingsGet a US institution's 13F holdings.
get_institution_identifierSearch US institutional investors by name or SEC CIK.
get_instrumentsGet stock/ETF instrument info.
get_macroeconomic_calendarGet the US macroeconomic event calendar for a date range.
get_market_sectorsGet market sector overview ranking.
get_market_sectors_detailGet stock list and statistics for a specific market sector.
get_market_sentimentGet the US market fear & greed sentiment index with historical comparison points.
get_most_activeGet most actively traded stocks ranking.
get_my_community_postsList community posts created by the current user (US only).
get_news_detailGet the full content of a US market news article by ID.
get_open_ordersGet all current open/pending orders.
get_option_barsGet option historical OHLCV bars (batch). Requires option market data subscription.
get_option_contractsList US-listed option contracts by underlying, expiry, strike, type, etc.
get_option_snapshotGet real-time option snapshots (up to 20 symbols). Requires option market data subscription.
get_option_tickGet option tick-by-tick trade data for a contract. Requires option market data subscription.
get_order_detailGet single order details.
get_order_historyGet historical orders (default last 7 days).
get_stock_barsGet stock OHLCV bars in batch (multiple symbols).
get_stock_bars_singleGet OHLCV bars for a single stock.
get_stock_capital_flowGet capital flow distribution for a stock by date.
get_stock_dividend_calendarGet dividend calendar for a stock.
get_stock_earnings_calendarGet earnings calendar for a stock.
get_stock_filingsGet SEC filings for a US stock (last 3 years).
get_stock_footprintGet stock large order footprint (order flow).
get_stock_forecast_epsGet forecast EPS for a stock.
get_stock_industry_comparisonGet industry comparison for a stock (up to 20 peers).
get_stock_newsGet news related to a US stock, with optional sentiment filter.
get_stock_noii_barsGet NOII K-line data for a stock (opening/closing auction imbalance).
get_stock_noii_snapshotGet latest NOII snapshot for a stock during auction phases.
get_stock_quotesGet real-time stock bid/ask quotes with depth.
get_stock_snapshotGet real-time stock/ETF snapshot (supports multiple symbols).
get_stock_tickGet stock tick-by-tick trade data.
get_stock_unusual_activitiesGet recent unusual activity alerts (volume surge, price spike) for US stocks.
get_watchlist_instrumentsGet all instruments in a watchlist.
get_watchlistsGet all watchlists for the current user.
place_algo_orderPlace an algorithmic order (TWAP, VWAP, POV).
place_crypto_orderPlace a cryptocurrency order.
place_event_orderPlace an event contract order.
place_futures_orderPlace a futures order.
place_option_single_orderPlace a single-leg option order.
place_option_strategy_orderPlace a multi-leg option strategy order.
place_stock_combo_orderPlace a combo stock order (OTO/OCO/OTOCO).
place_stock_orderPlace a stock order (single, non-combo).
preview_futures_orderPreview a futures order without submitting (estimated costs and margin).
preview_option_orderPreview an option order without submitting.
preview_stock_orderPreview a stock order without submitting.
remove_watchlist_instrumentsRemove instruments from a watchlist.
replace_event_orderModify an existing event contract order.
replace_futures_orderModify an existing futures order.
replace_option_orderModify an existing option order.
replace_stock_orderModify an existing stock order.
search_newsSearch US market news by keyword.
update_watchlistUpdate an existing watchlist's name or sort order.
update_watchlist_instrumentsUpdate the sort order of instruments in a watchlist.

Configuration Parameters​

VariableDescriptionDefault
WEBULL_APP_KEYApp Key (required)—
WEBULL_APP_SECRETApp Secret (required)—
WEBULL_ENVIRONMENTuat (sandbox) or prod (production)uat
WEBULL_REGION_IDusus
WEBULL_TOOLSETSEnabled tool categories (comma-separated). Valid values: account, instrument, market-data, tradingall enabled
WEBULL_MAX_ORDER_NOTIONAL_USDMax order notional for US market (USD)10000
WEBULL_MAX_ORDER_QUANTITYMax order quantity per order1000
WEBULL_SYMBOL_WHITELISTAllowed symbols whitelist (comma-separated)no restriction
WEBULL_TOKEN_DIRToken storage directory./conf/
WEBULL_AUDIT_LOG_FILEAudit log file pathstderr only
WEBULL_LOG_LEVELSDK log levelWARNING

For read-only access, set WEBULL_TOOLSETS=account,instrument,market-data to disable trading tools. The instrument toolset includes instruments, fundamentals, financial statements, and institution/insider data; omit it if you don't need them. Note that market-data includes watchlist and community write tools.


Security Recommendations​

  • Never share your App Key, App Secret, or Token via chat with an AI model. These credentials should only be passed to the MCP Server process via the env field in mcp.json, never as conversation content.
  • Use preview_stock_order / preview_option_order / preview_futures_order before placing orders.
  • create_community_post and create_community_comment publish content under your account. Review the text before confirming.
  • Use WEBULL_SYMBOL_WHITELIST to restrict tradable symbols.

Disclosure​

Webull Local MCP Server provides information solely for reference purposes and does not constitute investment advice. Trading in securities, options, cryptocurrencies, and other financial instruments involves substantial risk of loss. All trading decisions are made at your own discretion and risk. You are solely responsible for verifying order details before execution. This software is provided "as is" without warranty of any kind.