LongPort provides a hosted HTTP MCP (Model Context Protocol) service that lets AI coding assistants and chat tools use OpenAPI market data, account, portfolio, and trading capabilities without manually managing API keys.
https://mcp.longportapp.comIf your AI client asks for a transport type, choose HTTP or Streamable HTTP.
LongPort MCP exposes over 140+ MCP tools across OpenAPI workflows. Your client discovers available tools automatically on connect.
| Capability | Coverage |
|---|---|
| Real-time market data | Quotes, candlesticks, depth, broker queues, trades, intraday capital flow |
| Fundamentals and research | Company profiles, dividends, valuations, executive holdings, A/H premium |
| Derivatives | Option chains, warrant filters, issuers, warrant quotes |
| Account and portfolio | Balances, positions, cash flow, watchlists and groups |
| Trading | Place, modify, and cancel orders, estimate max purchase quantity |
| Automation | Price alerts and scheduled DCA plans |
Actual tool availability depends on your region, account level, and granted OAuth scopes.
Configuration format can vary across client versions. Treat your client's official MCP documentation as the source of truth. The core parameter you need is the server URL:
https://mcp.longportapp.comEnable Developer Mode, then add LongPort MCP as a custom app.
Use these values:
LongPortLongPort Developers MCP Server.https://mcp.longportapp.comRun this command in your terminal:
claude mcp add --transport http longport https://mcp.longportapp.comThen open the claude terminal interface, type /mcp, select longport, and choose Authenticate to complete OAuth authorization.
Run this command in your terminal:
codex mcp add longport --url https://mcp.longportapp.comThen follow the OAuth authorization flow in Codex when prompted.
longporthttps://mcp.longportapp.comlongport entry.LongPort MCP uses OAuth. You do not need to paste API keys or tokens into the client.
LongPort MCP requires clients that support HTTP MCP and OAuth authorization. Clients with incomplete OAuth support can fail during the authorization flow.
If a client fails to connect, check its version and MCP support documentation.