longportapp

LongPort MCP

Community longportapp
Updated

LongPort OpenAPI SDK Base.

LongPort MCP

A MCP server implementation for LongPort OpenAPI, provides real-time stock market data, provides AI access analysis and trading capabilities through MCP.

Features

  • Trading - Create, amend, cancel orders, query today’s/past orders and transaction details, etc.
  • Quotes - Real-time quotes, acquisition of historical quotes, etc.
  • Portfolio - Real-time query of the account assets, positions, funds

Installation

Download the binary

Download the latest binary from the Releases page.

Running on Cursor

To configure LongPort MCP in Cursor:

  • Open Cursor Settings
  • Go to Features > MCP Servers
  • Click + Add New MCP Server
  • Enter the following:
    • Name: longport-mcp (or your preferred name)
    • Type: command
    • Command: env LONGPORT_APP_KEY=your-app-key LONGPORT_APP_SECRET=your-app-secret LONGPORT_ACCESS_TOKEN=your-access-token longport-mcp

If you are using Windows, replace command with cmd /c "set LONGPORT_APP_KEY=your-app-key && set LONGPORT_APP_SECRET=your-app-secret && set LONGPORT_ACCESS_TOKEN=your-access-token && longport-mcp"

Running on Cherry Studio

To configure LongPort MCP in Cherry Studio:

  • Go to Settings > MCP Servers
  • Click + Add Server
  • Enter the following:
    • Name: longport-mcp (or your preferred name)
    • Type: STDIO
    • Command: env LONGPORT_APP_KEY=your-app-key LONGPORT_APP_SECRET=your-app-secret LONGPORT_ACCESS_TOKEN=your-access-token longport-mcp

If you are using Windows, replace command with cmd /c "set LONGPORT_APP_KEY=your-app-key && set LONGPORT_APP_SECRET=your-app-secret && set LONGPORT_ACCESS_TOKEN=your-access-token && longport-mcp"

Running as a SSE server

env LONGPORT_APP_KEY=your-app-key LONGPORT_APP_SECRET=your-app-secret LONGPORT_ACCESS_TOKEN=your-access-token longport-mcp --sse

Default bind address is 127.0.0.1:8000, you can change it by using the --bind flag:

longport-mcp --sse --bind 127.0.0.1:3000

Configuration

Enable logging

To enable logging, set the flag --log-dir to the directory where you want to store the logs:

longport-mcp --log-dir /path/to/log/dir

MCP Server · Populars

MCP Server · New

    apify

    mcp.apify.com

    Apify MCP server (tools for web scraping, data extraction, and automation)

    Community apify
    ergut

    MCP server for LogSeq

    MCP server to interact with LogSeq via its Local HTTP API - enabling AI assistants like Claude to seamlessly read, write, and manage your LogSeq graph.

    Community ergut
    call518

    MCP PostgreSQL Operations Server

    Professional MCP server for PostgreSQL operations & monitoring: 30+ extension-independent tools for performance analysis, table bloat detection, autovacuum monitoring, schema introspection, and database management. Supports PostgreSQL 12-17.

    Community call518
    pulsemcp

    Hatchbox MCP Server

    MCP (Model Context Protocol) Servers authored and maintained by the PulseMCP team. We build reliable servers thoughtfully designed specifically for MCP Client-powered workflows.

    Community pulsemcp
    snyk

    Getting started with the Snyk CLI

    Snyk CLI scans and monitors your projects for security vulnerabilities.

    Community snyk