aigroup-econ-mcp 0.1.0__tar.gz

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,251 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ pythonsdk.html
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # IDEs
132
+ .vscode/
133
+ .idea/
134
+ *.swp
135
+ *.swo
136
+ *~
137
+
138
+ # OS
139
+ .DS_Store
140
+ .DS_Store?
141
+ ._*
142
+ .Spotlight-V100
143
+ .Trashes
144
+ ehthumbs.db
145
+ Thumbs.db
146
+
147
+ # uv
148
+ uv.lock
149
+
150
+ # Temporary files
151
+ *.tmp
152
+ *.temp
153
+ *.bak
154
+ *.backup
155
+
156
+ # Logs
157
+ *.log
158
+ logs/
159
+
160
+ # Database
161
+ *.db
162
+ *.sqlite
163
+ *.sqlite3
164
+
165
+ # Runtime data
166
+ pids
167
+ *.pid
168
+ *.seed
169
+ *.pid.lock
170
+
171
+ # Coverage directory used by tools like istanbul
172
+ coverage/
173
+
174
+ # nyc test coverage
175
+ .nyc_output
176
+
177
+ # Dependency directories
178
+ node_modules/
179
+ jspm_packages/
180
+
181
+ # Optional npm cache directory
182
+ .npm
183
+
184
+ # Optional eslint cache
185
+ .eslintcache
186
+
187
+ # Output of 'npm pack'
188
+ *.tgz
189
+
190
+ # Yarn Integrity file
191
+ .yarn-integrity
192
+
193
+ # dotenv environment variables file
194
+ .env
195
+
196
+ # next.js build output
197
+ .next
198
+
199
+ # Nuxt.js build / generate output
200
+ .nuxt
201
+
202
+ # Gatsby files
203
+ .cache/
204
+
205
+ # Storybook build outputs
206
+ .out
207
+ .storybook-out
208
+
209
+ # Temporary folders
210
+ tmp/
211
+ temp/
212
+
213
+ # Editor directories and files
214
+ .vscode/
215
+ !.vscode/extensions.json
216
+ .idea
217
+ *.suo
218
+ *.ntvs*
219
+ *.njsproj
220
+ *.sln
221
+ *.sw?
222
+
223
+ # MCP
224
+ .mcp/
225
+
226
+ # Local development
227
+ .env.local
228
+ .env.development.local
229
+ .env.test.local
230
+ .env.production.local
231
+
232
+ # Windows
233
+ Thumbs.db
234
+ ehthumbs.db
235
+ Desktop.ini
236
+
237
+ # macOS
238
+ .DS_Store
239
+ .AppleDouble
240
+ .LSOverride
241
+
242
+ # Linux
243
+ *~
244
+
245
+ # Project specific
246
+ exports/
247
+ *.csv
248
+ *.xlsx
249
+ *.json
250
+ !pyproject.toml
251
+ !README.md
@@ -0,0 +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
21
+ SOFTWARE.
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: aigroup-econ-mcp
3
+ Version: 0.1.0
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 计量经济学 MCP 工具
35
+
36
+ 专业计量经济学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
+ ## 快速开始
52
+
53
+ ### 使用uvx安装运行(推荐)
54
+
55
+ ```bash
56
+ # 一键安装和运行
57
+ uvx aigroup-econ-mcp
58
+
59
+ # 指定端口运行
60
+ uvx aigroup-econ-mcp --port 8080 --debug
61
+
62
+ # 使用不同的传输协议
63
+ uvx aigroup-econ-mcp --transport streamable-http --host 0.0.0.0 --port 8000
64
+ ```
65
+
66
+ ### 本地开发
67
+
68
+ ```bash
69
+ # 克隆项目
70
+ git clone https://github.com/aigroup/aigroup-econ-mcp
71
+ cd aigroup-econ-mcp
72
+
73
+ # 开发模式运行
74
+ uv run aigroup-econ-mcp --port 8000 --debug
75
+
76
+ # 或使用uvx
77
+ uvx -p . aigroup-econ-mcp
78
+ ```
79
+
80
+ ## 与Claude Desktop集成
81
+
82
+ 在Claude Desktop的配置文件中添加:
83
+
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "aigroup-econ-mcp": {
88
+ "command": "uvx",
89
+ "args": ["aigroup-econ-mcp", "--transport", "stdio"]
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## 使用示例
96
+
97
+ ### 描述性统计分析
98
+
99
+ ```python
100
+ # 计算基础统计量
101
+ result = await descriptive_statistics({
102
+ "GDP": [100, 110, 120, 115, 125],
103
+ "Inflation": [2.1, 2.3, 1.9, 2.4, 2.0]
104
+ })
105
+ ```
106
+
107
+ ### OLS回归分析
108
+
109
+ ```python
110
+ # 回归分析
111
+ result = await ols_regression(
112
+ y_data=[100, 110, 120, 115, 125],
113
+ x_data=[[2.1, 4.5], [2.3, 4.2], [1.9, 4.0], [2.4, 4.3], [2.0, 4.1]],
114
+ feature_names=["inflation", "unemployment"]
115
+ )
116
+ ```
117
+
118
+ ### 假设检验
119
+
120
+ ```python
121
+ # 假设检验
122
+ result = await hypothesis_testing(
123
+ data1=[100, 110, 120, 115, 125],
124
+ data2=[95, 105, 115, 120, 130],
125
+ test_type="t_test"
126
+ )
127
+ ```
128
+
129
+ ### 时间序列分析
130
+
131
+ ```python
132
+ # 时间序列分析
133
+ result = await time_series_analysis([100, 110, 120, 115, 125, 130, 128, 135])
134
+ ```
135
+
136
+ ## 可用资源
137
+
138
+ ### 示例数据集
139
+
140
+ ```
141
+ resource://dataset/sample/economic_growth
142
+ resource://dataset/sample/stock_returns
143
+ resource://dataset/sample/time_series
144
+ ```
145
+
146
+ ### 提示模板
147
+
148
+ ```
149
+ prompt://economic_analysis?data_description=...&analysis_type=descriptive
150
+ ```
151
+
152
+ ## 项目结构
153
+
154
+ ```
155
+ aigroup-econ-mcp/
156
+ ├── src/aigroup_econ_mcp/
157
+ │ ├── __init__.py # 包初始化
158
+ │ ├── server.py # MCP服务器核心
159
+ │ ├── cli.py # 命令行入口
160
+ │ └── tools/
161
+ │ ├── __init__.py
162
+ │ ├── statistics.py # 统计分析工具
163
+ │ ├── regression.py # 回归分析工具
164
+ │ └── time_series.py # 时间序列工具
165
+ ├── pyproject.toml # 项目配置
166
+ ├── README.md
167
+ └── examples/
168
+ ```
169
+
170
+ ## 依赖要求
171
+
172
+ - Python 3.8+
173
+ - pandas >= 1.5.0
174
+ - numpy >= 1.21.0
175
+ - statsmodels >= 0.13.0
176
+ - scipy >= 1.7.0
177
+ - matplotlib >= 3.5.0
178
+ - mcp >= 1.0.0
179
+
180
+ ## 开发
181
+
182
+ ### 环境设置
183
+
184
+ ```bash
185
+ # 安装开发依赖
186
+ uv add --dev pytest pytest-asyncio black isort mypy ruff
187
+
188
+ # 运行测试
189
+ uv run pytest
190
+
191
+ # 代码格式化
192
+ uv run black src/
193
+ uv run isort src/
194
+
195
+ # 类型检查
196
+ uv run mypy src/
197
+
198
+ # 代码检查
199
+ uv run ruff check src/
200
+ ```
201
+
202
+ ### 构建和发布
203
+
204
+ ```bash
205
+ # 构建包
206
+ uv build
207
+
208
+ # 发布到PyPI
209
+ uv publish
210
+ ```
211
+
212
+ ## 许可证
213
+
214
+ MIT License
215
+
216
+ ## 贡献
217
+
218
+ 欢迎贡献代码!请查看[贡献指南](CONTRIBUTING.md)了解详情。
219
+
220
+ ## 支持
221
+
222
+ 如有问题或建议,请通过[GitHub Issues](https://github.com/aigroup/aigroup-econ-mcp/issues)联系我们。
223
+
224
+ ## 致谢
225
+
226
+ 感谢Model Context Protocol (MCP)社区提供的优秀工具和文档。
@@ -0,0 +1,193 @@
1
+ # AIGroup 计量经济学 MCP 工具
2
+
3
+ 专业计量经济学MCP工具 - 让大模型直接进行数据分析
4
+
5
+ ![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)
6
+ ![MCP](https://img.shields.io/badge/MCP-1.0+-green.svg)
7
+ ![License](https://img.shields.io/badge/License-MIT-yellow.svg)
8
+
9
+ ## 功能特性
10
+
11
+ - 📊 **描述性统计分析** - 自动计算均值、方差、偏度、峰度等统计量
12
+ - 📈 **回归分析** - OLS回归、逐步回归、模型诊断
13
+ - 🧪 **假设检验** - t检验、F检验、卡方检验、ADF检验
14
+ - ⏰ **时间序列分析** - 平稳性检验、ARIMA模型、预测
15
+ - 🔄 **结构化输出** - 完整的Pydantic模型支持
16
+ - 🎯 **上下文管理** - 进度报告、日志记录、错误处理
17
+
18
+ ## 快速开始
19
+
20
+ ### 使用uvx安装运行(推荐)
21
+
22
+ ```bash
23
+ # 一键安装和运行
24
+ uvx aigroup-econ-mcp
25
+
26
+ # 指定端口运行
27
+ uvx aigroup-econ-mcp --port 8080 --debug
28
+
29
+ # 使用不同的传输协议
30
+ uvx aigroup-econ-mcp --transport streamable-http --host 0.0.0.0 --port 8000
31
+ ```
32
+
33
+ ### 本地开发
34
+
35
+ ```bash
36
+ # 克隆项目
37
+ git clone https://github.com/aigroup/aigroup-econ-mcp
38
+ cd aigroup-econ-mcp
39
+
40
+ # 开发模式运行
41
+ uv run aigroup-econ-mcp --port 8000 --debug
42
+
43
+ # 或使用uvx
44
+ uvx -p . aigroup-econ-mcp
45
+ ```
46
+
47
+ ## 与Claude Desktop集成
48
+
49
+ 在Claude Desktop的配置文件中添加:
50
+
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "aigroup-econ-mcp": {
55
+ "command": "uvx",
56
+ "args": ["aigroup-econ-mcp", "--transport", "stdio"]
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## 使用示例
63
+
64
+ ### 描述性统计分析
65
+
66
+ ```python
67
+ # 计算基础统计量
68
+ result = await descriptive_statistics({
69
+ "GDP": [100, 110, 120, 115, 125],
70
+ "Inflation": [2.1, 2.3, 1.9, 2.4, 2.0]
71
+ })
72
+ ```
73
+
74
+ ### OLS回归分析
75
+
76
+ ```python
77
+ # 回归分析
78
+ result = await ols_regression(
79
+ y_data=[100, 110, 120, 115, 125],
80
+ x_data=[[2.1, 4.5], [2.3, 4.2], [1.9, 4.0], [2.4, 4.3], [2.0, 4.1]],
81
+ feature_names=["inflation", "unemployment"]
82
+ )
83
+ ```
84
+
85
+ ### 假设检验
86
+
87
+ ```python
88
+ # 假设检验
89
+ result = await hypothesis_testing(
90
+ data1=[100, 110, 120, 115, 125],
91
+ data2=[95, 105, 115, 120, 130],
92
+ test_type="t_test"
93
+ )
94
+ ```
95
+
96
+ ### 时间序列分析
97
+
98
+ ```python
99
+ # 时间序列分析
100
+ result = await time_series_analysis([100, 110, 120, 115, 125, 130, 128, 135])
101
+ ```
102
+
103
+ ## 可用资源
104
+
105
+ ### 示例数据集
106
+
107
+ ```
108
+ resource://dataset/sample/economic_growth
109
+ resource://dataset/sample/stock_returns
110
+ resource://dataset/sample/time_series
111
+ ```
112
+
113
+ ### 提示模板
114
+
115
+ ```
116
+ prompt://economic_analysis?data_description=...&analysis_type=descriptive
117
+ ```
118
+
119
+ ## 项目结构
120
+
121
+ ```
122
+ aigroup-econ-mcp/
123
+ ├── src/aigroup_econ_mcp/
124
+ │ ├── __init__.py # 包初始化
125
+ │ ├── server.py # MCP服务器核心
126
+ │ ├── cli.py # 命令行入口
127
+ │ └── tools/
128
+ │ ├── __init__.py
129
+ │ ├── statistics.py # 统计分析工具
130
+ │ ├── regression.py # 回归分析工具
131
+ │ └── time_series.py # 时间序列工具
132
+ ├── pyproject.toml # 项目配置
133
+ ├── README.md
134
+ └── examples/
135
+ ```
136
+
137
+ ## 依赖要求
138
+
139
+ - Python 3.8+
140
+ - pandas >= 1.5.0
141
+ - numpy >= 1.21.0
142
+ - statsmodels >= 0.13.0
143
+ - scipy >= 1.7.0
144
+ - matplotlib >= 3.5.0
145
+ - mcp >= 1.0.0
146
+
147
+ ## 开发
148
+
149
+ ### 环境设置
150
+
151
+ ```bash
152
+ # 安装开发依赖
153
+ uv add --dev pytest pytest-asyncio black isort mypy ruff
154
+
155
+ # 运行测试
156
+ uv run pytest
157
+
158
+ # 代码格式化
159
+ uv run black src/
160
+ uv run isort src/
161
+
162
+ # 类型检查
163
+ uv run mypy src/
164
+
165
+ # 代码检查
166
+ uv run ruff check src/
167
+ ```
168
+
169
+ ### 构建和发布
170
+
171
+ ```bash
172
+ # 构建包
173
+ uv build
174
+
175
+ # 发布到PyPI
176
+ uv publish
177
+ ```
178
+
179
+ ## 许可证
180
+
181
+ MIT License
182
+
183
+ ## 贡献
184
+
185
+ 欢迎贡献代码!请查看[贡献指南](CONTRIBUTING.md)了解详情。
186
+
187
+ ## 支持
188
+
189
+ 如有问题或建议,请通过[GitHub Issues](https://github.com/aigroup/aigroup-econ-mcp/issues)联系我们。
190
+
191
+ ## 致谢
192
+
193
+ 感谢Model Context Protocol (MCP)社区提供的优秀工具和文档。