Let Large Language Models (LLMs) help you achieve your regression analysis with Stata.
Streamline your Stata workflow
Leverage the power of Large Language Models to enhance your regression analysis with Stata.
我们的平台支持多种语言,包括英语、中文、法语和西班牙语。
只需简单点击即可在不同语言之间切换。
我们的界面适应所有屏幕尺寸,提供最佳用户体验。
根据需要轻松自定义和扩展其他语言。
Documentation and interfaces available in multiple languages including English, Chinese, and French.
Designed with researchers and academics in mind, perfect for econometrics and statistical analysis projects.
Get started in minutes
Follow these simple steps to install and configure Stata-MCP.
<span className="text-blue-400"># Clone the repository</span> git clone https://github.com/sepinetam/stata-mcp.git cd stata-mcp <span className="text-blue-400"># Copy example config</span> cp example.config.py config.py <span className="text-blue-400"># Using uv (recommended)</span> uv run stata_mcp.py 17 se <span className="text-blue-400"># Test run with Stata 17 SE</span> <span className="text-blue-400"># Alternative setup with pip</span> <span className="text-gray-500"># python3.11 -m venv .venv</span> <span className="text-gray-500"># source .venv/bin/activate</span> <span className="text-gray-500"># pip install -r requirements.txt</span>bash
Note: Windows support is not currently available. If you have a Stata license for Windows and would like to contribute, please submit a PR.
MCP Server Configuration
Configure Stata-MCP with your preferred LLM service.
{ "stata-mcp": { "command":"uv", "args":[ "--directory", "/Users/yourname/path/to/repo/", "run", "stata_mcp.py", "17", "se" ] } }json
Open ChatWise app and navigate to the tools tab (subscription required):
type: stdio ID: stata-mcp command: uv --directory /Users/yourname/path/to/repo/ run stata_mcp.py 17 seyaml
{ "mcpServers": { "stata-mcp": { "command":"uv", "args":[ "--directory", "/Users/yourname/path/to/repo/", "run", "stata_mcp.py", "17", "se" ] } } }json
See it in action
Watch how Stata-MCP helps with regression analysis.
Here's a sample prompt to get you started:
<span className="text-green-400">System Prompt:</span> """ 你是一个经济学教授的助理,熟悉各种经济学的实证方法,能帮助教授写stata代码并完成实证研究。教授会给你一个要求,而你需要实现它的需求,你的实现方法应该遵循如下步骤: 1. 确认数据里的变量 2. 分析问题如何开展 3. 编写stata-code整理成do-file并通过工具运行 完成任务后你需要帮助教授进行分析回归结果。 """ <span className="text-green-400">Prompt:</span> """ 我有一个数据文件,目录是'/Users/username/Documents/data/did_show.dta',这是一个did的示例数据,我希望你跑一个did出来给我看看。数据里有一个q变量,这是我们做did的y,然后还有trade和post来描述是税改之前的还是税改之后的以及是否是处理组。 你的任务是先写一个dofile,通过工具来保存这个dofile到本地,然后通过工具执行这个dofile,最后通过工具读取这次执行的日志。 """text
Future Development Plans
What's coming next in Stata-MCP development.
Get started with Stata-MCP today and experience the power of AI-assisted regression analysis.