Futu Stock MCP Server

mcp server for futuniuniu stock

Local serverstdioPython

What is the Futu Stock MCP server?

mcp server for futuniuniu stock. That is what the futu stock mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

  1. Clone the repository: bash git clone https://github.com/yourusername/futu-stock-mcp-server.git cd futu-stock-mcp-server
  • Standard MCP 2.0 protocol compliance
  • Comprehensive Futu API coverage
  • Real-time data subscription support
  • Market data access
  • Derivatives information
  • Account query capabilities

Getting it running

futu-stock-mcp-server on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • get_stock_quote — Get stock quote data
  • get_market_snapshot — Get market snapshot
  • get_cur_kline — Get current K-line data
  • get_history_kline — Get historical K-line data
  • get_rt_data — Get real-time data
  • get_ticker — Get ticker data
  • get_order_book — Get order book data
  • get_broker_queue — Get broker queue data
  • subscribe — Subscribe to real-time data
  • unsubscribe — Unsubscribe from real-time data
  • get_option_chain — Get option chain data
  • get_option_expiration_date — Get option expiration dates

What it needs from you

Configuration is passed through the environment: FUTU_HOST, FUTU_PORT, FUTU_ENABLE_POSITIONS, FUTU_ENABLE_TRADING, FUTU_TRADE_ENV, FUTU_SECURITY_FIRM, FUTU_TRD_MARKET, FUTU_DEBUG_MODE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Python 3.10+ - Futu OpenAPI SDK - Model Context Protocol SDK - uv (recommended)

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Futu Stock.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

This sits in the payments and commerce group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Futu Stock's toolset — get_stock_quote, get_market_snapshot, get_cur_kline and 11 more — is a fair guide to whether it matches your workflow. It is maintained by shuizhengqi1; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
get_stock_quoteGet stock quote data
get_market_snapshotGet market snapshot
get_cur_klineGet current K-line data
get_history_klineGet historical K-line data
get_rt_dataGet real-time data
get_tickerGet ticker data
get_order_bookGet order book data
get_broker_queueGet broker queue data
subscribeSubscribe to real-time data
unsubscribeUnsubscribe from real-time data
get_option_chainGet option chain data
get_option_expiration_dateGet option expiration dates
get_option_condorGet option condor strategy data
get_option_butterflyGet option butterfly strategy data

How to install the Futu Stock MCP server

3. **使用 `python` 命令启动**(适用于源码开发场景):
```json
{
  "mcpServers": {
    "futu-stock": {
      "command": "python",
      "args": ["-m", "futu_stock_mcp_server.server"],
      "env": {
        "FUTU_HOST": "127.0.0.1",
        "FUTU_PORT": "11111"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.10+ - Futu OpenAPI SDK - Model Context Protocol SDK - uv (recommended)
VariableDescriptionRequired
FUTU_HOSTEndpoint or connection string the server talks to.Optional
FUTU_PORTConfiguration value read at startup.Optional
FUTU_ENABLE_POSITIONSConfiguration value read at startup.Optional
FUTU_ENABLE_TRADINGConfiguration value read at startup.Optional
FUTU_TRADE_ENVConfiguration value read at startup.Optional
FUTU_SECURITY_FIRMConfiguration value read at startup.Optional
FUTU_TRD_MARKETConfiguration value read at startup.Optional
FUTU_DEBUG_MODEConfiguration value read at startup.Optional

Example prompts to try

  • Use Futu Stock to get stock quote.
  • Use Futu Stock to get market snapshot.
  • Use Futu Stock to get cur kline.

Frequently asked questions

You need a Futu securities account with OpenAPI permissions, and the Futu OpenD gateway program must be installed and running. Python 3.10+ is required.