# mcp

Connects Claude Code and other MCP clients to Longbridge for quotes, options, portfolio data, and US and HK market tools.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: longbridge
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/longbridge/longbridge-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/longbridge-mcp

## What it does

This server connects an MCP client to Longbridge through a hosted HTTP endpoint. An agent can work with quotes, options, orders, fundamentals, screeners, IPO data, alerts, DCA plans, grid trading, and portfolio analytics for US and HK markets.

OAuth 2.1 handles access, while requests pass the bearer token to the Longbridge SDK without server-side sessions or a database. Responses use typed fields, and the optional `_jq` argument filters returned JSON with an embedded jq-compatible engine. A Longbridge account sign-in is required before OAuth access to the data and account tools works.

## Requirements
- Needs: Docker
- Remote server: `https://mcp.longbridge.com`
- Environment variables: `LONGBRIDGE_HTTP_URL`, `LONGBRIDGE_QUOTE_WS_URL`, `LONGBRIDGE_TRADE_WS_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http longbridge-mcp https://mcp.longbridge.com
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add longbridge-mcp --url https://mcp.longbridge.com
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "longbridge-mcp": {
            "url": "https://mcp.longbridge.com"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "longbridge-mcp": {
            "type": "http",
            "url": "https://mcp.longbridge.com"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http longbridge-mcp https://mcp.longbridge.com
```

## When to use it
- fetch US and HK stock quotes
- compare company fundamentals
- screen stocks by conditions
- check IPO listings and price alerts
- inspect Longbridge portfolio positions

## Example prompts
- Compare the latest quotes for `AAPL.US` and `MSFT.US`.
- Find IPOs listed for the HK market this week.
- Show my Longbridge positions and group them by market.

## Similar
- [longbridge](https://affpapa.org/en/nevibecode/skills/longbridge.md) — skill · 4300 installs
- [longbridge-market-data](https://affpapa.org/en/nevibecode/skills/longbridge-market-data.md) — skill · 3300 installs
- [pp-yahoo-finance](https://affpapa.org/en/nevibecode/skills/pp-yahoo-finance.md) — skill · 648 installs
- [llmquant-risk](https://affpapa.org/en/nevibecode/skills/llmquant-risk.md) — skill · 528 installs
- [stock-scanner-mcp](https://affpapa.org/en/nevibecode/mcp/stock-scanner-mcp.md) — MCP server · ★ 8
- [financial-analysis-agent](https://affpapa.org/en/nevibecode/skills/financial-analysis-agent.md) — skill · 1300 installs

## Other versions with the same name
- [mcp · kubeshark](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — ★ 12110
- [mcp · butterbase-ai](https://affpapa.org/en/nevibecode/mcp/butterbase-ai-mcp.md) — ★ 3031
- [mcp · medplum](https://affpapa.org/en/nevibecode/mcp/mcp.md) — ★ 2766
- [mcp · sceneview](https://affpapa.org/en/nevibecode/mcp/sceneview-mcp.md) — ★ 1349
- [mcp · buoy-gg](https://affpapa.org/en/nevibecode/mcp/buoy-gg-mcp.md) — ★ 691

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
