Market data fetching MCP Server. Supports Longport API, AKShare, and Yahoo Finance (yfinance) as data sources for Hong Kong and US stock market data including indices, stocks, and ETFs.
Three tools with consistent naming (fetch_*) and complete input schemas. Descriptions are present but generic, they read like API docs rather than LLM-optimized guidance. Parameter descriptions exist but lack actionable constraints (e.g., no guidance on when to use 'both' vs specific sources, no mention of fallback behavior in param docs). Output schema is documented in description text but not formally specified. Error handling returns JSON with error fields but lacks recovery guidance. No tool annotations (readOnlyHint, etc.). Composition is sound, each tool has one responsibility, but descriptions don't explain WHEN to call each tool or dependencies between them.
Fetch latest ETF data for Hong Kong and US ETFs. Args: codes: Optional list of ETF codes to fetch (e.g., ["02800.HK", "03033.HK"]). If not provided, fetches all ETFs from targets.json. source: Data source - "longport", "akshare", "yfinance", or "both". Default is "longport". Returns: JSON string containing ETF data with fields: name, code, price, timestamp, source.
Fetch latest index data for Hong Kong and US markets. Args: source: Data source - "longport" (Longport API, requires credentials), "akshare" (AKShare/Sina Finance, free), "yfinance" (Yahoo Finance, free), or "both" (try Longport first, fallback to yfinance then akshare). Default is "longport". Returns: JSON string containing index data with fields: name, code, price, timestamp, source.
Fetch latest stock data for Hong Kong and US stocks. Args: codes: Optional list of stock codes to fetch (e.g., ["00700.HK", "09988.HK"]). If not provided, fetches all stocks from targets.json. source: Data source - "longport", "akshare", "yfinance", or "both". Default is "longport". Returns: JSON string containing stock data with fields: name, code, price, timestamp, source.
Descriptions lack LLM-optimized guidance. They read as API documentation (listing parameters and return fields) rather than explaining WHEN to use the tool, what problem it solves, or how it differs from similar tools. No mention of fallback behavior, latency expectations, or data freshness.
Parameter 'source' enum description repeats the enum values instead of explaining WHEN to use each source. E.g., 'longport' requires credentials (cost/latency tradeoff), 'akshare' is free but may have stale data, 'both' implements fallback logic. LLM cannot infer these tradeoffs from the current description.
Output schema not formally documented. Description mentions 'JSON string containing [data] with fields: name, code, price, timestamp, source' but does not specify types (string vs number for price?), nullability, or structure of the returned JSON object (is it {data: [...], count: N} or just [...]?).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | <=2025-11-25 | v2 |
Error responses return JSON with 'error' and optional 'suggestion' fields but lack structured error classification. LLM cannot distinguish retryable errors (API temporarily down) from user-fixable errors (invalid source) from fatal errors (no data configured). No guidance on next steps beyond a suggestion string.
No tool annotations. Tools are read-only (fetch operations) but lack readOnlyHint annotation. This forces LLMs to infer safety from the tool name alone, increasing risk of misuse if naming is ambiguous.