Skip to main content

MCP Server for SSI Stock integration

Project description

MseeP.ai Security Assessment Badge

SSI Stock Data MCP

GitHub license GitHub stars

Table of Contents

1. Introduction

SSI Stock Data MCP is a Model Context Protocol (MCP) server for get VietNam stock intraday data. It enables AI assistants and tools to query intraday data using SSI FastConnect API programmatically and securely.

2. Features

  • List of stock codes by exchange
  • Retrieve detailed information of a stock code
  • Retrieve the list of stock codes in an index basket
  • Retrieve the list of index codes
  • Retrieve the open, high, low, close, volume, and value information of a stock code by each tick data
  • Retrieve the open, high, low, close, volume, and value information of a stock code by day
  • Retrieve the daily trading results of the composite index
  • Retrieve the daily trading information of a stock code
  • Docker containerization support
  • Support get realtime data via streaming adapter (planning)
  • Support order management and trading via MCP (future consideration)

3. Quickstart

3.1. Prerequisites

  • Python 3.12+
  • uv (for fast dependency management).
  • Docker (optional, for containerized deployment).
  • Ensure you register for SSI FastConnect service before running this MCP server. You can register at SSI FastConnect to get your consumer ID and secret.

Installing via Smithery

To install SSI Stock MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @archiephan78/ssi-stock-mcp-server --client claude

3.2. Local Run

  • Clone the repository:
# Clone the repository
$ git clone https://github.com/archiephan78/ssi-stock-mcp-server.git
  • Configure the environment variables
# Set environment variables (see .env.sample)
FC_DATA_URL=https://fc-data.ssi.com.vn/ #optional
FC_DATA_AUTH_TYPE=Bearer #optional
FC_DATA_CONSUMER_ID=your_consumer_id 
FC_DATA_CONSUMER_SECRET=your_consumer_secret  
  • Add the server configuration to your client configuration file. For example, for Claude Desktop:
{
  "mcpServers": {
    "SSIStockMCPServer": {
      "command": "uv",
      "args": ["--directory", "full-path", "run", "ssi-stock-mcp-server"],
      "env": {
        "FC_DATA_CONSUMER_ID": "id",
        "FC_DATA_CONSUMER_SECRET": "id",
        "FC_DATA_URL": "https://fc-data.ssi.com.vn/",
        "FC_DATA_AUTH_TYPE": "Bearer"
      }
    }
  }
}
  • Restart Claude Desktop to load new configuration.
  • You can now ask Claude to interact with data using natual language:
    • "chỉ số VN30 hôm nay có gì hot không"
    • "get volume room ngoại đã bán của SSI hôm nay"
    • "so sánh vol của SSI với VND trong ngày hôm nay"
    • "total matchvol của SSI trong 1 tuần trở lại đây"

3.3. Docker Run

  • Run it with pre-built image (or you can build it yourself):
$ docker run -p 8000:8000 
             -e FC_DATA_CONSUMER_ID=id 
             -e FC_DATA_CONSUMER_SECRET=id ghcr.io/archiephan78/ssi-stock-mcp-server
  • Running with Docker in Claude Desktop:
{
  "mcpServers": {
    "SSIStockMCPServer": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "FC_DATA_CONSUMER_ID",
        "-e", "FC_DATA_CONSUMER_SECRET",
        "ghcr.io/archiephan78/ssi-stock-mcp-server:latest"
      ],
      "env": {
        "FC_DATA_CONSUMER_ID": "your_username",
        "FC_DATA_CONSUMER_SECRET": "your_password"
      }
    }
  }
}

This configuration passes the environment variables from Claude Desktop to the Docker container by using the -e flag with just the variable name, and providing the actual values in the env object.

4. Tools

The MCP server exposes tools:

  • Get securities list: get_securities_list()
  • Get securities detail: get_securities_details()
  • Get index: get_index_components()
  • Get list index: get_index_list()
  • Get daily open,high,low,close: get_daily_ohlc()
  • Get intraday open,high,low,close: get_intraday_ohlc()
  • Get daily index: get_daily_index()
  • Get stock price: get_stock_price()

See src/ssi_stock_mcp_server/server.py for full API details.

5. Development

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

This project uses uv to manage dependencies. Install uv following the instructions for your platform.

# Clone the repository
$ git clone https://github.com/archiephan78/ssi-stock-mcp-server.git
$ uv venv
$ source .venv/bin/activate  # On Unix/macOS
$ .venv\Scripts\activate     # On Windows
$ uv pip install -e .
# run test
$ pytest

6. License

Apache 2.0

Contact / Support

  • Please open an issue on GitHub if you encounter any problems or need support.
  • Email: n/a

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_archiephan78_ssi_stock_mcp_server-1.0.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_archiephan78_ssi_stock_mcp_server-1.0.1.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_archiephan78_ssi_stock_mcp_server-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cfa99edf623ddd0bb349d1571c7f3610d8a7a4b10bd61acfb4bc317d459f0b3c
MD5 c50e24d07869b0bc669c058addbf4bc2
BLAKE2b-256 c99d63d88b162898b61da2571b7d4de5324d7a3b7b224a2dbbd0c146387e530f

See more details on using hashes here.

File details

Details for the file iflow_mcp_archiephan78_ssi_stock_mcp_server-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_archiephan78_ssi_stock_mcp_server-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_archiephan78_ssi_stock_mcp_server-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e13bf7206da3f2a9a92704627c9f9d79b34921a5c22fac8fd6f2325ee1fe556d
MD5 d6b952045d9b145c90f959c5ed8c6413
BLAKE2b-256 c3d3eb9065f7346571b8f15132984e96c4995fdd813674dcaa39c87da14e3aa5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page