claude mcp add longport-mcp -- npx -y longport-mcp
A pasteable skeleton generated from the repository name. Check the project README for the exact package and arguments.
Star count
3 โ ยท longportapp/longport-mcp ยท read from the repository page ยท (checked 2026-10-16 20:00:20)
Source
collected from the punkpeye/awesome-mcp-servers list ยท type: MCP server
Harvest history
first seen 2026-10-09 ยท last seen 2026-10-16 ยท seen 32ร ยท listed by 7 sources
Score
score 703 ยท 3 โ ยท 7 sources ยท mcp
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: MCP ๆๅก. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository longportapp/longport-mcp๏ผfirst catalogued 2026-10-09๏ผlast seen 2026-10-16ใThere is no official certification or quality rating here โ we record sources and dates only.
Official MCP server for the LongPort brokerage. **145 tools** across real-time quotes, options, order routing, fundamentals, analyst ratings, calendars, IPO, price alerts, DCA plans, portfolio analytics and community sharelists โ covering **US and HK markets**. Built with Rust using rmcp and axum. Features - **145 MCP tools** across 13 categories: quotes, trading, fundamentals, screener, market data, calendars, IPO, portfolio, alerts, content, account statements, DCA, and community sharelists - **Stateless architecture** -- each request carries a Bearer token forwarded directly to the LongPort SDK; no server-side sessions or database - **OAuth 2.1 resource metadata** compliant with RFC 9728, pointing clients to LongPort OAuth for authorization - **JSON response transformation** -- field names normalized to snake_case, timestamps converted to RFC 3339, internal counter_id values mapped to human-readable symbols - **Prometheus metrics** for monitoring tool calls, latency, and errors - **Configurable** via CLI arguments or a JSON config file (CLI takes precedence) Connect from an MCP client LongPort operates a hosted endpoint at https://mcp.longportapp.com, so most users don't need to run their own server โ just point your MCP client at it and complete OAuth when prompted. Authorization is auto-discovered via RFC 9728. Claude Desktop Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your OS: Restart Claude Desktop. On first tool invocation it will open a browser to complete the LongPort OAuth flow. Claude Code Zed Add to your Zed settings.json (open with zed: open settings): On first use, Zed will open a browser to complete the LongPort OAuth flow. Cursor / Cline / Windsurf / other MCP clients Point the client at https://mcp.longportapp.com using transport streamable-http. OAuth is auto-discovered via RFC 9728; no manual token required. --- Self-hosting Prefer running your own instance? Use Docker or build from source. Docker (recommended) > **Important:** When deploying to a public network, you **must** set --base-url to the externally reachable URL of your server (e.g. https://mcp.example.com). This URL is returned in the OAuth protected resource metadata and used by MCP clients to discover the authorization server. If not set, it defaults to http://localhost:{port} which will not work for remote clients. Build from source Configure Create a config file at ~/.longport/mcp/config.json (optional): Configuration | Option | Config Key | CLI Flag | Default | Description | |--------|-----------|----------|---------|-------------| | Bind address | bind | --bind | 127.0.0.1:8000 | HTTP server listen address | | Base URL | base_url | --base-url | auto | Public base URL for resource metadata | | Log directory | log_dir | --log-dir | *(stderr)* | Directory for rolling log files | | TLS certificate | tls_cert | --tls-cert | *(none)* | PEM certificate file for HTTPS | | TLS private key | tls_key | --tls-key | *(none)* | PEM private key file for HTTPS | CLI arguments override config file values. The config file is read from ~/.longport/mcp/config.json (override with LONGPORT_MCP_CONFIG_DIR). When tls_cert and tls_key are both set, the server runs HTTPS. Otherwise it falls back to HTTP. The base_url defaults to https://localhost:{port} with TLS or http://localhost:{port} without. Environment Variables These are **advanced settings** โ most users do not need to change them. They are primarily useful for connecting to non-production LongPort environments or debugging SDK internals. | Variable | Default | Description |