lb-mcp-ui-proxy
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lb-mcp-ui-proxyShow me Tesla's current stock quote."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Longbridge MCP-UI Proxy
An MCP (Model Context Protocol) proxy server that wraps the Longbroker OpenAPI MCP server and transforms its plain JSON responses into rich, interactive HTML dashboards — stock cards, candlestick charts, portfolio views, order forms, option chains, and more.
Built on the MCP-UI specification so any MCP host that renders ui:// resources (Goose, Claude Desktop, etc.) gets visual UIs instead of raw JSON.
Quick start
# 1. Install dependencies
npm install
# 2. Set your Longbridge token
export LONGBRIDGE_TOKEN="your_token_here"
# Generate a token at https://open.longbridge.com/connect
# 3. Run in dev mode (auto-restart on changes)
npm run dev
# 4. Or build and run production
npm run build
npm startThe server starts on http://localhost:3456 by default.
Related MCP server: sfc-data-mcp
Docker
docker build -t lb-mcp-ui-proxy .
docker run -p 3456:3456 -e LONGBRIDGE_TOKEN=your_token lb-mcp-ui-proxyConfiguration
All config is via environment variables (see .env.example):
Variable | Default | Description |
|
| Server listen port |
|
| Longbridge MCP backend URL |
| (required) | Bearer token for Longbridge API |
|
| Logging verbosity: |
How it works
┌──────────┐ MCP (Streamable HTTP) ┌──────────────────┐ MCP (Streamable HTTP) ┌──────────────────┐
│ MCP Host │ ◄───────────────────────► │ lb-mcp-ui-proxy │ ◄───────────────────────► │ Longbridge MCP │
│ (Goose, │ ui:// HTML resources │ (this server) │ JSON tool calls │ (openapi. │
│ Claude) │ │ │ │ longbridge.com) │
└──────────┘ └──────────────────┘ └──────────────────┘An MCP host connects to this proxy at
POST /mcpusing the Streamable HTTP transport.The proxy exposes 11 UI-enhanced tools (prefixed
lb_).When the host calls a tool, the proxy:
Opens a session to the real Longbridge MCP server.
Forwards the tool call (e.g.
get_quote→ Longbridge).Parses the JSON response.
Renders an interactive HTML dashboard via
@mcp-ui/server'screateUIResource.Returns the HTML as a
ui://longbridge/...resource that the host renders.
Tools
Proxy tool | Longbridge tool | UI |
|
| Stock card with price, change, OHLCV, amplitude bar |
|
| Canvas-rendered candlestick chart with volume bars |
|
| Search results table with symbol, name, exchange |
|
| Portfolio dashboard with P&L, positions table |
|
| Orders table with status badges |
|
| Interactive order form or direct order with confirmation |
|
| Color-coded calls/puts table with Greeks |
|
| Alerts list with toggle switches |
|
| Market indices and status (text) |
|
| DCA plans dashboard with progress cards |
Tool parameters
All tools accept their parameters as Zod-validated fields. Examples:
# Get a quote for Tesla
lb_quote(symbol: "TSLA.US")
# Candlestick chart
lb_chart(symbol: "TSLA.US", period: "1d", count: 100)
# Place a limit order
lb_place_order(symbol: "TSLA.US", side: "buy", type: "limit", price: 250.00, quantity: 10)
# Show the interactive order form
lb_place_order(_showForm: true)API endpoints
Endpoint | Method | Description |
|
| MCP Streamable HTTP endpoint (session-based) |
|
| Health check — returns status, version, config check |
Project structure
src/
├── index.ts # Express server, MCP endpoint, session management
├── config.ts # Environment variable config loader
├── longbridge-client.ts # MCP client wrapper for Longbridge backend
├── tools/
│ └── register.ts # Tool definitions — wires params → Longbridge → UI
└── ui/
├── styles.ts # Shared CSS, HTML page wrapper, formatting helpers
├── quotes.ts # Quote card + search results
├── chart.ts # Candlestick chart (canvas)
├── portfolio.ts # Portfolio dashboard + positions table
├── orders.ts # Orders table + order form + confirmation
├── options.ts # Option chain + price alerts
└── dca.ts # DCA plans dashboardDevelopment
# Dev server with hot reload
npm run dev
# Type-check only
npx tsc --noEmit
# Build for production
npm run buildTech stack
Runtime: Node.js 22, TypeScript (ESM)
MCP SDK:
@modelcontextprotocol/sdk(Streamable HTTP transport, both client and server)UI rendering:
@mcp-ui/server(createUIResourcewith raw HTML)Web server: Express + CORS
Validation: Zod (tool parameter schemas)
Container: Docker (multi-stage build, Alpine)
License
Private — not yet licensed for distribution.
This server cannot be deployed
Maintenance
Related MCP Connectors
TradeOS MCP: ticker search, My Agent, chart TA, macro news. npm stdio or HTTP.
7-factor stock scoring MCP server. US/HK/CN, 74 stocks. Free + Premium (USDC/Base). x402 ready.
MCP server giving AI agents one-connection access to China A-share market intelligence: financials,
Finnhub MCP — wraps Finnhub Stock API (finnhub.io)
Related MCP Servers
- AlicenseBqualityDmaintenanceProfessional financial data MCP server integrating Tushare API, providing real-time financial data and technical indicators analysis for stocks, indices, funds, bonds, and cryptocurrencies across multiple markets (A-share, US, HK, crypto).18104 npmMIT
- FlicenseNot gradedqualityDmaintenanceMCP server that wraps SFC financial data API into 32 tools for comprehensive A-share market data, including real-time quotes, rankings, limit-up statistics, news, themes, financials, charts, research reports, and watchlists.-
- FlicenseNot gradedqualityDmaintenanceA production-grade MCP server that provides tools to fetch historical stock data, company information, and technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands) via yfinance, and includes a Flask web dashboard for visual analysis.-
- AlicenseBqualityBmaintenanceMCP server exposing 43 financial data tools for A-share, HK, US stocks, crypto, and market news via open-stock-data.4314MIT