Get the FREE Ultimate OpenClaw Setup Guide →

mcp -shioaji

MCP server from Sinotrade/mcp-server-shioaji

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sinotrade-mcp-server-shioaji uvx run mcp-server-shioaji \
  --env SHIOAJI_API_KEY="your_api_key" \
  --env SHIOAJI_SECRET_KEY="your_secret_key"

How to use

This MCP server exposes Shioaji trading API functionality as MCP tools that AI assistants can call. It provides tools to retrieve real-time stock prices, fetch historical K-bar data, and scan stocks by various criteria, enabling automated trading insights and data-driven decisions. You can interact with the tools by sending standardized MCP tool calls (for example, get_stock_price, get_kbars, and scan_stocks) and receive structured responses with prices, volumes, and market metrics. The server runs with the Shioaji credentials you provide, and exposes endpoints on port 8000 by default.

How to install

Prerequisites:

  • Python 3.10 or higher
  • uv (the Python package manager / uv is used to run the server)

Installation steps:

  1. Install Python from the official site or your package manager.
  2. Install uv (if not already installed):
pip install uv
  1. Install the MCP Shioaji server package (the server is named mcp-server-shioaji on PyPI):
pip install mcp-server-shioaji
  1. Start the MCP server using uv:
uv run mcp-server-shioaji

Notes:

  • Ensure your SHIOAJI_API_KEY and SHIOAJI_SECRET_KEY are configured (via environment variables or a .env file) before starting the server.

Additional notes

Environment variables:

  • SHIOAJI_API_KEY: Your Shioaji API key
  • SHIOAJI_SECRET_KEY: Your Shioaji secret key

Configuration tips:

  • The server defaults to listening on http://0.0.0.0:8000. If you need to change the port or host, adjust the server configuration or environment as provided by the Shioaji MCP implementation.
  • If you use a .env file, ensure it is loaded before starting the server (some setups automatically load it).
  • To add more tools, modify the server.py implementation and rebuild/install the package as needed.
  • Common issues include invalid credentials, network restrictions, or missing dependencies in your Python environment.

Related MCP Servers

Sponsor this space

Reach thousands of developers