Time Series Forecast MCP
时间序列预测 MCP (Model Context Protocol),提供五种时间序列预测模型:
- AR: 自回归模型
- MA: 移动平均模型
- ARIMA: 自回归积分移动平均模型(支持自动选参)
- GARCH: 广义自回归条件异方差模型(波动率预测)
- EXPONENTIAL_SMOOTHING: 指数平滑模型(支持季节性)
安装
pip install time-series-forecast-mcp
使用
作为 MCP 服务启动
python -m time_series_forecast_mcp
或使用 fastmcp CLI:
fastmcp run server.py:mcp
工具列表
list_forecast_models
列出支持的时间序列预测模型及适用场景说明。
forecast_time_series
对历史时间序列进行预测。
参数:
model_type: AR / MA / ARIMA / GARCH / EXPONENTIAL_SMOOTHINGseries: 历史观测值,按时间升序排列horizon: 向前预测步数(默认 12)p: AR 阶数或 ARIMA/GARCH 的 p(可选)d: ARIMA 差分阶数(可选)q: MA 阶数或 ARIMA/GARCH 的 q(可选)seasonal_period: 季节周期,仅 EXPONENTIAL_SMOOTHING 使用(可选)confidence_level: 置信水平,默认 0.95
返回:
forecast: 点预测lower_bound / upper_bound: 置信区间model_info: 模型参数与 AIC/BIC 等信息diagnostics: 样本量等诊断信息
依赖
- fastmcp >= 2.0.0
- numpy >= 1.24.0
- pandas >= 2.0.0
- statsmodels >= 0.14.0
- arch >= 7.0.0
- scipy >= 1.10.0
许可证
MIT License
Metadata
Release files for time-series-forecast-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| time_series_forecast_mcp-0.1.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| time_series_forecast_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / time_series_forecast_mcp-0.1.0.tar.gz
| Download URL | time_series_forecast_mcp-0.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57159eb0a21edcf2030726a879c18182fb77920d826c2f21bc60c5939e793324
|
|
BLAKE2b-256 checksum How to use checksums |
b04b66924480d99f76bb970ef310cffaa4fc62ea7abffca5084361e9b59b01db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / time_series_forecast_mcp-0.1.0-py3-none-any.whl
| Download URL | time_series_forecast_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59f651e8c0ee92daf7403bd080c0bd1a2f8f5e41df9fa2735588d9a47148e261
|
|
BLAKE2b-256 checksum How to use checksums |
f9de19a87ed8d2d0eae35fec149207bcf116eed11c60153ae3d474533db0d82f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|