Longbridge OpenAPI MCP
v1.0.0Official Longbridge hosted MCP (110+ tools). Web integration requires an OAuth access token in Profile → MCP Credentials — not the Legacy Access Token from Developer Center → API Keys. OpenAPI access is free; quote entitlements and trading fees follow Longbridge account rules.
§ Connection Config
Paste the raw access_token from authenticate (usually eyJ…) — no Bearer prefix. Do NOT use: (1) Legacy Token from Developer Center → API Keys (m_ey…); (2) Auth Code from Connect (exchange first). Valid ~14 days (expires_in: 1209600 s); re-exchange and update when expired — the site does not auto-refresh.
Detailed steps (MCP Inspector)
- In PowerShell run: npx @modelcontextprotocol/inspector
- Open Inspector in the browser. Set Transport to Streamable HTTP and Connection Type to Direct.
- URL: https://mcp.longbridge.cn/agent (use .com outside mainland). Leave Custom Headers off, then Connect.
- Open the Tools tab at the top, select authenticate in the tool list, paste the full Connect code into auth_code, then Run Tool (auth_code goes in tool arguments, not HTTP headers).
- Copy access_token from Structured Content in the result into the field above (token only, no Bearer).
§ Quickstart
Add the following to your MCP client configuration (Cursor, Claude Desktop, etc.):
Settings → Tools & MCP → Add Remote MCP Server. OAuth browser flow starts on first tool call.
Client must fully support MCP OAuth 2.1. Mainland China users may use https://mcp.longbridge.cn for faster access.
MCP Client Configuration
{
"mcpServers": {
"longbridge": {
"url": "https://openapi.longbridge.com/mcp"
}
}
}§ Tools Reference
5 tools
quote_realtime
Get real-time quote
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | ✓ | e.g. AAPL.US |
quote_candlesticks
Get historical candlesticks
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | ✓ | Symbol |
fundamental_financial_reports
Get financial reports and fundamentals
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | ✓ | Symbol |
market_calendar
Get earnings, dividends, IPO calendar events
portfolio_analysis
Portfolio P/L and analysis
§ Examples
Once configured, you can ask the AI directly:
HK vs US
Get latest quotes and P/E ratios for Tencent (00700.HK) and Alibaba (BABA.US)
Cross-market quote lookup
Option chain
List AAPL near-term option chain and find highest volume calls
Derivatives data example
LadleAgent