aigroup-econ-mcp 0.1.2__py3-none-any.whl → 0.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aigroup-econ-mcp might be problematic. Click here for more details.

@@ -0,0 +1,448 @@
1
+ Metadata-Version: 2.4
2
+ Name: aigroup-econ-mcp
3
+ Version: 0.1.5
4
+ Summary: 专业计量经济学MCP工具 - 让大模型直接进行数据分析
5
+ Project-URL: Homepage, https://github.com/aigroup/aigroup-econ-mcp
6
+ Project-URL: Repository, https://github.com/aigroup/aigroup-econ-mcp.git
7
+ Project-URL: Issues, https://github.com/aigroup/aigroup-econ-mcp/issues
8
+ Author-email: AIGroup <jackdark425@gmail.com>
9
+ License-File: LICENSE
10
+ Keywords: data-analysis,economics,mcp,regression,statistics
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: click>=8.0.0
24
+ Requires-Dist: matplotlib>=3.5.0
25
+ Requires-Dist: mcp>=1.0.0
26
+ Requires-Dist: numpy>=1.21.0
27
+ Requires-Dist: pandas>=1.5.0
28
+ Requires-Dist: pydantic>=2.0.0
29
+ Requires-Dist: scipy>=1.7.0
30
+ Requires-Dist: statsmodels>=0.13.0
31
+ Requires-Dist: uvicorn>=0.20.0
32
+ Description-Content-Type: text/markdown
33
+
34
+ # aigroup-econ-mcp - 专业计量经济学MCP工具
35
+
36
+ 🎯 专为Roo-Code设计的计量经济学MCP服务 - 提供统计分析、回归建模、时间序列分析,无需复杂环境配置
37
+
38
+ ![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)
39
+ ![MCP](https://img.shields.io/badge/MCP-1.0+-green.svg)
40
+ ![License](https://img.shields.io/badge/License-MIT-yellow.svg)
41
+
42
+ ## 功能特性
43
+
44
+ - 📊 **描述性统计分析** - 自动计算均值、方差、偏度、峰度等统计量
45
+ - 📈 **回归分析** - OLS回归、逐步回归、模型诊断
46
+ - 🧪 **假设检验** - t检验、F检验、卡方检验、ADF检验
47
+ - ⏰ **时间序列分析** - 平稳性检验、ARIMA模型、预测
48
+ - 🔄 **结构化输出** - 完整的Pydantic模型支持
49
+ - 🎯 **上下文管理** - 进度报告、日志记录、错误处理
50
+
51
+ ## 🚀 快速开始(Roo-Code用户)
52
+
53
+ ### 一键启动MCP服务
54
+
55
+ ```bash
56
+ # 使用uvx快速启动(推荐,无需安装)
57
+ uvx aigroup-econ-mcp
58
+ ```
59
+
60
+ 就这么简单! MCP服务会自动:
61
+
62
+ ✅ 下载最新版本
63
+ ✅ 配置轻量级依赖(仅~50MB)
64
+ ✅ 启动并连接到Roo-Code
65
+ ✅ 提供5个专业计量经济学工具
66
+
67
+ ### 配置Roo-Code
68
+
69
+ 如果需要手动配置RooCode的MCP服务,请在RooCode的设置中添加以下配置:
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "aigroup-econ-mcp": {
75
+ "command": "uvx",
76
+ "args": [
77
+ "aigroup-econ-mcp"
78
+ ],
79
+ "env": {},
80
+ "alwaysAllow": [
81
+ "descriptive_statistics",
82
+ "ols_regression",
83
+ "hypothesis_testing",
84
+ "time_series_analysis",
85
+ "correlation_analysis"
86
+ ]
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ 配置说明:
93
+
94
+ - `command`: 使用uvx运行,无需本地安装
95
+ - `args`: 启动参数
96
+ - `alwaysAllow`: 允许访问的工具列表
97
+ - `env`: 环境变量(可留空)
98
+
99
+ 配置完成后,RooCode将自动连接到aigroup-econ-mcp服务,您可以直接使用以下工具:
100
+
101
+ | 工具 | 功能 | 用途 |
102
+ |------|------|------|
103
+ | descriptive_statistics | 描述性统计分析 | 加载数据并自动计算统计量 |
104
+ | ols_regression | OLS回归分析 | 回归建模和模型诊断 |
105
+ | hypothesis_testing | 假设检验 | t检验、F检验、卡方检验、ADF检验 |
106
+ | time_series_analysis | 时间序列分析 | 平稳性检验、ARIMA模型、预测 |
107
+ | correlation_analysis | 相关性分析 | 变量间相关性分析和可视化 |
108
+
109
+ ## 📦 安装方式
110
+
111
+ ### 方式1:uvx(推荐,无需安装)
112
+
113
+ ```bash
114
+ # 直接运行最新版本
115
+ uvx aigroup-econ-mcp
116
+
117
+ # 或指定版本
118
+ uvx aigroup-econ-mcp@1.0.0
119
+ ```
120
+
121
+ 优点:
122
+
123
+ ⚡ 快速启动(几秒钟)
124
+ 🔄 自动获取最新版本
125
+ 💾 无需本地安装
126
+ 🎯 轻量级依赖(~50MB,包含统计分析库)
127
+
128
+ ### 方式2:pip安装
129
+
130
+ ```bash
131
+ # 基础安装(包含所有计量经济学功能)
132
+ pip install aigroup-econ-mcp
133
+
134
+ # 运行
135
+ aigroup-econ-mcp
136
+ ```
137
+
138
+ 依赖说明:
139
+
140
+ - **核心依赖**(默认):pandas, numpy, scipy, mcp, statsmodels, matplotlib
141
+ - **轻量级**:无需torch或其他重型依赖
142
+ - **推荐**:直接使用基础安装,包含所有计量经济学功能!
143
+
144
+ ## ✨ 核心特性
145
+
146
+ 1️⃣ 智能数据分析
147
+ ✅ 自动清洗:自动处理缺失值和异常值
148
+ ✅ 统计计算:完整的描述性统计量
149
+ ✅ 可视化:自动生成图表和报告
150
+
151
+ 2️⃣ 专业回归分析
152
+ 📊 OLS回归:完整的回归诊断和残差分析
153
+ 🔧 逐步回归:特征选择和模型优化
154
+ 📈 模型评估:R²、调整R²、F检验等指标
155
+
156
+ 3️⃣ 假设检验套件
157
+ 🧪 多样化检验:t检验、F检验、卡方检验、ADF检验
158
+ 📊 详细报告:统计量、p值、置信区间
159
+ 💡 结果解读:自动生成检验结论和建议
160
+
161
+ 4️⃣ 时间序列专业工具
162
+ ⏰ 平稳性检验:ADF、KPSS等完整检验套件
163
+ 📈 ARIMA建模:自动定阶和参数估计
164
+ 🔮 预测功能:点预测和区间预测
165
+
166
+ 5️⃣ 结构化输出
167
+ 📋 Pydantic模型:类型安全的数据结构
168
+ 📊 丰富格式:表格、JSON、Markdown报告
169
+ 🎯 错误处理:详细的错误信息和建议
170
+
171
+ ## 🔧 故障排除
172
+
173
+ ### uvx安装卡住
174
+ **问题**:`uvx aigroup-econ-mcp` 卡住不动
175
+
176
+ **解决**:
177
+ - 确保使用最新版本
178
+ - 检查网络连接
179
+ - 尝试清除缓存:`uvx --no-cache aigroup-econ-mcp`
180
+
181
+ ### 工具返回错误
182
+ **问题**:统计分析返回NoneType或错误
183
+
184
+ **解决**:
185
+ - 确保数据格式正确(列表或字典)
186
+ - 检查数据中是否有缺失值
187
+ - 查看详细错误信息和参数要求
188
+
189
+ ### RooCode中无法使用MCP工具
190
+ **问题**:在RooCode中看不到aigroup-econ-mcp工具
191
+
192
+ **解决**:
193
+ - 确保配置了正确的MCP服务配置
194
+ - 检查uvx是否正常工作:`uvx --version`
195
+ - 重启RooCode
196
+ - 查看RooCode的MCP服务日志
197
+
198
+ ### MCP服务连接失败
199
+ **问题**:MCP服务启动失败或连接超时
200
+
201
+ **解决**:
202
+ - 检查网络连接
203
+ - 尝试使用 `uvx --no-cache aigroup-econ-mcp` 清除缓存
204
+ - 确保Python版本>=3.8
205
+ - 查看详细错误日志
206
+
207
+ ## 📂 项目结构
208
+
209
+ ### 使用uvx安装运行(推荐)
210
+
211
+ ```bash
212
+ # 一键安装和运行
213
+ uvx aigroup-econ-mcp
214
+
215
+ # 指定端口运行
216
+ uvx aigroup-econ-mcp --port 8080 --debug
217
+
218
+ # 使用不同的传输协议
219
+ uvx aigroup-econ-mcp --transport streamable-http --host 0.0.0.0 --port 8000
220
+ ```
221
+
222
+ ### 本地开发
223
+
224
+ ```bash
225
+ # 克隆项目
226
+ git clone https://github.com/jackdark425/aigroup-econ-mcp
227
+ cd aigroup-econ-mcp
228
+
229
+ # 开发模式运行
230
+ uv run aigroup-econ-mcp --port 8000 --debug
231
+
232
+ # 或使用uvx
233
+ uvx -p . aigroup-econ-mcp
234
+ ```
235
+
236
+
237
+ ## 与RooCode集成
238
+
239
+ 在RooCode的MCP配置文件中添加:
240
+
241
+ ```json
242
+ "aigroup-econ-mcp": {
243
+ "command": "uvx",
244
+ "args": [
245
+ "aigroup-econ-mcp"
246
+ ],
247
+ "alwaysAllow": [
248
+ "descriptive_statistics",
249
+ "ols_regression",
250
+ "hypothesis_testing",
251
+ "time_series_analysis",
252
+ "correlation_analysis"
253
+ ],
254
+ "disabled": true
255
+ }
256
+ ```
257
+
258
+
259
+
260
+ ## 📋 工具详细说明
261
+
262
+ #### descriptive_statistics
263
+ 描述性统计分析工具
264
+
265
+ **参数:**
266
+ - `data`: 数值数据列表或字典
267
+ - `variables`: 变量名列表(可选)
268
+ - `output_format`: 输出格式(table/json)
269
+
270
+ **返回:**
271
+ - 基础统计量(均值、方差、偏度、峰度)
272
+ - 数据质量评估
273
+ - 可视化图表
274
+
275
+ #### ols_regression
276
+ OLS回归分析工具
277
+
278
+ **参数:**
279
+ - `y_data`: 因变量数据
280
+ - `x_data`: 自变量数据(列表或矩阵)
281
+ - `feature_names`: 变量名称(可选)
282
+ - `add_constant`: 是否添加常数项(默认true)
283
+ - `output_detail`: 输出详细程度(可选)
284
+
285
+ **返回:**
286
+ - 回归系数和统计显著性
287
+ - 模型拟合优度(R²、调整R²)
288
+ - 模型诊断(残差分析、异方差检验)
289
+ - 预测结果(如果提供预测数据)
290
+
291
+ #### hypothesis_testing
292
+ 假设检验工具
293
+
294
+ **参数:**
295
+ - `data1`: 第一组数据
296
+ - `data2`: 第二组数据(可选)
297
+ - `test_type`: 检验类型(t_test/f_test/chi2_test/adf_test)
298
+ - `alpha`: 显著性水平(默认0.05)
299
+
300
+ **返回:**
301
+ - 检验统计量和p值
302
+ - 检验结果和置信区间
303
+ - 效应大小和统计功效
304
+
305
+ #### time_series_analysis
306
+ 时间序列分析工具
307
+
308
+ **参数:**
309
+ - `data`: 时间序列数据
310
+ - `analysis_type`: 分析类型(stationarity/arima/forecast)
311
+ - `lags`: 滞后期数(默认12)
312
+ - `forecast_steps`: 预测步数(可选)
313
+
314
+ **返回:**
315
+ - 平稳性检验结果
316
+ - ARIMA模型参数
317
+ - 预测值和置信区间
318
+ - 模型诊断图表
319
+
320
+ #### correlation_analysis
321
+ 相关性分析工具
322
+
323
+ **参数:**
324
+ - `data`: 变量数据字典
325
+ - `method`: 相关系数类型(pearson/spearman/kendall)
326
+ - `plot`: 是否生成可视化图表(默认true)
327
+
328
+ **返回:**
329
+ - 相关系数矩阵
330
+ - 显著性检验结果
331
+ - 相关性热力图
332
+
333
+
334
+ ## 可用资源
335
+
336
+ ### 示例数据集
337
+
338
+ ```
339
+ resource://dataset/sample/economic_growth
340
+ resource://dataset/sample/stock_returns
341
+ resource://dataset/sample/time_series
342
+ ```
343
+
344
+ ### 提示模板
345
+
346
+ ```
347
+ prompt://economic_analysis?data_description=...&analysis_type=descriptive
348
+ ```
349
+
350
+ ## 项目结构
351
+
352
+ ```
353
+ aigroup-econ-mcp/
354
+ ├── src/aigroup_econ_mcp/
355
+ │ ├── __init__.py # 包初始化
356
+ │ ├── server.py # MCP服务器核心
357
+ │ ├── cli.py # 命令行入口
358
+ │ └── tools/
359
+ │ ├── __init__.py
360
+ │ ├── statistics.py # 统计分析工具
361
+ │ ├── regression.py # 回归分析工具
362
+ │ └── time_series.py # 时间序列工具
363
+ ├── pyproject.toml # 项目配置
364
+ ├── README.md
365
+ └── examples/
366
+ ```
367
+
368
+ ## 依赖要求
369
+
370
+ - Python 3.8+
371
+ - pandas >= 1.5.0
372
+ - numpy >= 1.21.0
373
+ - statsmodels >= 0.13.0
374
+ - scipy >= 1.7.0
375
+ - matplotlib >= 3.5.0
376
+ - mcp >= 1.0.0
377
+
378
+ ## 开发
379
+
380
+ ### 环境设置
381
+
382
+ ```bash
383
+ # 安装开发依赖
384
+ uv add --dev pytest pytest-asyncio black isort mypy ruff
385
+
386
+ # 运行测试
387
+ uv run pytest
388
+
389
+ # 代码格式化
390
+ uv run black src/
391
+ uv run isort src/
392
+
393
+ # 类型检查
394
+ uv run mypy src/
395
+
396
+ # 代码检查
397
+ uv run ruff check src/
398
+ ```
399
+
400
+ ### 构建和发布
401
+
402
+ ```bash
403
+ # 构建包
404
+ uv build
405
+
406
+ # 发布到PyPI
407
+ uv publish
408
+ ```
409
+
410
+ ## 许可证
411
+
412
+ MIT License
413
+
414
+ ## 贡献
415
+
416
+ 欢迎贡献代码!请查看[贡献指南](CONTRIBUTING.md)了解详情。
417
+
418
+
419
+
420
+ ## 🤝 贡献
421
+
422
+ 欢迎提交Issue和Pull Request!
423
+
424
+ 1. Fork项目
425
+ 2. 创建功能分支
426
+ 3. 提交更改
427
+ 4. 开启Pull Request
428
+
429
+ ## 📄 许可证
430
+
431
+ MIT License - 查看 LICENSE 了解详情
432
+
433
+ ## 🙏 致谢
434
+
435
+ - Model Context Protocol (MCP) - 模型上下文协议
436
+ - Roo-Code - AI编程助手
437
+ - statsmodels - 统计分析库
438
+ - pandas - 数据处理库
439
+
440
+ ## 📞 支持
441
+
442
+ 💬 提交 [GitHub Issues](https://github.com/jackdark425/aigroup-econ-mcp/issues)
443
+ 📧 邮件:jackdark425@gmail.com
444
+ 📚 文档:查看项目文档和示例
445
+
446
+ **立即开始**: `uvx aigroup-econ-mcp` 🚀
447
+
448
+ ---
@@ -0,0 +1,12 @@
1
+ aigroup_econ_mcp/__init__.py,sha256=JZmOyArRpC2UC8gcMfkWPhfiqHieYCGLg8sM4Zg9Qn8,490
2
+ aigroup_econ_mcp/cli.py,sha256=oAYGd-BqTzvwx-sqcJsLiK2V8GieE90c68mGMtEoYjI,3378
3
+ aigroup_econ_mcp/server.py,sha256=xIIWZDoVndb9DZFF3uiiOsJOmpvGM-tY-Kn3yY2b24A,29827
4
+ aigroup_econ_mcp/tools/__init__.py,sha256=4KMGeZBKZN0F0FsdptIcxlHLRk0tLBDYHsxc1qqZBDs,147
5
+ aigroup_econ_mcp/tools/regression.py,sha256=uMGRGUQo4mU1sb8fwpP2FpkCqt_e9AtqEtUpInACtJo,6443
6
+ aigroup_econ_mcp/tools/statistics.py,sha256=GOrgvoQkYs-ax9qYyfRF8GfEV0QWb6e3mNMiQJkoy88,3548
7
+ aigroup_econ_mcp/tools/time_series.py,sha256=OyClB2WTLOKYhlUy5CcqYZE4hpI04rvMgeBTK5SfVeY,8381
8
+ aigroup_econ_mcp-0.1.5.dist-info/METADATA,sha256=Sx_J-CzaF69i7YcyMwbCVaLgiMhtFoSWUXFja8N5o_8,11008
9
+ aigroup_econ_mcp-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ aigroup_econ_mcp-0.1.5.dist-info/entry_points.txt,sha256=j5ZJYOc4lAZV-X3XkAuGhzHtIRcJtZ6Gz8ZKPY_QTrM,62
11
+ aigroup_econ_mcp-0.1.5.dist-info/licenses/LICENSE,sha256=DoyCJUWlDzKbqc5KRbFpsGYLwLh-XJRHKQDoITjb1yc,1083
12
+ aigroup_econ_mcp-0.1.5.dist-info/RECORD,,
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 AIGroup
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2024 AIGroup
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.