A MCP server implementation for LongPort OpenAPI, provides real-time stock market data, provides AI access analysis and trading capabilities through MCP.
A MCP server implementation for LongPort OpenAPI, provides real-time stock market data, provides AI access analysis and trading capabilities through MCP.
Download the latest binary from the Releases page.
To configure LongPort MCP in Cursor:
+ Add New MCP Server
longport-mcp
(or your preferred name)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"
To configure LongPort MCP in Cherry Studio:
+ Add Server
longport-mcp
(or your preferred name)STDIO
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"
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
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