Skip to main content
Glama
amao69904

moomoo-market-data-mcp

by amao69904

moomoo Market Data MCP

A read-only Model Context Protocol server that exposes real-time market data from the official Futu OpenAPI (futu-api) to Codex and other MCP clients.

This project only provides market-data tools. It contains no order placement, account, position, or fund-transfer functions.

Tools

  • moomoo_connection_status — verify the Futu OpenD connection

  • moomoo_snapshot — market snapshots for one or more symbols

  • moomoo_quote — subscribed real-time quotes

  • moomoo_candles — current K-line/candlestick data

  • moomoo_order_book — real-time order book

  • moomoo_ticker — recent time-and-sales records

  • moomoo_search_securities — search securities by code or name

Symbols use Futu's format, for example US.AAPL, HK.00700, and SH.600519.

Related MCP server: TickDB MCP

Requirements

  • Python 3.10+

  • Futu OpenD installed, logged in, and running

  • The required real-time quote entitlement in your moomoo/Futu account

The default OpenD endpoint is 127.0.0.1:11111. This server does not need your moomoo password.

Install and run

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

Optional environment variables:

export FUTU_OPEND_HOST=127.0.0.1
export FUTU_OPEND_PORT=11111

Codex MCP configuration

Add the server using the Python environment where it was installed:

[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"

Restart Codex after changing MCP configuration, then call moomoo_connection_status.

Data and safety notes

  • Availability, latency, depth, and coverage depend on OpenD, account region, exchange hours, and quote entitlements.

  • Subscription quotas are enforced by Futu.

  • Returned data is informational and is not investment advice.

  • Do not expose OpenD to the public internet. Keep it on localhost or a trusted private network.

Development

pip install -e ".[dev]"
pytest

License

MIT

Available Tools

7 tools
moomoo_candlesC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
countNo
ktypeNoK_DAY
autypeNoQFQ

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosing behavioral traits, but it only says 'Return current candles.' It does not state whether the operation is read-only, how many candles are returned by default, whether errors occur for invalid codes, or any rate limits. The phrase 'current' also leaves it unclear if this returns the latest candle only or a historical series ending at the present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exceptionally short, consisting of two sentences. The purpose is front-loaded in the first sentence, and the second sentence provides a practical example for the ktype parameter. It is concise and free of fluff, though the brevity sacrifices essential detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, an output schema, and several sibling tools, this description is incomplete. The output schema covers return values, but parameter semantics are under-revealed, and there is no guidance on context or common use cases. An agent would need to infer the meaning of code, count, and autype from defaults and examples elsewhere.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the input schema only provides titles and defaults, so the description must explain the parameters. It adds value only for ktype by giving examples (K_1M, K_5M, K_DAY), but it says nothing about code, count, or autype. These three parameters remain unexplained, and the description does not compensate for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Return current candles.' This clearly identifies the tool's primary function and sets it apart from siblings like moomoo_snapshot, moomoo_quote, and moomoo_order_book, which cover different market data. However, it does not elaborate on what constitutes a candle or how this relates to the other moomoo data tools, leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any trade-offs, such as when to use moomoo_snapshot or moomoo_quote instead, nor does it state any prerequisites or context. The only hint is the ktype examples, but these are parameter examples rather than usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

moomoo_connection_statusA

Check whether the configured Futu OpenD endpoint is reachable.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly conveys that the tool performs a reachability check, which implies a read-only network probe with no side effects. It does not overpromise or hide destructive behavior, and for a zero-parameter status tool this is sufficient transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that front-loads the action and object. Every word earns its place, and there is no superfluous or redundant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has no parameters, an output schema exists to describe return values, and the purpose is simple and clearly stated, the description is complete for an agent to understand and invoke the tool correctly. No additional context is necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is no schema information to compensate for. The description correctly focuses on the tool's action rather than parameters. A baseline of 4 is appropriate because parameter semantics are not a concern here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Check') and resource ('configured Futu OpenD endpoint') and clearly indicates the purpose is connectivity/reachability. This distinguishes it from sibling data-retrieval tools like moomoo_quote or moomoo_candles, which focus on market data instead of connection status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this is a health-check tool to confirm the OpenD endpoint is reachable, which suggests using it before market data calls. However, it does not explicitly state when to prefer this tool over siblings or when to use alternatives, so the guidance is only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

moomoo_order_bookB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
depthNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the data is 'real-time' and a 'bid/ask order book', which implies a read-only snapshot, but it doesn't disclose rate limits, data availability constraints, or whether depth is capped beyond the schema default. It also doesn't describe the output shape despite an output schema existing. The description provides basic behavioral context but leaves important operational details undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that front-loads the core function (return order book) and the key scope ('for one symbol'). Every word earns its place; there is no filler or redundancy. It is optimally sized for a simple two-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema and only two parameters, one optional, so complexity is low. The description covers the basic purpose and points to real-time data. However, given the 0% schema description coverage and no annotations, it should at least mention the 'code' format and 'depth' meaning to be complete. It also doesn't hint at whether this is for US stocks, options, or other asset classes, which matters on moomoo platform given likely regional/asset support. Adequate for a minimal tool but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate by explaining what the parameters mean and how they relate. The description mentions 'one symbol' but doesn't explicitly explain that 'code' is the symbol identifier (e.g., 'AAPL') nor that 'depth' controls the number of bid/ask levels to return. With 0% coverage in the schema and no param-level detail in the description, the agent must guess at symbol format and depth interpretation. This is a significant gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Return') and resource ('the real-time bid/ask order book for one symbol'), which clearly distinguishes it from siblings like moomoo_quote and moomoo_snapshot that return different data types. It doesn't explicitly name sibling differentiators, but the resource and data specificity are sufficient to identify the tool's core function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: it is for retrieving a single symbol's order book, which is distinct from market-wide or historical data. However, it doesn't explicitly state when to prefer this over moomoo_snapshot or moomoo_quote, nor does it mention any limitations like exchange coverage or subscription requirements. The implied context is clear but lacks explicit exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

moomoo_quoteC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
codesYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It mentions 'Subscribe', implying a subscription mechanism or persistent state, but does not explain the nature of the subscription, whether it is one-shot or ongoing, or any side effects. It also does not disclose any rate limits, authentication requirements, or what happens on repeated calls. The description is too vague on behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no redundant words. It is appropriately sized for a simple tool. However, it is overly terse, omitting critical usage and behavioral details, so while it is concise, it under-delivers on content. Still, for conciseness itself, it earns a 4.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is simple (one parameter) and has an output schema that explains return values, the description covers the basic 'what'. However, it lacks any usage context, such as when to subscribe versus just take a snapshot, and does not explain the subscription lifecycle. This leaves a gap for an agent trying to decide correct usage but it is a minor gap for such a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has zero description coverage for the 'codes' parameter, so the description must compensate. The phrase 'for each symbol' provides a minimal hint that codes are market symbols, but it does not specify expected format, valid ranges, or examples. The description adds only marginal meaning beyond the field name 'codes', which could be interpreted in many ways without the 'symbol' hint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Subscribe and return') and a specific resource ('latest real-time quote for each symbol'). It clearly identifies the tool's function. However, it does not explicitly differentiate from sibling tools like moomoo_snapshot or moomoo_ticker, which could also return quote-like data, so it lacks explicit sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention context, prerequisites, or exclusions. An agent would have no indication of whether to prefer this over moomoo_snapshot or moomoo_ticker, making selection ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

moomoo_search_securitiesB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
marketYes
security_typeNoSTOCK

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure, but it only states the basic function. It does not mention that results are limited, how matches are ordered, whether authentication is needed, or what happens on invalid markets. No additional behavioral traits are disclosed beyond the bare search operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, syntactically efficient sentence that front-loads the verb and resource. It contains no superfluous words and is appropriately brief for the limited information it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, and an output schema that does not compensate for the missing input descriptions, the overall context is incomplete. The agent lacks sufficient information to correctly construct queries, interpret parameter semantics, or understand tool-specific behaviors, so the description is not fully adequate for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for documenting parameters. It adds value for the 'market' parameter by listing valid examples, but it says nothing about 'query' (what to search by), 'limit' (maximum number of results?), or 'security_type' (valid values, meaning). Most parameters remain unexplained, forcing the agent to guess.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'search' and the resource 'securities', with concrete examples of markets (US, HK, SH, SZ). It unambiguously distinguishes this tool from siblings like quote, candles, or ticker, which are all non-search operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives. No mention of typical flow (e.g., search before fetching quotes), no exclusions, and no reference to sibling tools. The intended usage must be inferred entirely from the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

moomoo_snapshotB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
codesYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Get' implies a read-only, non-destructive operation, and the symbol format constraint sets input expectations. However, it doesn't disclose rate limits, error behavior, or what exactly constitutes a snapshot.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with the action verb front-loaded and the constraint following. No filler, repetition, or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter snapshot tool, the description covers the essential action and input format, and an output schema exists. However, it omits usage context relative to siblings and any details about what a snapshot includes or error conditions, leaving some ambiguity for an agent deciding between this and moomoo_quote/candles/ticker.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description is the sole source of parameter meaning. It adds concrete format examples ('US.AAPL', 'HK.00700') clarifying that codes must be prefixed with a market code. It doesn't enumerate all accepted market prefixes or explain array semantics, but it provides a solid baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb and resource: 'Get market snapshots.' This is specific enough to identify the core action. However, it doesn't differentiate from siblings like moomoo_quote or moomoo_ticker, which could also return market data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus the sibling tools. The only additional instruction is the symbol format requirement, which is a parameter constraint rather than usage context. There is no mention of alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

moomoo_tickerC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
countNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full behavioral disclosure burden. It mentions 'real-time' but does not state read-only nature, rate limits, or any other side effects. For a data-retrieval tool, this is minimal and does not alert the agent to any limitations or requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it is not front-loaded with critical information (like parameter semantics or usage context). It is appropriately short but lacks structure and specified content, so it earns a mid-range score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value details are not required, but the description still fails to explain the count parameter, any limitations, or usage scenarios. The tool is simple, yet the description leaves significant gaps that an agent would need to resolve before calling it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not clarify either parameter. The code parameter is implied by 'one symbol' but not explicitly tied to the property name, and the count parameter is entirely omitted. This forces the agent to guess at the meaning and usage of count.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Return') and resource ('recent real-time time-and-sales records for one symbol'), which distinguishes it from sibling tools like snapshots or quotes. However, it does not explicitly differentiate from specific siblings, so it scores a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as moomoo_quote or moomoo_candles. The description only states what it does, leaving the agent to infer the appropriate context, which is not provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv0.1.0
    • First observedmoomoo_candles
    • First observedmoomoo_connection_status
    • First observedmoomoo_order_book
    • First observedmoomoo_quote
    • First observedmoomoo_search_securities
    • First observedmoomoo_snapshot
    • First observedmoomoo_ticker

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    C
    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
    C
    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.
    769
    MIT
  • A
    license
    C
    quality
    B
    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