longbridge-mcp
Python MCP server for Longbridge OpenAPI, designed to run with uvx.
Requirements
uv- Longbridge OpenAPI credentials using only the
LONGBRIDGE_*prefix
Environment
Required:
LONGBRIDGE_APP_KEYLONGBRIDGE_APP_SECRETLONGBRIDGE_ACCESS_TOKEN
Optional Longbridge SDK passthrough:
LONGBRIDGE_LANGUAGELONGBRIDGE_HTTP_URLLONGBRIDGE_QUOTE_WS_URLLONGBRIDGE_TRADE_WS_URLLONGBRIDGE_ENABLE_OVERNIGHTLONGBRIDGE_PUSH_CANDLESTICK_MODELONGBRIDGE_PRINT_QUOTE_PACKAGESLONGBRIDGE_LOG_PATH
Server safety switch:
LONGBRIDGE_MCP_READ_ONLY=trueby default
Usage
Run from PyPI:
uvx longbridge-mcp
Run locally from this repo during development:
uvx --from . longbridge-mcp
For an MCP client configuration:
{
"mcpServers": {
"longbridge": {
"command": "uvx",
"args": ["longbridge-mcp"],
"env": {
"LONGBRIDGE_APP_KEY": "your-app-key",
"LONGBRIDGE_APP_SECRET": "your-app-secret",
"LONGBRIDGE_ACCESS_TOKEN": "your-access-token",
"LONGBRIDGE_MCP_READ_ONLY": "true"
}
}
}
}
Tool Surface
Quote tools always available:
quote-static-infoquote-realtime-infoquote-depthquote-tradesquote-intradayquote-history-candlesticksquote-capital-flowquote-capital-distributionquote-calc-indexquote-watch-listquote-security-listquote-market-temperaturequote-history-market-temperaturequote-trading-daysquote-option-chain-expiry-datesquote-option-chain-infoquote-option-quotequote-warrant-quotequote-warrant-listquote-brokersquote-participantsquote-levelquote-package-details
Trade read tools are also available by default:
trade-history-executionstrade-today-executionstrade-account-balancetrade-stock-positionstrade-cash-flowtrade-fund-positionstrade-history-orderstrade-today-orderstrade-order-detailtrade-margin-ratio
Write tools are only registered when LONGBRIDGE_MCP_READ_ONLY=false:
trade-submit-ordertrade-cancel-ordertrade-replace-orderquote-watch-list-create-groupquote-watch-list-update-groupquote-watch-list-delete-group
Notes
- Transport is stdio only.
- Output is structured JSON-like tool data, not text-wrapped JSON blobs.
- OAuth and push streaming are intentionally out of scope for this version.
Metadata
Release files for longbridge-mcp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| longbridge_mcp-0.1.3.tar.gz | 45.6 kB | Without provenance | Details for longbridge_mcp-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| longbridge_mcp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for longbridge_mcp-0.1.3-py3-none-any.whl |
Total release size: 56.3 kB
Release files / longbridge_mcp-0.1.3.tar.gz
| Download URL | longbridge_mcp-0.1.3.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab7c9f0b14aa132aaef82c35cc7ad0210e2caa3274d8f5c0d0703f7fb4f28942
|
|
BLAKE2b-256 checksum How to use checksums |
1c75a733ff006c80ac249fbc63fbece00218931fb53dc9ec8db83210b0d5ffa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / longbridge_mcp-0.1.3-py3-none-any.whl
| Download URL | longbridge_mcp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab8a4cb965e56e3b5eeb1f6b20739afabfeb49146d7553fec87745ad3b25f3f5
|
|
BLAKE2b-256 checksum How to use checksums |
e37c38efe0dedd63482a876712e75fabcc37a639adf4baddf40418cc06971339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for longbridge-mcp 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.