Labsco
MCP SERVER

Shioaji MCP Server

by offbeat-studio

Read Taiwanese market data and your SinoPac brokerage positions from a conversation — with order placement switched off unless you deliberately turn it on.

Trading Execution & Brokerage
Summary
Read-only until you say otherwise, and that default is the feature.

Handing an assistant a live brokerage connection is a decision, and this server makes you make it explicitly: without the trading flag, everything works except the two tools that move money. That leaves a genuinely useful read-only surface — contracts, snapshots, candles, positions, balances — that you can wire up with much less at stake. When you do flip the switch, the orders are real orders on a real account, and the project's own advice is to start small.

What it is

An MCP server over Shioaji, the trading API of SinoPac Securities. It exposes contract search, live snapshots and historical candles alongside account state — positions, balance and orders — and, behind an explicit switch, order placement and cancellation. It connects to the real brokerage API, so trading operations execute real orders.

What you get
  • Account information and connection status — `get_account_info`
  • Tradable contracts searched by keyword, exchange or category — `search_contracts`
  • Live market snapshots for the contracts you name — `get_snapshots`
  • Historical K-line data for a contract — `get_kbars`
  • Current positions and profit or loss, for stock accounts, futures accounts or all of them — `get_positions`
  • Account balance and margin information, across the same account choices — `get_account_balance`
  • Every order with its status — `list_orders`
  • Order placement and cancellation, disabled by default and reachable only when `SHIOAJI_TRADING_ENABLED=true` — `place_order`, `cancel_order`
  • The compliance checks the broker requires: terms-signing and API-test status, and the test run itself — `check_terms_status`, `run_api_test`
Requirements

A SinoPac Securities account, an issued API Key and Secret Key, and the broker's document signing and API test completed. Credentials go in as `SHIOAJI_API_KEY` and `SHIOAJI_SECRET_KEY`; `SHIOAJI_TRADING_ENABLED` is `false` by default and must be set to `true` for order operations. The recommended path is the prebuilt image `ghcr.io/musingfox/shioaji-mcp:latest` run with `--platform=linux/amd64`; version tags are preferred over `latest` in production. Local runs need Python 3.10 to 3.12 on Linux or WSL — macOS users should use Docker.

Setup effort

One command plus a key — docker pull ghcr.io/musingfox/shioaji-mcp:latest, then supply credentials