Longbridge MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Longbridge MCP or direct API to retrieve market data, check account balances and portfolio positions, place and manage trades, and execute investment workflows through natural language.

Longbridge MCP logoLongbridge MCP
Dcr Oauth

Longbridge MCP is Longbridge's OpenAPI for market data, accounts, and trading. It provides secure, standardized access to market and account information.

162 Tools

Try Longbridge MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Longbridge MCP
Try asking
TOOLS

Supported Tools

Every Longbridge MCP action and event your agent gets out of the box.

Account balance

Get account cash balance and asset summary.

Ah premium

Get A/H share premium historical K-line data.

Ah premium intraday

Get A/H share premium intraday time-share data.

Alert add

Add a price alert.

Alert delete

Delete a price alert by alert_id (numeric string from alert_list).

Alert disable

Disable a price alert by alert_id.

Alert enable

Enable a price alert by alert_id.

Alert list

Get all configured price alerts.

Anomaly

Get market anomaly alerts (unusual price/volume changes).

Bank cards

List linked withdrawal bank cards for the current account.

Broker holding

Get top broker holding data for a symbol (HK stocks only; sourced from HKEX CCASS participant disclosure).

Broker holding daily

Get daily holding history for a specific broker (by broker_id) in a symbol (HK stocks only; sourced from HKEX CCASS participant disclosure).

Broker holding detail

Get full broker holding detail list for a symbol (HK stocks only; sourced from HKEX CCASS participant disclosure).

Brokers

Get broker queue (HK stocks only).

Business segments

Get current-period business segment revenue breakdown for a symbol (name, percent, total, currency)

Business segments history

Get historical business segment revenue trends (by period and category).

Calc indexes

Calculate financial indexes for symbols.

Cancel order

Cancel an open order by order_id.

Candlesticks

Get candlestick data (OHLCV).

Capital distribution

Get capital distribution for a symbol.

Capital flow

Get capital inflow/outflow time series.

Cash flow

Get cash flow records (deposits, withdrawals, dividends).

Company

Get company overview.

Consensus

Get financial consensus estimates for upcoming periods.

Constituent

Get the constituents of an index or the asset allocation of an ETF.

Corp action

Get corporate actions (splits, buybacks, name changes).

Create watchlist group

Create a new watchlist group.

Dca check

Check whether given symbols support DCA recurring investment.

Dca create

Create a DCA recurring investment plan.

Dca history

Get execution history records for a DCA plan by plan_id.

Dca list

List DCA recurring investment plans.

Dca pause

Pause (suspend) a DCA plan by plan_id.

Dca resume

Resume a suspended DCA plan by plan_id.

Dca stats

Get DCA investment statistics.

Dca stop

Permanently stop a DCA plan by plan_id.

Dca update

Update an existing DCA plan by plan_id.

Delete watchlist group

Delete a watchlist group by id (numeric).

Deposits

List deposit history for the current account.

Depth

Get order book depth for a symbol.

Dividend

Get dividend history for the symbol.

Dividend detail

Get detailed dividend distribution scheme.

Estimate max purchase quantity

Estimate maximum buy/sell quantity for a symbol.

Exchange rate

Get exchange rates for all supported currencies.

Executive

Get company executive and board member information.

Filings

Get regulatory filings (8-K, 10-Q, 10-K, etc.

Finance calendar

Finance calendar by category: report (earnings) / dividend / split / ipo / macrodata (CPI, NFP, rates) / closed (holidays).

Financial report

Get financial reports (income statement, balance sheet, cash flow).

Financial report latest

Get the latest financial report summary for a security.

Financial report snapshot

Get financial report snapshot: report_desc (text summary), fo_revenue/fo_ebit/fo_eps (actual vs forecast with yoy/cmp), fr_* financial ratios (ROE, margins, assets, cash flow).

Financial statement

Get financial statements (income statement, balance sheet, or cash flow) for a security.

Forecast eps

Get EPS forecast and analyst estimate history.

Fund holder

Get funds and ETFs that hold a given symbol.

Fund positions

Get current fund positions.

Grid cancel

Cancel (terminate) a grid order by order_id.

Grid detail

Full detail for one grid order: rule parameters, status, embedded child orders (grid_sub_orders) and lifecycle history (grid_order_history).

Grid list

List grid trading orders.

Grid list by ids

Fetch specific grid orders by their IDs.

Grid questionnaire

Record the one-time grid strategy risk-disclosure consent required before submitting grid orders.

Grid replace

Replace an existing grid order's rule by order_id.

Grid restart

Restart (resume) a suspended grid order by order_id.

Grid submit

Submit a grid trading order.

Grid suspend

Suspend (pause) a running grid order by order_id.

Grid symbol info

Pre-trade grid setup info for a security (takes a symbol, not an order_id): security name, last price, board lot sizes (buy/sell), price-step (bid_size) table, and channel/authorization info (strategy grant flag, RTH support, supported s.

Grid trigger history

Trigger history for one grid order: each triggered child order with price, quantity, executed price/qty, and trigger time.

History candlesticks by date

Get historical candlestick data by date range.

History candlesticks by offset

Get historical candlestick data by offset from a reference time.

History executions

Get historical trade executions between dates.

History market temperature

Get historical market temperature time series.

History orders

Get historical orders between dates (excludes today).

Industry peers

Hierarchical sub-sector tree for an industry group.

Industry rank

Industry ranking list by market (US/HK/CN/SG) and indicator (0=领涨/1=今日走势/2=人气/3=市值/4=营收/5=营收增长率/6=净利润/7=净利润增长率).

Industry valuation

Get industry valuation comparison for peers.

Industry valuation dist

Get industry PE/PB/PS valuation distribution.

Institutional views

Get monthly institutional rating distribution timeline.

Institution rating

Get institution rating summary.

Institution rating detail

Get detailed historical institution ratings and target price history.

Institution rating history

Get institution rating history.

Institution rating industry rank

Get peers ranked by institution analyst ratings in the same industry.

Intraday

Get intraday minute-by-minute price/volume data.

Invest relation

Get investor relations events and announcements.

Ipo calendar

Show the IPO calendar.

Ipo detail

Show IPO detail for a symbol.

Ipo listed

List recently listed IPO stocks (HK+US).

Ipo order detail

Show detailed information for a specific IPO order by order_id.

Ipo orders

List IPO orders (active+history).

Ipo profit loss

Show IPO profit/loss summary and per-stock breakdown.

Ipo subscriptions

List IPO stocks in subscription/pre-filing stage (HK+US).

Macrodata

Get historical observations for one macro-economic indicator.

Macrodata indicators

List macro-economic indicators.

Margin ratio

Get margin ratio for a symbol.

Market status

Get current market trading status for all markets.

Market temperature

Get current market sentiment temperature.

News

Get latest news articles for a symbol.

News detail

Get one news article's full detail by id (from news/news_search).

News search

Search news articles by keyword.

Now

Get current UTC time as an RFC3339 string (e.

Operating

Get company operating metrics (HK stocks only).

Option chain expiry date list

Get option chain expiry dates for a symbol (e.

Option chain info by date

Get option chain for an expiry date.

Option quote

Get option quotes (max 500 symbols).

Option volume

Get real-time option call/put volume stats for a US stock.

Option volume daily

Get daily historical option stats for a US stock.

Order detail

Get detailed information about a specific order.

Participants

Get HK market participant broker information.

Profit analysis

Get portfolio profit and loss analysis summary.

Profit analysis detail

Get detailed profit and loss analysis for a specific symbol.

Quant run

Run a quant indicator script against historical K-line data on the server.

Quote

Get latest price quotes.

Rank categories

Get rank tab category configurations for the popularity leaderboard.

Rank list

Get ranked stock list by leaderboard tab key.

Replace order

Modify an open order's quantity, price, trigger_price, or trailing params.

Screener indicators

Get all available screener indicator keys with units and default value ranges.

Screener recommend strategies

List platform-preset screener strategies.

Screener search

Screen stocks.

Screener strategy

Inspect a screener strategy's filter conditions before running it.

Screener user strategies

List the current user's saved screener strategies.

Security facts

List a security's fact (catalyst) events — anomaly detections, factor readings, data sources and natural-language summaries — filtered by time range and count.

Security list

Get security list for a market.

Shareholder

Get institutional shareholders for a symbol.

Shareholder detail

Get a single shareholder's holding and trade history.

Shareholder top

Get Top 20 major shareholders (institutions, individuals, insiders) across reporting periods.

Sharelist add

Add securities to a community sharelist by id.

Sharelist create

Create a new community sharelist with a name and optional description.

Sharelist delete

Delete a community sharelist by id (own lists only; subscribed lists cannot be deleted).

Sharelist detail

Get community sharelist detail by id.

Sharelist list

List user's own and subscribed community sharelists.

Sharelist popular

Get popular/trending community sharelists.

Sharelist remove

Remove securities from a community sharelist by id.

Sharelist sort

Reorder securities in a community sharelist by id.

Short margin

Get short margin deposit details for the current account.

Short positions

Get short interest history (open short positions) for HK or US stocks.

Short trades

Get daily short-sale volume history for HK or US stocks.

Signal detail

Get one signal by ID (from `signals`).

Signals

Query strategy signals — a strategy's take on a security, triggered by a catalyst.

Statement export

Get a pre-signed download URL for a statement data file (obtained from statement_list).

Statement list

List available account statements (daily/monthly).

Static info

Get static info for securities.

Stock positions

Get current stock positions across all channels.

Submit order

Submit a buy/sell order.

Today executions

Get today's trade executions (fills).

Today orders

Get orders placed today.

Topic

Get discussion topics for a symbol.

Topic create

Create a new discussion topic.

Topic create reply

Create a reply to a discussion topic.

Topic detail

Get discussion topic detail by topic_id.

Topic replies

Get replies to a discussion topic, paginated (page default 1, size default 20, range 1-50)

Topic search

Search community topics/posts by keyword.

Top movers

Get stocks whose price fluctuation exceeds the 20-trading-day standard deviation, with correlated news reasons.

Trades

Get recent trades (max 1000).

Trade stats

Get trade statistics (buy/sell/neutral volume distribution).

Trading days

Get trading days for a market between dates.

Trading session

Get trading session schedule for all markets.

Update watchlist group

Update a watchlist group by id.

Valuation

Get valuation overview with peer comparison.

Valuation comparison

Stock valuation comparison.

Valuation history

Get detailed valuation history time series.

Valuation rank

Get daily valuation rank (PE/PB/PS/dividend yield industry percentile) for a security over a date range.

Warrant issuers

Get HK warrant issuer information.

Warrant list

Get filtered warrant list for an underlying symbol.

Warrant quote

Get warrant quotes.

Watchlist

Get all watchlist groups and their securities.

Withdrawals

List withdrawal history for the current account.

SETUP GUIDE

Connect Longbridge MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Install the Composio SDK for Python or TypeScript
2

Initialize Client and Create Tool Router Session

typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });
const session = await composio.create('your-user-id');
console.log(`Tool Router session created: ${session.mcp.url}`);
Import and initialize the Composio client, then create a Tool Router session for Longbridge MCP
3

Connect to AI Agent

typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: session.mcp.url,
    headers: {
      'x-api-key': 'your-composio-api-key',
    },
  },
});

const tools = await client.tools();
const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{
    role: 'user',
    content: 'YOUR_SPECIFIC_PROMPT_HERE'
  }],
  maxSteps: 5,
});

console.log(`Agent: ${text}`);
Use the MCP server with your AI agent (Anthropic Claude or Mastra)
SETUP GUIDE

Connect Longbridge MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/openai
Install the Composio SDK
2

Initialize Composio and Create Tool Router Session

typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
Import and initialize Composio client, then create a Tool Router session
3

Execute Longbridge MCP Tools via Tool Router with Your Agent

typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'YOUR_SPECIFIC_PROMPT_HERE'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
Get tools from Tool Router session and execute Longbridge MCP actions with your Agent

Why Use Composio?

AI Native Longbridge MCP Integration

  • Supports both Longbridge MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Longbridge MCP data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Longbridge MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Longbridge MCP
  • Scoped, least privilege access to Longbridge MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use Longbridge MCP with any AI Agent Framework

Choose a Framework you want to connect Longbridge MCP with

FAQ

Frequently asked questions

Yes, Longbridge MCP requires you to configure your own Dcr Oauth credentials. Once set up, Composio handles secure credential storage and management for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Start with Longbridge MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Longbridge MCP tool your agent needs.Free to start.

Start building