Skip to main content
Glama
moomoo-market-data-mcp

moomoo-market-data-mcp

by amao69904

moomoo Market Data MCP

一个只读的 Model Context Protocol 服务器,将官方 Futu OpenAPI(futu-api)的实时市场数据提供给 Codex 和其他 MCP 客户端。

本项目仅提供市场数据工具,不包含下单、账户、持仓或资金划转功能。

工具

  • moomoo_connection_status — 验证 Futu OpenD 连接

  • moomoo_snapshot — 一个或多个代码的市场快照

  • moomoo_quote — 已订阅的实时行情

  • moomoo_candles — 当前 K 线/蜡烛图数据

  • moomoo_order_book — 实时订单簿

  • moomoo_ticker — 最近的逐笔成交记录

  • moomoo_search_securities — 按代码或名称搜索证券

代码使用 Futu 的格式,例如 US.AAPL、HK.00700 和 SH.600519。

Related MCP server: TickDB MCP

要求

  • Python 3.10+

  • 已安装、登录并运行 Futu OpenD

  • 您的 moomoo/Futu 账户中具备所需的实时行情权限

默认的 OpenD 端点为 127.0.0.1:11111。本服务器不需要您的 moomoo 密码。

安装与运行

git clone https://github.com/amao69904/moomoo-market-data-mcp.git
cd moomoo-market-data-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .
moomoo-market-data-mcp

可选的环境变量:

export FUTU_OPEND_HOST=127.0.0.1
export FUTU_OPEND_PORT=11111

Codex MCP 配置

使用安装该服务器的 Python 环境添加服务器:

[mcp_servers.moomoo-market-data]
command = "/absolute/path/to/moomoo-market-data-mcp/.venv/bin/moomoo-market-data-mcp"

[mcp_servers.moomoo-market-data.env]
FUTU_OPEND_HOST = "127.0.0.1"
FUTU_OPEND_PORT = "11111"

更改 MCP 配置后重启 Codex,然后调用 moomoo_connection_status。

数据与安全说明

  • 可用性、延迟、深度和覆盖范围取决于 OpenD、账户地区、交易所交易时间和行情权限。

  • 订阅配额由 Futu 强制执行。

  • 返回的数据仅供参考,不构成投资建议。

  • 请勿将 OpenD 暴露到公共互联网。请将其保留在 localhost 或可信的私有网络上。

开发

pip install -e ".[dev]"
pytest

许可证

MIT

Available Tools

7 tools
moomoo_candlesC

Return current candles. ktype examples: K_1M, K_5M, K_DAY.

Inputs: code (required), count, ktype, autype. Returns: result

moomoo_connection_statusA

Check whether the configured Futu OpenD endpoint is reachable.

Inputs: no named parameters. Returns: object

moomoo_order_bookB

Return the real-time bid/ask order book for one symbol.

Inputs: code (required), depth. Returns: object

moomoo_quoteC

Subscribe and return the latest real-time quote for each symbol.

Inputs: codes (required). Returns: result

moomoo_search_securitiesB

Search securities in a market such as US, HK, SH, or SZ.

Inputs: query (required), market (required), limit, security_type. Returns: result

moomoo_snapshotB

Get market snapshots. Symbols must look like US.AAPL or HK.00700.

Inputs: codes (required). Returns: result

moomoo_tickerC

Return recent real-time time-and-sales records for one symbol.

Inputs: code (required), count. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools target clearly distinct market data products (candles, order book, ticker, search, connection status). Snapshot and quote could be somewhat confusable since both return current market state, but their descriptions generally clarify the difference.

    Naming Consistency4/5

    All tools share a consistent moomoo_ prefix and snake_case convention. Most are noun-like resource names (snapshot, quote, candles, order_book, ticker), while search_securities is the only verb_noun form, which is a minor deviation.

    Tool Count5/5

    Seven tools is well-scoped for a market data server. Each tool covers a major data type or operation without unnecessary bloat or noticeable redundancy.

    Completeness4/5

    The toolset covers the core market data surface: search, current snapshots, quotes, candles, order book, and time-and-sales. Historical candle retrieval and additional market-data products like options or index constituents are absent, but these are reasonable gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables querying real-time and historical financial market data for stocks, options, forex, and crypto, including quotes, trades, technical indicators, and reference data through a set of MCP tools.
      71
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Unified real-time & historical market data API for Forex, stocks (US/HK/A-share), crypto, indices & precious metals. Tick, order book depth & K-line via REST + WebSocket. AI-native: MCP server, Skill & CLI.
      947
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Read-only MCP server that exposes Futu OpenD's investment-research quote APIs (stocks, options, futures, financials, news, etc.) as MCP tools, leveraging an already-running OpenD gateway with no separate authentication.
      53
      9
      MIT