Longbridge MCP server
{
"mcpServers": {
"longbridge": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/longbridge/longbridge-mcp:0.9.0"
],
"env": {
"LONGBRIDGE_HTTP_URL": "https://...",
"LONGBRIDGE_GLOBAL_OAUTH_URL": "https://...",
"LONGBRIDGE_QUOTE_WS_URL": "https://...",
"LONGBRIDGE_TRADE_WS_URL": "https://...",
"LONGBRIDGE_LOG_PATH": "/path/to/directory"
}
}
}
}{
"mcpServers": {
"longbridge": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/longbridge/longbridge-mcp:0.9.0"
],
"env": {
"LONGBRIDGE_HTTP_URL": "https://...",
"LONGBRIDGE_GLOBAL_OAUTH_URL": "https://...",
"LONGBRIDGE_QUOTE_WS_URL": "https://...",
"LONGBRIDGE_TRADE_WS_URL": "https://...",
"LONGBRIDGE_LOG_PATH": "/path/to/directory"
}
}
}
}{
"mcpServers": {
"longbridge": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/longbridge/longbridge-mcp:0.9.0"
],
"env": {
"LONGBRIDGE_HTTP_URL": "https://...",
"LONGBRIDGE_GLOBAL_OAUTH_URL": "https://...",
"LONGBRIDGE_QUOTE_WS_URL": "https://...",
"LONGBRIDGE_TRADE_WS_URL": "https://...",
"LONGBRIDGE_LOG_PATH": "/path/to/directory"
}
}
}
}{
"servers": {
"longbridge": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/longbridge/longbridge-mcp:0.9.0"
],
"env": {
"LONGBRIDGE_HTTP_URL": "${input:longbridge_http_url}",
"LONGBRIDGE_GLOBAL_OAUTH_URL": "${input:longbridge_global_oauth_url}",
"LONGBRIDGE_QUOTE_WS_URL": "${input:longbridge_quote_ws_url}",
"LONGBRIDGE_TRADE_WS_URL": "${input:longbridge_trade_ws_url}",
"LONGBRIDGE_LOG_PATH": "${input:longbridge_log_path}"
}
}
},
"inputs": [
{
"id": "longbridge_http_url",
"type": "promptString",
"description": "Longbridge http url",
"password": true
},
{
"id": "longbridge_global_oauth_url",
"type": "promptString",
"description": "Longbridge global oauth url",
"password": true
},
{
"id": "longbridge_quote_ws_url",
"type": "promptString",
"description": "Longbridge quote ws url",
"password": true
},
{
"id": "longbridge_trade_ws_url",
"type": "promptString",
"description": "Longbridge trade ws url",
"password": true
},
{
"id": "longbridge_log_path",
"type": "promptString",
"description": "Longbridge log path",
"password": true
}
]
}{
"mcpServers": {
"longbridge": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/longbridge/longbridge-mcp:0.9.0"
],
"env": {
"LONGBRIDGE_HTTP_URL": "https://...",
"LONGBRIDGE_GLOBAL_OAUTH_URL": "https://...",
"LONGBRIDGE_QUOTE_WS_URL": "https://...",
"LONGBRIDGE_TRADE_WS_URL": "https://...",
"LONGBRIDGE_LOG_PATH": "/path/to/directory"
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsonversion 0.9.0
What it does
MCP server for Longbridge brokerage providing 163 tools for US and HK market access. Developers can query market data, manage orders and portfolios, access fundamentals and research, set price alerts, and execute DCA or grid trading strategies through a single OAuth-secured endpoint.
- Query real-time stock quotes, options chains, and market depth for US and HK securities.
- Submit, cancel, or modify orders and monitor portfolio positions and cash balances.
- Retrieve company fundamentals, financial statements, analyst ratings, and valuation metrics.
Tools this server exposes
| Tool | Does |
|---|---|
| quote_get_quote | Fetch real-time or historical quotes for US and HK securities. |
| quote_get_candlesticks | Retrieve candlestick data for charting and technical analysis. |
| quote_get_option_chain | Get options chain data including strikes, Greeks, and open interest. |
| trade_submit_order | Submit buy or sell orders for execution. |
| trade_cancel_order | Cancel an open order by order ID. |
| trade_get_positions | List current portfolio positions with quantities and valuations. |
| trade_get_balance | Retrieve account balance and cash available. |
| fundamental_get_financials | Access financial statements including income statements and balance sheets. |
| fundamental_get_company_info | Get company profile, executives, industry classification, and shareholder details. |
| fundamental_get_analyst_ratings | Retrieve analyst price targets and recommendation summaries. |
| alert_create_alert | Create a price alert for a security. |
| alert_get_alerts | List active price alerts on the account. |
| dca_create_plan | Create a dollar-cost averaging investment plan. |
| dca_get_plan | Retrieve details of an existing DCA plan including execution history. |
| grid_create_plan | Create a grid trading plan. |
| market_get_status | Check market open/closed status for US and HK exchanges. |
| market_get_top_movers | Get top gaining and declining securities by market. |
| ipo_get_calendar | Retrieve upcoming IPO calendar and details. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.