Trade Vietnamese stocks right inside Claude — place orders, check balances, review your DNSE · SSI · TCBS portfolio. The bridge runs on your machine: broker keys never leave it, never touch Algolab servers.
npx -y mcp-trading link
Run in your terminal (needs Node.js 18+). npm package mcp-trading · open source: github.com/algolabx/mcp-trading · for market data to analyse with, add the Data MCP.
Connect
Keys are typed in the terminal, never pasted into chat.
npx -y mcp-trading link dnse # API Key + Secret (LightSpeed OpenAPI) + email OTP npx -y mcp-trading link ssi # ConsumerID + Secret + số tiểu khoản npx -y mcp-trading link tcbs # API Key iFlash — tiểu khoản tự phát hiện npx -y mcp-trading status # đã liên kết gì (không in khoá)
claude mcp add --scope user mcp-trading -- \ npx -y -p mcp-trading mcp-trading-server
Type /mcp to check — seeing mcp-trading means you're done.
{
"mcpServers": {
"mcp-trading": {
"command": "npx",
"args": ["-y", "-p", "mcp-trading", "mcp-trading-server"]
}
}
}
Config loads only at startup — after saving you must Quit and reopen Claude Desktop.
Examples
Just talk — Claude picks the bridge tools. Money orders always ask you first.
Show my DNSE balance and holdings
Available cash, total assets, tickers held and quantities. DNSE account reads need no OTP.
How is my portfolio doing?
Claude pairs the cost basis in your account with live prices from the Data MCP → P/L per ticker and overall.
Evaluate the stocks I hold
With the Data MCP: P/E · P/B valuation, RS/MACD signals, news and broker targets per ticker → the data to decide what to keep or rotate.
I want to trade
Claude asks for an OTP (email / Smart OTP / iOTP) to open an 8-hour trading session — only when you want to trade.
Sell 100 GEL at 30,000
Claude shows a preview (ticker, side, quantity, price, value) — nothing sent yet. Say “go ahead” and only then the order goes out.
Today's orders · Cancel that order
See pending / filled orders; cancelling needs the same 2-step confirmation.
Tools
Read accounts, balances, holdings and orders; place and cancel orders with 2-step confirmation.
bridge_statusWhich brokers are linked on this machine and which trading sessions are still open. Never prints keys.
get_broker_accountsSub-accounts at the broker (SSI/TCBS ask the broker directly for the exact numbers).
get_broker_balanceCash, buying power, total assets.
get_broker_positionsHoldings: ticker, quantity, cost basis.
get_broker_ordersToday's order book: pending, filled, cancelled.
request_broker_otpAsk the broker for an OTP (DNSE: email) or guide you to Smart OTP / iOTP in the app.
submit_broker_otpSubmit the OTP to open a trading session: DNSE 8h trading token · SSI access + refresh · TCBS 8h JWT.
place_broker_orderReal order — 2 steps: preview (nothing sent) → you confirm → only confirm=true goes out.
cancel_broker_orderCancel an order — same 2-step confirmation as placing.
Supported brokers
Each broker has its own API key — get it in the broker's web or app.
DNSEKey: LightSpeed API Key + Secret (webtrading → Personal info → LightSpeed API; pick Email OTP for layer 2). Account reads need no OTP; orders unlock with Smart OTP or email OTP.
SSIKey: ConsumerID + Secret + sub-account number (iBoard → API Services). One OTP covers reads and orders, then auto-renews. Orders are signed with a keypair generated on your machine — paste the public key into iBoard once.
TCBSKey: iFlash API Key (TCInvest app → iFlash Open API). iOTP in the app opens an 8h session; the sub-account is detected automatically.
Safety
The bridge only talks to brokers, never to Algolab — check it yourself with verify.
~/.algolab/mcp-broker.json (mode 600); no tool accepts or returns a key — the only way in is the link command in your terminal.npx -y mcp-trading verify scans every network address in the running code; the source is open to read.npx -y mcp-trading unlink dnse removes it from your machine; revoking the key at the broker kills it everywhere. Broker API keys cannot withdraw money.Payments are under maintenance
The Algolab.vn payment system is currently undergoing maintenance and upgrades. Please contact us on Zalo at 08253 88868 and our team will assist you with your subscription. Thank you.