Metadata-Version: 2.4
Name: jiaoling-433-mcp
Version: 0.1.6
Summary: 郊零 433 数据型 MCP 服务，基于现有行情 API 提供候选池与 Top3 实时行情数据
Project-URL: Homepage, http://119.29.160.124:9292/
Project-URL: Documentation, http://119.29.160.124:9292/
Project-URL: Source, http://119.29.160.124:9292/
Author-email: JiaoLing Strategy Lab <support@example.com>
License: MIT
License-File: LICENSE
Keywords: etf,finance,market-data,mcp,stocks
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.11
Requires-Dist: fastmcp<3.0.0,>=2.10.6
Requires-Dist: httpx<1.0.0,>=0.27.0
Requires-Dist: pydantic<3.0.0,>=2.8.0
Description-Content-Type: text/markdown

# 郊零 433 MCP

基于你已经部署好的行情 API：

- `http://119.29.160.124:9292/api/instruments/`
- `http://119.29.160.124:9292/api/historical-data/`

对外提供一个可通过 `uvx` 启动的 MCP 数据服务，面向“433 中庸策略”场景，提供：

- 候选产品池基础数据
- Top3 产品实时/最新行情数据
- 基于历史波动自动估算 `Z` 作为数据字段返回

## 1. 本地运行

```bash
cd MCP
uvx --from . jiaoling-433-mcp
```

如果需要改 API 地址：

```bash
JIAOLING_API_BASE_URL=http://127.0.0.1:8000 uvx --from . jiaoling-433-mcp
```

## 2. Codex / MCP 配置

当前目录已提供：

- `.mcp.json`
- `.codex-plugin/plugin.json`

默认会连接：

```text
http://119.29.160.124:9292
```

## 3. 主要工具

- `list_curated_products_data`
- `get_top3_realtime_data`

`get_top3_realtime_data` 的核心规则：

- 必传参数：`amout`
- 目标价格：`amout / 1000`
- 先通过行情 API 的 `price_max` 参数筛出价格 `<= 目标价格` 的 ETF、LOF、股票、基金
- 先取最接近目标价格的前 10 个候选
- 只有价差在 `3%` 内时，才优先能源方向，特别是石油/原油
- 只有价差在 `1%` 内时，才优先 `ETF > LOF > 股票 > 基金`
- 再用实时价格二次过滤，只保留当前仍 `<= 目标价格` 的产品
- 返回 10 个备选池，以及所有实时合格候选
- `top3` 只从实时合格候选中补位产生，最多返回 3 个；如果只有 2 个合格，就只返回 2 个

## 4. 当前边界

- 当前数据底座主要覆盖：股票、ETF、LOF、开放式基金
- 用户文案里提到的指数、港股如 `00883`，如果底层 API 没有对应数据，会自动跳过并说明原因
- 实时行情接口在线上环境偶发超时，因此 Top3 会先根据昨天数据建候选池，再用实时价格二次校验
