HH

haoyu-haoyu/stata-ai-fusion

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

45 stars 7 forks 质量 81 趋势 17MIT

haoyu-haoyu/stata-ai-fusion 是从 https://github.com/haoyu-haoyu/stata-ai-fusion. 导入的 MCP 服务器候选。

概览

haoyu-haoyu/stata-ai-fusion 是从 https://github.com/haoyu-haoyu/stata-ai-fusion. 导入的 MCP 服务器候选。

概述(AI 翻译)

Stata AI 融合 MCP 服务器 + 技能知识库 + VS Code Extension for Stata 让AI直接执行Stata代码,生成发表级分析,提供完整的IDE体验。

快速入门 • 特色 • MCP工具 • 技能知识 • VS 代码扩展 • 中文文档


为什么是Stata人工智能融合?

Stata是经济学、政治学、流行病学和生物统计学领域最广泛使用的统计软件包之一。然而,尽管R和Python用户多年来一直享有深度的人工智能整合,Stata却始终与AI辅助编程革命隔离开来。

stata-ai-fusion 弥合了这一差距。它让 AI 助手(Claude、Cursor、GitHub Copilot 等)能够启动真实的 Stata 会话,执行命令,检查数据,提取估计结果,并捕捉图表——所有这些都通过开放的模型上下文协议(MCP)实现。

该项目作为三个互补组件发布,涵盖了所有工作流程:

组件 它的作用 它属于谁
MCP 服务器11 个工具,允许任何兼容 MCP 的 AI 执行 Stata Claude 桌面,Claude 代码,光标用户

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。


Why Stata AI Fusion?

Stata is one of the most widely used statistical packages in economics, political science, epidemiology, and biostatistics. Yet while R and Python users have enjoyed deep AI integration for years, Stata has remained isolated from the AI-assisted coding revolution.

stata-ai-fusion bridges that gap. It gives AI assistants (Claude, Cursor, GitHub Copilot, and others) the ability to start a real Stata session, run commands, inspect data, extract estimation results, and capture graphs – all through the open Model Context Protocol (MCP).

The project ships as three complementary components so every workflow is covered:

Component What it does Who it’s for
MCP Server 11 tools that let any MCP-compatible AI execute Stata Claude Desktop, Claude Code, Cursor users
Skill Knowledge Base 5,653 lines of Stata expertise the AI can consult Claude.ai Project / Skill users
VS Code Extension Syntax highlighting, snippets, run-in-terminal Anyone writing .do files in VS Code or Cursor

Architecture

The data flow is straightforward:

  1. AI Assistant sends a tool call (e.g. stata_run_command) via MCP.
  2. MCP Server dispatches the request to the Session Manager, which maintains one or more persistent, interactive Stata processes.
  3. Stata executes the command; the server captures output, strips SMCL markup, detects errors, and auto-exports any new graphs.
  4. The cleaned result (text + optional base64 image) flows back to the AI, which interprets it and responds to the user.

Quick Start

在 GitHub 查看完整 README

安装

uvx --from stata-ai-fusion stata-ai-fusion
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "stata": { "command": "uvx", "args": ["--from", "stata-ai-fusion", "stata-ai-fusion"] } } }