Provides real-time stock quotes, trading, portfolio, and market data via an MCP server with multi-language SDKs.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
One-click editor setup isn’t available for this listing yet — we don’t have a confirmed install command, and we’d rather show nothing than point your editor at the wrong package or host. Follow the project’s own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Openapi.
Longport OpenAPI provides programmatic quote trading interfaces for investors with research and development capabilities and assists them to build trading or quote strategy analysis tools based on their own investment strategies. The functions fall into the following categories:
This repo contains the following main components:
| Name | Document | Description |
|---|---|---|
| Rust | Doc | Longport OpenAPI for Rust (>= 1.89.0) |
| Python | Doc | Longport OpenAPI for Python 3 (>= 3.8) |
| Node.js | Doc | Longport OpenAPI for Node.js (>= 10) |
| Java | Doc | Longport OpenAPI for Java (>= 11) |
| C | Doc | Longport OpenAPI for C (>= C99) |
| C++ | Doc | Longport OpenAPI for C++(>= C++17) |
| Go | https://github.com/longportapp/openapi-go | |
| MCP | An MCP server implementation for Longport OpenAPI |
| Context | Description |
|---|---|
QuoteContext | Real-time quotes, candlesticks, options, warrants, watchlists, push subscriptions |
TradeContext | Orders, positions, account balance, executions, cash flow |
AssetContext | Account statement download |
ContentContext | News, community topics |
FundamentalContext | Financial reports, analyst ratings, dividends, valuation, company overview, shareholders |
MarketContext | Market status, broker holdings, A/H premium, trade statistics, anomaly alerts, index constituents |
CalendarContext | Financial calendar (earnings, dividends, splits, IPOs, macro data, market closures) |
PortfolioContext | Exchange rates, portfolio P&L analysis |
AlertContext | Price alert management (add/enable/disable/delete) |
DCAContext | Dollar-cost averaging plan management |
SharelistContext | Community sharelist management |
Pick a language SDK from the table above and follow its README for install and first request. Full reference docs: https://longportapp.github.io/openapi
https://longportapp.github.io/openapi
export ... only affects the current shell session.setx ... requires opening a new terminal/session to take effect.LONGPORT_APP_KEY, LONGPORT_APP_SECRET, LONGPORT_ACCESS_TOKEN are correct and not expired.LONGPORT_HTTP_URL, LONGPORT_QUOTE_WS_URL, LONGPORT_TRADE_WS_URL.LONGPORT_LOG_PATH.LONGPORT_PRINT_QUOTE_PACKAGES=true to confirm opened quote packages.If you're not sure whether your environment / credentials are correct, start with the built-in HTTP client examples.
Python:
Node.js:
Rust:
Java (from the example module directory):
C/C++:
examples/c/http_client/main.c and examples/cpp/http_client/main.cpp.Expected results:
LONGPORT_APP_KEY, LONGPORT_APP_SECRET, LONGPORT_ACCESS_TOKEN.Licensed under either of
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/longportapp-openapi)<a href="https://allmcps.com/mcp/longportapp-openapi"><img src="https://allmcps.com/api/badge/longportapp-openapi?style=directory" alt="Openapi on AllMCPs" /></a>