MCP-Stock-Analyst

A Model Context Protocol server for equity market data: live quotes, fuzzy symbol search and historical candlesticks across China A-shares, Hong Kong, the US and Taiwan — three tools, two transports, no API key of its own.

Sartbot indexes this server; it does not operate it. The canonical source is the Apify Store listing, and the code is on GitHub under the MIT licence. Endpoint URLs and prices can change — trust those pages over this one.

What it exposes

Three tools. No prompts, no resources — deliberately narrow.

  • get_quote

    Real-time quote for up to 10 symbols in one call, covering A-share, Hong Kong, US and Taiwan listings.

    • quote
    • real-time
    • batch
    600519,00700,AAPL,2330.TW

    $0.02 per call

  • search_stock

    Fuzzy lookup by Chinese name, pinyin initials, English name or partial ticker code — so an agent can resolve "茅台" or "TSMC" without a symbol table.

    • search
    • pinyin
    • symbol
    茅台 · GZMT · 台积电 · TSMC

    $0.005 per call

  • get_kline

    Historical candlesticks at day, week or month granularity, 20 to 640 bars per request.

    • k-line
    • candlestick
    • history
    period=day · 20–640 bars

    $0.02 per call

Connect

Two transports: a hosted Streamable HTTP endpoint on Apify Standby, or stdio for local desktop clients.

  • hosted endpoint · mcp-remote
    {
      "mcpServers": {
        "stock-analyst": {
          "command": "npx",
          "args": [
            "-y", "mcp-remote",
            "https://neeenja--mcp-stock-analyst.apify.actor/mcp",
            "--header", "Authorization: Bearer ${APIFY_TOKEN}"
          ],
          "env": { "APIFY_TOKEN": "<your-apify-api-token>" }
        }
      }
    }
  • local · stdio
    $ git clone https://github.com/PanStories/mcp-stock-analyst
    $ cd mcp-stock-analyst && npm install && npm run build
    
    # then, in your MCP client:
    {
      "mcpServers": {
        "stock-analyst": {
          "command": "node",
          "args": ["/path/to/mcp-stock-analyst/build/index.js"]
        }
      }
    }

In remote mode the server answers POST /mcp for the protocol, GET /health for liveness and GET / for the Apify container readiness probe. Self-hosting puts your endpoint at https://<username>--mcp-stock-analyst.apify.actor/mcp.

Markets and symbol formats

One server, four markets. Taiwan has the most formats because exchange membership is encoded in the suffix.

  • China A-shares

    Shanghai and Shenzhen listings by six-digit code. Search accepts the Chinese short name or pinyin initials.

    • shanghai
    • shenzhen
    600519

    Source: Tencent public market API

  • Hong Kong

    HKEX listings as five-digit codes, zero-padded the way the exchange quotes them.

    • hkex
    • hong kong
    00700

    Source: Tencent public market API

  • United States

    US listings by plain ticker, batched alongside Asian symbols in the same call.

    • nyse
    • nasdaq
    AAPL

    Source: Tencent public market API

  • Taiwan

    TWSE and TPEx listings plus the TAIEX index. Use .TW for listed, .TWO for OTC, or the tw shorthand and let the server detect the exchange.

    • twse
    • tpex
    • taiex
    2330.TW · 5483.TWO · tw2330 · ^TWII

    Source: Yahoo Finance chart API

Pricing

Pay per event on the hosted endpoint. No subscription, no seat count.

  • $0.02 · tool-call

    Charged on each get_quote or get_kline call against the hosted endpoint.

    Primary billable event

  • $0.005 · search-call

    Charged on each search_stock call — symbol resolution is priced far below data retrieval.

    Cheap so agents can disambiguate freely

  • Always free

    The MCP handshake (initialize) and tools/list cost nothing, and every Apify account carries $5 of monthly platform credit — roughly 250 quote calls.

    Discovery is not metered

  • Transports

    Stateless Streamable HTTP for remote hosting on Apify Standby, plus stdio for local desktop clients.

  • Data sources

    Free public market APIs — Tencent for A-shares, Hong Kong and the US; Yahoo Finance for Taiwan. No key, no quota.

  • Runtime

    Node.js 18 or newer, TypeScript, built on the official @modelcontextprotocol/sdk, shipped as a multi-stage Docker image.

  • Licence

    MIT. Clone, fork and self-host without a commercial agreement; the hosted endpoint is simply the convenient default.