npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-trading

v1.0.0

Published

MCP server chạy local để giao dịch chứng khoán Việt Nam (DNSE · SSI · TCBS) — khoá API nằm nguyên trên máy bạn, không qua chat AI, không qua server bên thứ ba.

Readme

mcp-trading

English: Local MCP server (stdio) for trading Vietnamese stocks on DNSE, SSI and TCBS from Claude or any MCP client. Broker API keys stay on your machine (~/.algolab, chmod 600) and requests are signed locally from your own IP. 9 tools: bridge_status, get_broker_accounts, get_broker_balance, get_broker_positions, get_broker_orders, request_broker_otp, submit_broker_otp, place_broker_order, cancel_broker_order. Orders are always two-step (preview → explicit confirm). Link a broker with npx -y mcp-trading link, then add npx -y -p mcp-trading mcp-trading-server to your MCP client. For Vietnamese market data (prices, financials, broker research, macro) use the hosted Algolab MCP. License: MIT.

MCP server chạy trên máy bạn để giao dịch chứng khoán Việt Nam (DNSE · SSI · TCBS) ngay trong Claude Code / Claude Desktop — khoá API nằm nguyên trên máy bạn:

  • Khoá lưu tại ~/.algolab/mcp-broker.json (chmod 600) — không đi qua chat AI, không qua server bên thứ ba.
  • Ký/gọi request local từ chính IP của bạn — không cần relay/VPN (DNSE HMAC V2, TCBS JWT, SSI V3 OAuth).
  • Phạm vi: DNSE · SSI · TCBS đều đầy đủ (đọc + đặt/huỷ lệnh, ký/gửi local). SSI ký lệnh bằng keypair sinh trên máy bạn — dán public key vào iBoard một lần.
  • Lệnh tiền luôn 2 bước: AI chỉ nhận bản xem trước, bạn xác nhận rõ ràng thì lệnh mới được gửi.

Không cần tài khoản npm hay GitHub để dùng — chỉ cần Node.js ≥ 18, chạy bằng npx (gói mcp-trading trên npm).

Cách 1 — cài nhanh bằng npx (khuyên dùng)

Liên kết CTCK (chạy trong terminal của bạn — KHÔNG dán khoá vào chat AI):

npx -y mcp-trading link        # hỏi chọn DNSE / SSI / TCBS rồi nhập khoá
npx -y mcp-trading link dnse   # API Key + Secret (webtrading DNSE → LightSpeed API) + email OTP
npx -y mcp-trading link ssi    # ConsumerID + Secret + tiểu khoản; sinh keypair → dán public key iBoard
npx -y mcp-trading link tcbs   # API Key iFlash (app TCInvest) — tiểu khoản tự phát hiện sau iOTP
npx -y mcp-trading status      # xem trạng thái (không bao giờ in khoá)

Khai báo với Claude Code — thêm vào ~/.claude.json:

{
  "mcpServers": {
    "mcp-trading": {
      "command": "npx",
      "args": ["-y", "-p", "mcp-trading", "mcp-trading-server"]
    }
  }
}

Restart Claude — nhóm tool bridge_status, get_broker_*, place_broker_order… xuất hiện.

Cách 2 — cài thẳng từ GitHub

Thay mcp-trading bằng github:algolabx/mcp-trading trong mọi lệnh trên (VD npx -y github:algolabx/mcp-trading link).

Cách 3 — clone repo

git clone https://github.com/algolabx/mcp-trading.git && cd mcp-trading && npm install
node src/cli.js link dnse

~/.claude.json: { "command": "node", "args": ["<đường-dẫn>/mcp-trading/src/index.js"] }.

Tool

| Tool | Việc | Cần OTP? | |---|---|---| | bridge_status | Trạng thái liên kết cả 3 CTCK (không bao giờ in khoá) | — | | get_broker_accounts / balance / positions / orders | Đọc tài khoản (tham số broker, mặc định dnse) | DNSE: không · SSI: OTP 1 lần rồi tự refresh · TCBS: iOTP/8h | | request_broker_otp / submit_broker_otp | Mở phiên theo từng CTCK | — | | place_broker_order / cancel_broker_order | Lệnh thật DNSE/TCBS, 2 bước xem trước → confirm=true | Có |

An toàn

  • Không có tool nào nhận hay trả khoá — kênh duy nhất đưa khoá vào là CLI trên terminal của bạn.
  • Request đi thẳng máy bạn → CTCK qua HTTPS; bridge không gọi về bất kỳ máy chủ nào của Algolab.
  • Thu hồi bất kỳ lúc nào: unlink dnse (xoá khỏi máy) và/hoặc thu hồi key tại CTCK (chết toàn cục).
  • Test: npm test (chữ ký HMAC, quyền file 600, chuẩn hoá chiều lệnh).

Nguồn

Bridge này là Tầng C của thiết kế bảo mật "Két Ba Tầng" của Algolab — xem tài liệu tại mcp.algolab.vn/trading. MIT License.