A uvx-runnable MCP server for Longbridge OpenAPI
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file longbridge_mcp-0.1.2.tar.gz.
File metadata
- Download URL: longbridge_mcp-0.1.2.tar.gz
- Upload date:
- Size: 45.3 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a72d3b1945220cb7214374884a47af2ba33e7f066767d19919ab4f155cdc72a1
|
|
| MD5 |
6c03653d0e70140bc5c06a49113b1ace
|
|
| BLAKE2b-256 |
05a155333c9f7ef954e7c3324df316472190ade6d173db66466b3ef9e22c47cc
|
File details
Details for the file longbridge_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: longbridge_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b510ff5280cb2b9df8ceadc0818cafd57c0ae2eb07a6645b9190c38ec2350ebb
|
|
| MD5 |
4e3eb87c2ec3499d7451bd77cf67e3b5
|
|
| BLAKE2b-256 |
63c7e3a551e9774f953784bbcf30cd1496d1019f82398308b706f48044002d2f
|