Metadata-Version: 2.4
Name: stata-ai-fusion
Version: 0.1.0
Summary: MCP Server + Skill for Stata: execute commands, inspect data, and generate high-quality Stata code with AI
License: MIT
License-File: LICENSE
Keywords: ai,econometrics,mcp,stata,statistics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.11
Requires-Dist: anyio>=4.0.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pexpect>=4.9.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# Stata AI Fusion

MCP Server + Skill Knowledge Base + VS Code Extension for Stata.

A three-in-one Stata AI integration: let AI directly execute Stata code,
generate high-quality statistical analysis code, and provide a complete IDE
experience in VS Code.

## Features

- **MCP Server**: 10 tools that let AI agents operate Stata directly
  - `run_command` / `run_do_file` -- execute code
  - `inspect_data` / `codebook` -- data exploration
  - `get_results` -- extract r()/e()/c() results
  - `export_graph` -- graph export with auto-capture
  - `search_log` / `install_package` -- utility tools
  - `list_sessions` / `close_session` -- session management
- **Skill Knowledge Base**: 5,600+ lines of Stata knowledge
  - Econometrics, causal inference, survival analysis, clinical data analysis
  - 14 reference documents with Progressive Disclosure architecture
- **VS Code Extension**: complete Stata IDE experience
  - Syntax highlighting (350+ functions)
  - 30 code snippets
  - Run code / .do files with one keypress
  - Graph preview panel

## Quick Start

### MCP Server (Claude Desktop / Claude Code / Cursor)

```bash
# One-command launch with uvx
uvx --from stata-ai-fusion stata-ai-fusion
```

Or configure in your AI assistant's MCP settings:

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

### VS Code Extension

```bash
code --install-extension stata-ai-fusion-0.1.0.vsix
```

### Skill Only (Claude.ai)

Download `stata-ai-fusion-skill.zip` from the
[Releases](https://github.com/SexyERIC0723/stata-ai-fusion/releases) page,
then upload via Claude.ai Settings > Skills.

## Requirements

- Stata 17+ installed locally (MP, SE, IC, or BE)
- Python 3.11+ (for MCP server)
- VS Code 1.85+ (for extension)

## Supported Platforms

- macOS (Intel & Apple Silicon)
- Linux
- Windows

## Development

```bash
git clone https://github.com/SexyERIC0723/stata-ai-fusion.git
cd stata-ai-fusion
uv sync
uv run pytest tests/ -v
```

## License

MIT -- see [LICENSE](LICENSE) for details.
